Skip to content

Commit

Permalink
Partial mine jsonify; new zombie miner (#47790)
Browse files Browse the repository at this point in the history
* Moved mine_entrance OMT from the list of hardcoded locations to industial locations

Also removed mine_shaft OMT and replaced it with mine_shaft_middle and mine_shaft_lower OMTs.
Also added mine_entrance_roof OMT.

* Added mine_entrance and mine_shaft to the list of obsoleted terrains

* Added a zombie miner and its death drops

* Created a json-version of mine entrance and its roof

* Created a json-version of mine shaft (middle and lower variants)

* Changed overmap special definition of a mine to include new json chunks

* Applied migration of hardcoded mine_entrance and mine_shaft OMTs to new json variants

* Made hardcoded mine chunks generate to the west of lower section of new mine shaft OMT

Also removed mine_entrance and mine_shaft from the list of hardocoded mapgen.

* Completely removed build_mine_room function as all mine rooms are now defined in json

Also removed hardcoded generation of mine entrance and mine shaft.

* Removed mentions of mine rooms from mapgen.h

* Updated alt_map_key mod

* Updated graphical overmap mod

* Added missing harvest

* Appease clang and constify

* Quickfix

* Appease clang one more time
  • Loading branch information
Anton Burmistrov authored and ZhilkinSerg committed Apr 20, 2021
1 parent 3711f23 commit d03baa8
Show file tree
Hide file tree
Showing 14 changed files with 517 additions and 392 deletions.
194 changes: 194 additions & 0 deletions data/json/mapgen/mine/mine_entrance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
[
{
"type": "mapgen",
"method": "json",
"om_terrain": "mine_entrance",
"object": {
"rows": [
"fffffffffffФФfffffffffff",
"f v ,,,,,,,,,,,, !f",
"f/ ,,,,,,,,,,,,,,,,,f",
"|-000--000-0+0|00--00|,f",
"|dddrFFddcW..2|2..Fdd|,f",
"0dC.....Cc....?....dC|,f",
"0............a|b...d.|,f",
"0..C...|*-|-*-|b.....|,f",
"|rddd1p|.l|&_s|a36561|,f",
"|-000--|--|---|------|,f",
"f ,,,,,,,,,,,,,,,,,f",
"|----|+|----| ,,,,,,,/f",
"|I.hĎ|.|дh.I| ,|---%--|",
"0BB..+.+..BB0 ,|eEE~~4|",
"|----|.|----| ,|~EE~~4|",
"|I.hĎ|.|дh.I| ,|------|",
"0BB..+.+..BB0 ,|888888|",
"|----|.|----| ,?~~~~~8|",
"|I.hD|.|Дh.I| ,|888888|",
"0BB..+.+..BB0 ,|------|",
"|----|.|----| ,^`````@|",
"|&___+.+____| ,^``````|",
"|R__s|.|Й__7|/ №|999``$|",
"|----|0|----|fff|------|"
],
"fill_ter": "t_floor",
"terrain": {
" ": [ [ "t_region_groundcover", 4 ], [ "t_region_shrub", 2 ], [ "t_region_tree", 1 ] ],
"!": "t_manhole_cover",
"/": "t_gutter_downspout",
"|": "t_wall",
"-": "t_wall",
"_": "t_linoleum_white",
"&": "t_linoleum_white",
"*": "t_door_c",
"?": "t_door_locked_alarm",
"+": "t_door_locked",
"%": "t_door_metal_c",
"^": "t_door_metal_locked",
"№": "t_gates_mech_control",
",": "t_sidewalk",
".": "t_floor",
"~": "t_thconc_floor",
"`": "t_thconc_floor",
"0": "t_metal_grate_window_with_curtain",
"4": "t_thconc_floor",
"8": "t_thconc_floor",
"9": "t_thconc_floor",
"E": "t_elevator",
"e": "t_elevator_control_off",
"f": "t_chainfence",
"L": "t_door_metal_locked",
"R": "t_linoleum_white",
"s": "t_linoleum_white",
"v": "t_dirt",
"w": "t_window_alarm",
"W": "t_water_dispenser",
"Й": "t_linoleum_white",
"Ф": "t_chaingate_l"
},
"furniture": {
"1": "f_shredder",
"2": "f_rack_coat",
"3": "f_server",
"4": "f_metal_bench",
"5": "f_console",
"6": "f_console_broken",
"7": "f_shower",
"8": "f_utility_shelf",
"9": "f_utility_shelf",
"a": "f_air_conditioner",
"B": "f_bed",
"b": "f_bookcase",
"c": "f_counter",
"C": "f_chair",
"d": "f_desk",
"D": "f_desk",
"Ď": "f_desk",
"F": "f_filing_cabinet",
"h": "f_chair",
"I": "f_dresser",
"l": "f_locker",
"p": [ "f_indoor_plant", "f_indoor_plant_y" ],
"R": "f_trashcan",
"r": "f_trashcan",
"s": "f_sink",
"v": "f_vent_pipe",
"Д": "f_desk",
"д": "f_desk",
"Й": "f_rack_coat"
},
"toilets": { "&": { } },
"items": {
"2": { "item": "coat_rack", "chance": 60, "repeat": 2 },
"8": { "item": "mine_storage", "chance": 50, "repeat": 4 },
"9": { "item": "car_kit", "chance": 60, "repeat": 2 },
"B": { "item": "bed", "chance": 50 },
"b": { "item": "lab_bookshelves", "chance": 60, "repeat": 2 },
"c": { "item": "office_supplies", "chance": 60 },
"D": { "item": "SUS_junk_drawer_artsy", "chance": 90 },
"Ď": { "item": "SUS_junk_drawer_messy", "chance": 90 },
"d": { "item": "SUS_office_desk", "chance": 90 },
"F": { "item": "SUS_office_filing_cabinet", "chance": 90 },
"I": { "item": "SUS_dresser_mens", "chance": 60 },
"l": { "item": "SUS_janitors_closet", "chance": 85 },
"R": { "item": "trash_cart", "chance": 50 },
"r": { "item": "trash_cart", "chance": 50 },
"s": { "item": "SUS_bathroom_sink", "chance": 70 },
"Д": { "item": "SUS_junk_drawer_handy", "chance": 90 },
"д": { "item": "SUS_junk_drawer_tidy", "chance": 90 }
},
"monster": {
",": { "monster": "mon_zombie_miner", "chance": 5 },
".": { "monster": "mon_zombie_miner", "chance": 5 },
"`": { "monster": "mon_zombie_miner", "chance": 5 },
" ": { "monster": "mon_zombie_miner", "chance": 5 },
"~": { "monster": "mon_zombie_miner", "chance": 5 }
},
"computers": {
"5": {
"name": "NEPowerOS",
"security": 2,
"options": [ { "name": "Divert power to elevator", "action": "elevator_on" } ],
"failures": [ { "action": "alarm" } ]
}
},
"gaspumps": { "@": { "fuel": "gasoline", "amount": [ 10000, 50000 ] }, "$": { "fuel": "diesel", "amount": [ 10000, 50000 ] } },
"nested": { "`": { "chunks": [ [ "mechanical_fluid", 10 ], [ "gasoline_diesel_motor_oil", 80 ], [ "null", 80 ] ] } }
}
},
{
"type": "mapgen",
"method": "json",
"om_terrain": "mine_entrance_roof",
"object": {
"rows": [
" ",
" ",
" ",
"Ю--------------------| ",
"|....................| ",
"|....................| ",
"|....................| ",
"|....................| ",
"|....................| ",
"|--------------------| ",
" ",
"|-----------| ",
"|...........| |------Ю",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|...........| |......|",
"|-----------Ю |------|"
],
"terrain": { " ": "t_open_air", "|": "t_gutter_north", "-": "t_gutter_west", "Ю": "t_gutter_drop", ".": "t_flat_roof" }
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mechanical_fluid",
"object": {
"mapgensize": [ 1, 1 ],
"place_fields": [ { "field": "fd_mechanical_fluid", "x": 0, "y": 0, "intensity": 1, "age": 10 } ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "gasoline_diesel_motor_oil",
"object": {
"mapgensize": [ 1, 1 ],
"place_liquids": [
{ "liquid": "gasoline", "x": 0, "y": 0, "chance": 20 },
{ "liquid": "diesel", "x": 0, "y": 0, "chance": 20 },
{ "liquid": "motor_oil", "x": 0, "y": 0, "chance": 20 }
]
}
}
]
88 changes: 88 additions & 0 deletions data/json/mapgen/mine/mine_shaft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[
{
"type": "mapgen",
"method": "json",
"om_terrain": "mine_shaft_middle",
"object": {
"fill_ter": "t_rock",
"rows": [
" <# ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" # ",
" ....#># ",
" ....### ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
],
"terrain": { "<": "t_ladder_up", ">": "t_ladder_down", "#": "t_grate", ".": "t_hole" }
}
},
{
"type": "mapgen",
"method": "json",
"om_terrain": "mine_shaft_lower",
"object": {
"fill_ter": "t_rock_floor",
"rows": [
"###### ## ########",
"####### ##########",
"######## ##########",
"######## ########",
" ###### #########",
" ## ##########",
"# ########## ",
" ###### ######### ",
"######## #### #",
"###### ",
"###### ######",
"##### ######",
"### |------| ######",
"# |!@@..<|-| ###",
" |.@@....S| ",
"### |---....S| #",
" +.......S| ",
" |.......S| ####",
"## |LLLLLL|-| ######",
"#### |------| ######",
"###### ######",
"####### ## #######",
"######## ## #######",
"######### # ########"
],
"terrain": {
"<": "t_ladder_up",
"-": "t_wall",
"|": "t_wall",
".": "t_thconc_floor",
"+": "t_door_metal_c",
"!": "t_elevator_control",
"@": "t_elevator",
"#": [ [ "t_rock", 4 ], [ "t_rock_floor", 1 ] ],
"L": "t_thconc_floor",
"S": "t_thconc_floor"
},
"furniture": { "L": "f_locker", "S": "f_utility_shelf" },
"items": {
"L": [ { "item": "clothing_work_set", "chance": 50 }, { "item": "hardware_clothing", "chance": 50 } ],
"S": { "item": "mine_equipment", "chance": 80 }
}
}
}
]
24 changes: 24 additions & 0 deletions data/json/monsterdrops/zombie_technician.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,29 @@
{ "group": "supplies_electronics", "prob": 50 },
{ "item": "id_industrial", "prob": 20 }
]
},
{
"id": "mon_zombie_miner_death_drops",
"type": "item_group",
"subtype": "collection",
"entries": [
{ "group": "clothing_work_boots", "damage": [ 1, 4 ] },
{ "group": "clothing_work_glasses", "prob": 60, "damage": [ 1, 4 ] },
{ "group": "clothing_work_gloves", "prob": 75, "damage": [ 1, 4 ] },
{ "group": "clothing_work_mask", "prob": 40, "damage": [ 1, 4 ] },
{ "item": "ear_plugs", "prob": 15, "damage": [ 1, 4 ] },
{ "item": "tool_belt", "prob": 25, "damage": [ 1, 4 ] },
{
"distribution": [
{
"collection": [ { "group": "clothing_work_pants", "damage": [ 1, 4 ] }, { "group": "clothing_work_torso", "damage": [ 1, 4 ] } ],
"prob": 75
},
{ "item": "jumpsuit", "prob": 25, "damage": [ 1, 4 ] }
]
},
{ "group": "underwear", "damage": [ 1, 4 ] },
{ "item": "miner_hat", "prob": 90, "damage": [ 1, 4 ] }
]
}
]
35 changes: 35 additions & 0 deletions data/json/monsters/zed_misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,41 @@
"RANGED_ATTACKER"
]
},
{
"id": "mon_zombie_miner",
"type": "MONSTER",
"name": { "str": "zombie miner" },
"description": "This zombie's face, hands, work clothes, and miner's helmet are fully covered with stains of coal dust.",
"default_faction": "zombie",
"looks_like": "mon_zombie_technician",
"bodytype": "human",
"species": [ "ZOMBIE", "HUMAN" ],
"diff": 2,
"volume": "62500 ml",
"weight": "81500 g",
"hp": 85,
"speed": 75,
"material": [ "flesh" ],
"symbol": "Z",
"color": "i_light_cyan",
"aggression": 70,
"morale": 100,
"melee_skill": 5,
"melee_dice": 2,
"melee_dice_sides": 3,
"melee_cut": 0,
"dodge": 1,
"armor_bash": 2,
"armor_cut": 2,
"armor_bullet": 2,
"vision_day": 15,
"vision_night": 2,
"harvest": "zombie",
"special_attacks": [ { "type": "bite", "cooldown": 20 } ],
"death_drops": "mon_zombie_miner_death_drops",
"death_function": [ "NORMAL" ],
"flags": [ "SEES", "HEARS", "SMELLS", "WARM", "BASHES", "GROUP_BASH", "POISON", "NO_BREATHE", "REVIVES", "FILTHY" ]
},
{
"id": "mon_zombie_thorny",
"type": "MONSTER",
Expand Down
4 changes: 3 additions & 1 deletion data/json/obsolete_terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"office_tower_1_entrance",
"office_tower_1",
"office_tower_b_entrance",
"office_tower_b"
"office_tower_b",
"mine_entrance",
"mine_shaft"
]
}
]
8 changes: 7 additions & 1 deletion data/json/overmap/overmap_special/specials.json
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,13 @@
{
"type": "overmap_special",
"id": "Mine Entrance",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "s_lot_north" }, { "point": [ 0, 1, 0 ], "overmap": "mine_entrance" } ],
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "s_lot_north" },
{ "point": [ 0, 1, 0 ], "overmap": "mine_entrance_north" },
{ "point": [ 0, 1, 1 ], "overmap": "mine_entrance_roof_north" },
{ "point": [ 0, 1, -1 ], "overmap": "mine_shaft_middle_north" },
{ "point": [ 0, 1, -2 ], "overmap": "mine_shaft_lower_north" }
],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road", "from": [ 0, 0, 0 ] } ],
"locations": [ "wilderness" ],
"city_distance": [ 10, 40 ],
Expand Down
Loading

0 comments on commit d03baa8

Please sign in to comment.