Skip to content

Commit

Permalink
Merge pull request CleverRaven#79741 from GuardianDll/dormant_mx
Browse files Browse the repository at this point in the history
Add dormant map extra
  • Loading branch information
Maleclypse authored Feb 20, 2025
2 parents 460a215 + ad2a940 commit 39b0571
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
8 changes: 8 additions & 0 deletions data/json/mapgen/map_extras/dormants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_dormant",
"object": { "monsters": { " ": { "monster": "GROUP_VANILLA_DORMANT", "chance": 10, "density": 0.02 } } }
}
]
11 changes: 11 additions & 0 deletions data/json/overmap/map_extras.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
"autonote": true,
"flags": [ "MAN_MADE", "CLASSIC" ]
},
{
"id": "mx_dormant",
"type": "map_extra",
"name": { "str": "Corpses" },
"description": "There are a lot of dead corpses here.",
"generator": { "generator_method": "update_mapgen", "generator_id": "mx_dormant" },
"min_max_zlevel": [ -7, 7 ],
"sym": "d",
"color": "light_red",
"flags": [ "MAN_MADE", "CLASSIC" ]
},
{
"id": "mx_drugdeal",
"type": "map_extra",
Expand Down
6 changes: 5 additions & 1 deletion data/json/regional_map_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@
"mx_military": 5,
"mx_science": 7,
"mx_collegekids": 15,
"mx_dormant": 30,
"mx_portal": 5,
"mx_portal_in": 3,
"mx_point_burned_ground": 5,
Expand All @@ -732,7 +733,10 @@
}
},
"marloss": { "chance": 20, "extras": { "mx_marloss_pilgrimage": 100 } },
"subway": { "chance": 100, "extras": { "mx_military": 5, "mx_science": 12, "mx_drugdeal": 5, "mx_casings": 10 } },
"subway": {
"chance": 100,
"extras": { "mx_military": 5, "mx_science": 12, "mx_drugdeal": 5, "mx_casings": 10, "mx_dormant": 10 }
},
"lab_subway": { "chance": 25, "extras": { "mx_military": 5, "mx_science": 15, "mx_portal": 3, "mx_portal_in": 3 } },
"research_facility_lot": {
"chance": 3,
Expand Down
11 changes: 0 additions & 11 deletions src/trapfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,17 +1573,6 @@ bool trapfunc::cast_spell( const tripoint_bub_ms &p, Creature *critter, item * )
if( !tr.has_flag( json_flag_UNCONSUMED ) ) {
here.remove_trap( p );
}
if( tr.has_flag( json_flag_PROXIMITY ) ) {
// remove all traps in 3-3 area area
for( int x = p.x() - 1; x <= p.x() + 1; x++ ) {
for( int y = p.y() - 1; y <= p.y() + 1; y++ ) {
tripoint_bub_ms pt( x, y, p.z() );
if( here.tr_at( pt ).loadid == tr.loadid ) {
here.remove_trap( pt );
}
}
}
}
// we remove the trap before casting the spell because otherwise if we teleport we might be elsewhere at the end and p is no longer valid
trap_spell.cast_all_effects( dummy, p );
trap_spell.make_sound( p, get_player_character() );
Expand Down

0 comments on commit 39b0571

Please sign in to comment.