Skip to content

Commit

Permalink
Cannibals are pariahs 2
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Nov 14, 2024
1 parent d7f0e5d commit cf06f43
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,27 @@ void activity_handlers::butcher_do_turn( player_activity *act, Character * )
corpse_item.set_var( butcher_progress_var( action ), progress );
}

static bool do_cannibalism_piss_people_off( Character &you )
{
if( !you.is_avatar() ) {
return true; // NPCs dont accidentally cause player hate
}

if( !query_yn(
_( "Really desecrate the mortal remains of a fellow human being by butchering them for meat?" ) ) ) {
return false; // player cancels
}

for( npc &guy : g->all_npcs() ) {
if( guy.is_active() && guy.sees( you ) && !guy.okay_with_eating_people() ) {

Check failure on line 494 in src/activity_handlers.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

no member named 'okay_with_eating_people' in 'npc'
// massive opinion penalty
guy.trust -= 5;

Check failure on line 496 in src/activity_handlers.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

no member named 'trust' in 'npc'
guy.value -= 5;

Check failure on line 497 in src/activity_handlers.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

reference to non-static member function must be called
}
}
return true;
}

static void set_up_butchery( player_activity &act, Character &you, butcher_type action )
{
const int factor = you.max_quality( action == butcher_type::DISSECT ? qual_CUT_FINE : qual_BUTCHER,
Expand Down Expand Up @@ -609,8 +630,7 @@ static void set_up_butchery( player_activity &act, Character &you, butcher_type
if( you.has_proficiency( proficiency_prof_dissect_humans ) ) {
//if it's player doing the butchery, ask them first.
if( you.is_avatar() ) {
if( query_yn(
_( "Really desecrate the mortal remains of a fellow human being by butchering them for meat?" ) ) ) {
if( do_cannibalism_piss_people_off( you ) ) {
//give the player a random message showing their disgust and cause morale penalty.
switch( rng( 1, 3 ) ) {
case 1:
Expand Down

0 comments on commit cf06f43

Please sign in to comment.