Skip to content

Commit

Permalink
fix npc butchering
Browse files Browse the repository at this point in the history
  • Loading branch information
x-qq authored and catern committed Oct 15, 2024
1 parent cc573e3 commit 240a518
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 @@ -1187,7 +1187,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 @@ -1203,7 +1203,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 @@ -1960,7 +1960,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 240a518

Please sign in to comment.