Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should Fix Issue with constanlty crammed space #74159

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6120,7 +6120,6 @@
{
"type": "mutation",
"id": "VERY_TALL",
"flags": [ "LARGE" ],
"name": { "str": "Very Tall" },
"points": 0,
"visibility": 1,
Expand Down
14 changes: 8 additions & 6 deletions src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,19 @@ static units::volume size_to_volume( creature_size size_class )
// e.g. max tiny size is 7500, max small size is 46250, we return
// 46250+7500 / 2 - 1_ml = 26875_ml - 1ml
// This is still stupid and both of these functions should be merged into one single source of truth.

//Updated Calculation Because this one seems off
//now midpoint is calculated by just /2 -1
if( size_class == creature_size::tiny ) {
return 3749_ml;
} else if( size_class == creature_size::small ) {
return 26874_ml;
return 23124_ml;
} else if( size_class == creature_size::medium ) {
return 77124_ml;
return 53999_ml;
} else if( size_class == creature_size::large ) {
return 295874_ml;
return 241874_ml;
}
return 741874_ml;
return 483750_ml;
}

bool Creature::can_move_to_vehicle_tile( const tripoint_abs_ms &loc, bool &cramped ) const
Expand All @@ -222,7 +225,6 @@ bool Creature::can_move_to_vehicle_tile( const tripoint_abs_ms &loc, bool &cramp
if( !vp_there ) {
return true;
}

const monster *mon = as_monster();

vehicle &veh = vp_there->vehicle();
Expand Down Expand Up @@ -263,7 +265,7 @@ bool Creature::can_move_to_vehicle_tile( const tripoint_abs_ms &loc, bool &cramp
return false;
}

if( critter_volume < free_cargo * 1.33 ) {
if( critter_volume < free_cargo * 1.33 && critter_volume > free_cargo * 0.9 ) {
if( !mon || !( mon->type->bodytype == "snake" || mon->type->bodytype == "blob" ||
mon->type->bodytype == "fish" ||
has_flag( mon_flag_PLASTIC ) || has_flag( mon_flag_SMALL_HIDER ) ) ) {
Expand Down
Loading