Skip to content

Commit

Permalink
Merge pull request CleverRaven#76614 from RenechCDDA/implement_lone_wolf
Browse files Browse the repository at this point in the history
Actually check if faction is lone wolf instead of "no_faction" ID
  • Loading branch information
Maleclypse authored Oct 9, 2024
2 parents 86df676 + 449e880 commit c57abff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ static const efftype_id effect_tied( "tied" );
static const efftype_id effect_transition_contacts( "transition_contacts" );
static const efftype_id effect_winded( "winded" );

static const faction_id faction_no_faction( "no_faction" );

static const fault_id fault_bionic_salvaged( "fault_bionic_salvaged" );

static const field_type_str_id field_fd_clairvoyant( "fd_clairvoyant" );
Expand Down Expand Up @@ -11907,7 +11905,7 @@ bool Character::add_faction_warning( const faction_id &id ) const
warning_record[id] = std::make_pair( 1, calendar::turn );
}
faction *fac = g->faction_manager_ptr->get( id );
if( fac != nullptr && is_avatar() && fac->id != faction_no_faction ) {
if( fac != nullptr && is_avatar() && !fac->lone_wolf_faction ) {
fac->likes_u -= 1;
fac->respects_u -= 1;
fac->trusts_u -= 1;
Expand Down
2 changes: 1 addition & 1 deletion src/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ void npc::make_angry()
}

// Make associated faction, if any, angry at the player too.
if( my_fac && my_fac->id != faction_no_faction && my_fac->id != faction_amf ) {
if( my_fac && !my_fac->lone_wolf_faction && my_fac->id != faction_amf ) {
my_fac->likes_u = std::min( -15, my_fac->likes_u - 5 );
my_fac->respects_u = std::min( -15, my_fac->respects_u - 5 );
my_fac->trusts_u = std::min( -15, my_fac->trusts_u - 5 );
Expand Down
4 changes: 1 addition & 3 deletions src/talker_npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ static const efftype_id effect_narcosis( "narcosis" );
static const efftype_id effect_npc_suspend( "npc_suspend" );
static const efftype_id effect_sleep( "sleep" );

static const faction_id faction_no_faction( "no_faction" );

static const itype_id itype_foodperson_mask( "foodperson_mask" );
static const itype_id itype_foodperson_mask_on( "foodperson_mask_on" );

Expand Down Expand Up @@ -562,7 +560,7 @@ void talker_npc::set_fac( const faction_id &new_fac_name )

void talker_npc::add_faction_rep( const int rep_change )
{
if( me_npc->get_faction()-> id != faction_no_faction ) {
if( !me_npc->get_faction()->lone_wolf_faction ) {
me_npc->get_faction()->likes_u += rep_change;
me_npc->get_faction()->respects_u += rep_change;
me_npc->get_faction()->trusts_u += rep_change;
Expand Down

0 comments on commit c57abff

Please sign in to comment.