Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CleverRaven/Cataclysm-DDA
Browse files Browse the repository at this point in the history
…into migrate-dig-activities
  • Loading branch information
rsulli55 committed May 5, 2020
2 parents 736ba26 + 50810da commit 076e637
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion data/json/npcs/missiondef.json
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
"type": "mission_definition",
"name": { "str": "Reach The Mansion And Finish This Delivery" },
"goal": "MGOAL_GO_TO_TYPE",
"destination": "mansion_c3_north",
"destination": "mansion_c3",
"difficulty": 1,
"value": 0,
"start": { "assign_mission_target": { "om_terrain": "mansion_c3", "om_special": "Mansion_Wild", "search_range": 200 } },
Expand Down
7 changes: 5 additions & 2 deletions data/json/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" } ]
},
Expand Down Expand Up @@ -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" ] } ] } }
},
{
Expand Down Expand Up @@ -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" ] }
},
{
Expand Down Expand Up @@ -2956,6 +2958,7 @@
"both": {
"items": [
"under_armor_shorts",
"purse",
"under_armor",
"socks",
"elbow_pads",
Expand Down
12 changes: 12 additions & 0 deletions data/mods/DinoMod/dinosaur.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,17 @@
{ "monster": "mon_dimorphodon", "freq": 500, "cost_multiplier": 0, "pack_size": [ 2, 4 ] },
{ "monster": "mon_dilophosaurus", "freq": 150, "cost_multiplier": 10, "pack_size": [ 1, 2 ] }
]
},
{
"type": "monstergroup",
"name": "GROUP_CENTRAL_LAB",
"default": "mon_zombie_scientist",
"monsters": [ { "monster": "mon_deinonychus", "freq": 200, "cost_multiplier": 15, "pack_size": [ 2, 3 ] } ]
},
{
"type": "monstergroup",
"name": "GROUP_LAB",
"default": "mon_zombie_scientist",
"monsters": [ { "monster": "mon_deinonychus", "freq": 500, "cost_multiplier": 15, "pack_size": [ 2, 3 ] } ]
}
]
2 changes: 2 additions & 0 deletions doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
4 changes: 2 additions & 2 deletions src/point.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct point {
}

#ifndef CATA_NO_STL
inline point abs() const {
point abs() const {
return point( std::abs( x ), std::abs( y ) );
}
#endif
Expand Down Expand Up @@ -185,7 +185,7 @@ struct tripoint {
}

#ifndef CATA_NO_STL
inline tripoint abs() const {
tripoint abs() const {
return tripoint( std::abs( x ), std::abs( y ), std::abs( z ) );
}
#endif
Expand Down
10 changes: 6 additions & 4 deletions src/profession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,12 @@ std::list<item> profession::items( bool male, const std::vector<trait_id> &trait
result.insert( result.begin(), group_both.begin(), group_both.end() );
result.insert( result.begin(), group_gender.begin(), group_gender.end() );

std::vector<itype_id> 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<itype_id> 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(); ) {
Expand Down
1 change: 1 addition & 0 deletions tests/new_character_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ),
Expand Down

0 comments on commit 076e637

Please sign in to comment.