Skip to content

Commit

Permalink
Fix missing translation in NPC trade denial reason
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Apr 6, 2024
1 parent 28aa11c commit 80b4ba0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ ret_val<void> npc::wants_to_buy( const item &it, int at_price ) const

icg_entry const *bl = myclass->get_shopkeeper_blacklist().matches( it, *this );
if( bl != nullptr ) {
return ret_val<void>::make_failure( bl->message );
return ret_val<void>::make_failure( bl->message.translated() );
}

// TODO: Base on inventory
Expand Down
2 changes: 1 addition & 1 deletion src/npc_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ std::string shopkeeper_item_group::get_refusal() const
return _( "<npcname> does not trust you enough" );
}

return refusal;
return refusal.translated();
}

void shopkeeper_item_group::deserialize( const JsonObject &jo )
Expand Down
2 changes: 1 addition & 1 deletion src/npc_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct shopkeeper_item_group {
item_group_id id = item_group_id( "EMPTY_GROUP" );
int trust = 0;
bool strict = false;
std::string refusal;
translation refusal;
std::function<bool( dialogue & )> condition;

// Rigid shopkeeper groups will be processed a single time. Default groups are not rigid, and will be processed until the shopkeeper has no more room or remaining value to populate goods with.
Expand Down
2 changes: 1 addition & 1 deletion src/shop_cons_rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct icg_entry {
itype_id itype;
item_category_id category;
item_group_id item_group;
std::string message;
translation message;

std::function<bool( dialogue & )> condition;

Expand Down

0 comments on commit 80b4ba0

Please sign in to comment.