Skip to content

Commit

Permalink
Merge pull request #76040 from x-qq/fix-npc-butchering
Browse files Browse the repository at this point in the history
Fix npc butchering
  • Loading branch information
Maleclypse authored Aug 30, 2024
2 parents 1ab5fb4 + 7def448 commit b325a47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara
// make sure nobody else is working on that corpse right now
if( i.is_corpse() && !i.has_var( "activity_var" ) ) {
const mtype corpse = *i.get_mtype();
if( corpse.size >= creature_size::medium ) {
if( corpse.size > creature_size::medium ) {
big_count += 1;
} else {
small_count += 1;
Expand All @@ -1213,7 +1213,7 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara
}
if( !corpses.empty() ) {
if( big_count > 0 && small_count == 0 ) {
if( !b_rack_present || !here.has_nearby_table( src_loc, 2 ) ) {
if( !b_rack_present ) {
return activity_reason_info::fail( do_activity_reason::NO_ZONE );
}
if( you.has_quality( quality_id( qual_BUTCHER ), 1 ) && ( you.has_quality( qual_SAW_W ) ||
Expand Down Expand Up @@ -1953,7 +1953,7 @@ static bool butcher_corpse_activity( Character &you, const tripoint_bub_ms &src_
for( item &elem : items ) {
if( elem.is_corpse() && !elem.has_var( "activity_var" ) ) {
const mtype corpse = *elem.get_mtype();
if( corpse.size >= creature_size::medium && reason != do_activity_reason::NEEDS_BIG_BUTCHERING ) {
if( corpse.size > creature_size::medium && reason != do_activity_reason::NEEDS_BIG_BUTCHERING ) {
continue;
}
elem.set_var( "activity_var", you.name );
Expand Down

0 comments on commit b325a47

Please sign in to comment.