From 31a7c4f9f812f4a17d3033e121fc1fe4e70af43a Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 09:34:51 -0600 Subject: [PATCH 1/8] Update activity_handlers.cpp --- src/activity_handlers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index efb395d234ff0..22dd2c06e34a3 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -625,8 +625,8 @@ static void set_up_butchery( player_activity &act, Character &you, butcher_type corpse.in_species( species_HUMAN ) || corpse.in_species( species_FERAL ); - // applies to all butchery actions except for dissections - if( is_human && action != butcher_type::DISSECT && !you.okay_with_eating_humans() ) { + // applies to all butchery actions except for dissections or dismemberment + if( is_human && action != butcher_type::DISSECT && !you.okay_with_eating_humans() && action != butcher_type::DISMEMBER) { //first determine if the butcherer has the dissect_humans proficiency. if( you.has_proficiency( proficiency_prof_dissect_humans ) ) { //if it's player doing the butchery, ask them first. @@ -1395,7 +1395,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // therefore operations on this activity's targets and values may be invalidated. // reveal hidden items / hidden content if( action != butcher_type::FIELD_DRESS && action != butcher_type::SKIN && - action != butcher_type::BLEED ) { + action != butcher_type::BLEED && action != butcher_tyoe:: DISMEMBER) { for( item *content : corpse_item->all_items_top( pocket_type::CONTAINER ) ) { if( ( roll_butchery_dissect( round( you.get_average_skill_level( skill_survival ) ), you.dex_cur, tool_quality ) + 10 ) * 5 > rng( 0, 100 ) ) { From 214a530fc83194d1800b82421b8913a11338c546 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:01:59 +0100 Subject: [PATCH 2/8] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/activity_handlers.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 22dd2c06e34a3..cc69491398df6 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -626,7 +626,8 @@ static void set_up_butchery( player_activity &act, Character &you, butcher_type corpse.in_species( species_FERAL ); // applies to all butchery actions except for dissections or dismemberment - if( is_human && action != butcher_type::DISSECT && !you.okay_with_eating_humans() && action != butcher_type::DISMEMBER) { + if( is_human && action != butcher_type::DISSECT && !you.okay_with_eating_humans() && + action != butcher_type::DISMEMBER ) { //first determine if the butcherer has the dissect_humans proficiency. if( you.has_proficiency( proficiency_prof_dissect_humans ) ) { //if it's player doing the butchery, ask them first. @@ -1395,7 +1396,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // therefore operations on this activity's targets and values may be invalidated. // reveal hidden items / hidden content if( action != butcher_type::FIELD_DRESS && action != butcher_type::SKIN && - action != butcher_type::BLEED && action != butcher_tyoe:: DISMEMBER) { + action != butcher_type::BLEED && action != butcher_tyoe:: DISMEMBER ) { for( item *content : corpse_item->all_items_top( pocket_type::CONTAINER ) ) { if( ( roll_butchery_dissect( round( you.get_average_skill_level( skill_survival ) ), you.dex_cur, tool_quality ) + 10 ) * 5 > rng( 0, 100 ) ) { From e1d6f2ca7880909d938d628d943882f125a6008c Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 10:43:56 -0600 Subject: [PATCH 3/8] fix typo --- src/activity_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index cc69491398df6..d1733c614d261 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1396,7 +1396,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // therefore operations on this activity's targets and values may be invalidated. // reveal hidden items / hidden content if( action != butcher_type::FIELD_DRESS && action != butcher_type::SKIN && - action != butcher_type::BLEED && action != butcher_tyoe:: DISMEMBER ) { + action != butcher_type::BLEED && action != butcher_type:: DISMEMBER ) { for( item *content : corpse_item->all_items_top( pocket_type::CONTAINER ) ) { if( ( roll_butchery_dissect( round( you.get_average_skill_level( skill_survival ) ), you.dex_cur, tool_quality ) + 10 ) * 5 > rng( 0, 100 ) ) { From 7de684a35c5c42267dd726e9544de65d970f0e73 Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 10:51:50 -0600 Subject: [PATCH 4/8] removed useful drops --- src/activity_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index d1733c614d261..753185674a09d 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1130,7 +1130,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // RIP AND TEAR if( action == butcher_type::DISMEMBER ) { if( entry.type == harvest_drop_flesh ) { - roll /= 6; + roll == 0; } else { continue; } From ad9e3e604b37fd0b4331d1e7f730c53614f1ec52 Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 10:57:36 -0600 Subject: [PATCH 5/8] okay NOW useful drops are removed --- src/activity_handlers.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 753185674a09d..e44aab639875b 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1129,11 +1129,9 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte } // RIP AND TEAR if( action == butcher_type::DISMEMBER ) { - if( entry.type == harvest_drop_flesh ) { + roll == 0; - } else { - continue; - } + } // field dressing ignores skin, flesh, and blood if( action == butcher_type::FIELD_DRESS ) { From ac782bfb4dd3da192a713218c17c72302174be5b Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 11:29:37 -0600 Subject: [PATCH 6/8] Update src/activity_handlers.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/activity_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index e44aab639875b..259bde9b8b4a6 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1130,7 +1130,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // RIP AND TEAR if( action == butcher_type::DISMEMBER ) { - roll == 0; + roll == 0; } // field dressing ignores skin, flesh, and blood From 9bd694572db03abadb76715abd6940ef6dc7800f Mon Sep 17 00:00:00 2001 From: Et-Tu-Brute1234 Date: Sat, 1 Feb 2025 16:39:14 -0600 Subject: [PATCH 7/8] Update activity_handlers.cpp --- src/activity_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 259bde9b8b4a6..61b037d96c63f 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1130,7 +1130,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte // RIP AND TEAR if( action == butcher_type::DISMEMBER ) { - roll == 0; + roll = 0; } // field dressing ignores skin, flesh, and blood From e288d121246ec9d21c4484eae92fe3bd21179a09 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Mon, 3 Feb 2025 07:54:08 +0100 Subject: [PATCH 8/8] astyle --- src/activity_handlers.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 61b037d96c63f..b6d6514644360 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1129,9 +1129,7 @@ static bool butchery_drops_harvest( item *corpse_item, const mtype &mt, Characte } // RIP AND TEAR if( action == butcher_type::DISMEMBER ) { - roll = 0; - } // field dressing ignores skin, flesh, and blood if( action == butcher_type::FIELD_DRESS ) {