diff --git a/data/json/professions.json b/data/json/professions.json index 341f39601bd9f..9e9c5f08d47f0 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -1061,8 +1061,8 @@ "points": -1, "items": { "both": [ "crackpipe", "crack", "crack", "ref_lighter", "tank_top" ], - "male": [ "pants", "flip_flops" ], - "female": [ "skirt", "heels" ] + "male": [ "jeans", "flip_flops" ], + "female": [ "jeans", "heels" ] }, "addictions": [ { "intensity": 20, "type": "crack" } ] }, @@ -1628,6 +1628,7 @@ "name": "Shower Victim", "description": "You were in the middle of a nice, hot shower when the Cataclysm struck! You barely managed to escape with some soap and the most massively useful thing ever… a towel.", "points": -1, + "flags": [ "NO_BONUS_ITEMS" ], "items": { "both": { "items": [ "towel_wet" ], "entries": [ { "item": "soap", "custom-flags": [ "auto_wield" ] } ] } } }, { @@ -2253,6 +2254,7 @@ "name": "Lost Submissive", "description": "Early in the rush to safety, you were separated from your master by cruel fate. Now you are on your own with nothing to your name but a suit of really kinky black leather. Unfortunately, there's no safewords in the apocalypse.", "points": -1, + "flags": [ "NO_BONUS_ITEMS" ], "items": { "both": [ "bondage_suit", "bondage_mask", "boots", "leather_belt", "matches" ] } }, { @@ -2956,6 +2958,7 @@ "both": { "items": [ "under_armor_shorts", + "purse", "under_armor", "socks", "elbow_pads", diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 97c471587ea26..36181ecefd871 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -965,6 +965,8 @@ player will start with this as a nearby vehicle. A list of flags. TODO: document those flags here. +- ```NO_BONUS_ITEMS``` Prevent bonus items (such as inhalers with the ASTHMA trait) from being given to this profession + Mods can modify this via `add:flags` and `remove:flags`. #### `cbms` diff --git a/src/profession.cpp b/src/profession.cpp index d2ff7604be714..9892806376979 100644 --- a/src/profession.cpp +++ b/src/profession.cpp @@ -389,10 +389,12 @@ std::list profession::items( bool male, const std::vector &trait result.insert( result.begin(), group_both.begin(), group_both.end() ); result.insert( result.begin(), group_gender.begin(), group_gender.end() ); - std::vector bonus = item_substitutions.get_bonus_items( traits ); - for( const itype_id &elem : bonus ) { - if( elem != no_bonus ) { - result.push_back( item( elem, advanced_spawn_time(), item::default_charges_tag {} ) ); + if( !has_flag( "NO_BONUS_ITEMS" ) ) { + std::vector bonus = item_substitutions.get_bonus_items( traits ); + for( const itype_id &elem : bonus ) { + if( elem != no_bonus ) { + result.push_back( item( elem, advanced_spawn_time(), item::default_charges_tag {} ) ); + } } } for( auto iter = result.begin(); iter != result.end(); ) { diff --git a/tests/new_character_test.cpp b/tests/new_character_test.cpp index bd22923d3f274..d89a377f6dd7f 100644 --- a/tests/new_character_test.cpp +++ b/tests/new_character_test.cpp @@ -116,6 +116,7 @@ TEST_CASE( "starting_items", "[slow]" ) trait_id( "LACTOSE" ), //trait_id( "LEG_TENTACLES" ), trait_id( "MEATARIAN" ), + trait_id( "ASTHMA" ), //trait_id( "RAP_TALONS" ), //trait_id( "TAIL_FLUFFY" ), //trait_id( "TAIL_LONG" ),