Skip to content

Commit

Permalink
Port over migration and tool use of centrifuges
Browse files Browse the repository at this point in the history
Sources:
1. Migration of centrifuge from terrain to furniture, by I-am-Erk: CleverRaven/Cataclysm-DDA#41731
2. Fixing what the above PR broke, by johnstoecker: CleverRaven/Cataclysm-DDA#43361
3. Making centrifuges useful for separation, by zachary-kaelan: CleverRaven/Cataclysm-DDA#34344
  • Loading branch information
chaosvolt committed Mar 6, 2022
1 parent 732d14c commit 3952c69
Show file tree
Hide file tree
Showing 23 changed files with 121 additions and 88 deletions.
41 changes: 41 additions & 0 deletions data/json/furniture_and_terrain/furniture-medical.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,5 +901,46 @@
{ "item": "scrap", "count": [ 2, 7 ] }
]
}
},
{
"type": "furniture",
"id": "f_centrifuge",
"name": "centrifuge",
"looks_like": "t_centrifuge",
"description": "This is a centrifuge, a liquid separating device with an automated analyzer unit. For some reason, this one has an attached battery pack. It could be used to analyze a medical fluid sample, such as blood, if a test tube was placed in it. It could also be used for separating and analyzing other samples, if you have a use for that.",
"symbol": "{",
"color": "magenta",
"move_cost_mod": -1,
"coverage": 30,
"crafting_pseudo_item": "fake_centrifuge",
"required_str": -1,
"flags": [ "TRANSPARENT", "PERMEABLE" ],
"deconstruct": {
"items": [
{ "item": "circuit", "count": 4 },
{ "item": "scrap", "count": 5 },
{ "item": "motor_small", "count": 1 },
{ "item": "spectrophotometer", "count": 1 },
{ "item": "storage_battery", "count": 1 },
{ "item": "betavoltaic", "count": [ 1, 4 ] },
{ "item": "steel_chunk", "count": 3 },
{ "item": "sheet_metal", "count": 3 },
{ "item": "cable", "charges": 5 }
]
},
"bash": {
"str_min": 3,
"str_max": 45,
"sound": "crunch!",
"sound_fail": "whack!",
"items": [
{ "item": "e_scrap", "count": [ 1, 4 ], "prob": 50 },
{ "item": "circuit", "count": [ 1, 6 ], "prob": 50 },
{ "item": "scrap", "count": [ 2, 5 ] },
{ "item": "steel_chunk", "count": [ 0, 3 ] },
{ "item": "sheet_metal", "count": [ 1, 3 ] },
{ "item": "cable", "charges": [ 1, 15 ] }
]
}
}
]
26 changes: 0 additions & 26 deletions data/json/furniture_and_terrain/terrain-manufactured.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,32 +432,6 @@
]
}
},
{
"type": "terrain",
"id": "t_centrifuge",
"name": "centrifuge",
"description": "This is a centrifuge, a liquid separating device with an automated analyzer unit. It could be used to analyze a medical fluid sample, such as blood, if a test tube was placed in it.",
"symbol": "{",
"color": "magenta",
"move_cost": 0,
"coverage": 30,
"flags": [ "TRANSPARENT", "PERMEABLE" ],
"bash": {
"str_min": 3,
"str_max": 45,
"sound": "crunch!",
"sound_fail": "whack!",
"ter_set": "t_rock_floor",
"items": [
{ "item": "e_scrap", "count": [ 1, 4 ], "prob": 50 },
{ "item": "circuit", "count": [ 1, 6 ], "prob": 50 },
{ "item": "scrap", "count": [ 2, 5 ] },
{ "item": "steel_chunk", "count": [ 0, 3 ] },
{ "item": "sheet_metal", "count": [ 1, 3 ] },
{ "item": "cable", "charges": [ 1, 15 ] }
]
}
},
{
"type": "terrain",
"id": "t_cvdbody",
Expand Down
7 changes: 7 additions & 0 deletions data/json/items/fake.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@
"dispersion": 1000,
"ranged_damage": { "damage_type": "stab", "amount": 30 }
},
{
"id": "fake_centrifuge",
"copy-from": "fake_item",
"type": "TOOL",
"name": "centrifuge",
"qualities": [ [ "CONCENTRATE", 1 ], [ "SEPARATE", 1 ], [ "ANALYSIS", 1 ] ]
},
{
"id": "fake_oven",
"copy-from": "fake_item",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/science.json
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@
"to_hit": -5,
"bashing": 2,
"material": [ "aluminum", "steel", "plastic" ],
"looks_like": "t_centrifuge",
"looks_like": "f_centrifuge",
"symbol": "n",
"color": "white",
"ammo": "battery",
Expand Down
2 changes: 1 addition & 1 deletion data/json/mapgen/basement/basement_lab_stairs.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
",": "t_rock_floor",
"6": "t_card_science",
"7": "t_rock_floor",
"C": "t_centrifuge",
"<": "t_stairs_up",
">": "t_stairs_down"
},
"furniture": { "C": "f_centrifuge" },
"mapping": { "c": { "items": { "item": "chem_lab", "chance": 30 } }, "d": { "items": { "item": "office", "chance": 30 } } },
"monster": { "7": { "monster": "mon_turret_light" } },
"place_nested": [
Expand Down
11 changes: 2 additions & 9 deletions data/json/mapgen/lab/lab_floorplan_cross.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,10 @@
"-----------MM----------|"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"//": "Todo: add f_centrifuge once t_console_broken and t_generator_broken are converted to furniture.",
"terrain": {
"?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ],
"!": [
"t_thconc_floor",
"t_thconc_floor",
"t_thconc_floor",
"t_thconc_floor",
"t_console_broken",
"t_generator_broken",
"t_centrifuge"
]
"!": [ "t_thconc_floor", "t_thconc_floor", "t_thconc_floor", "t_thconc_floor", "t_console_broken", "t_generator_broken" ]
},
"place_nested": [
{
Expand Down
19 changes: 10 additions & 9 deletions data/json/mapgen/lab/lab_floorplans.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@
"rrr.....!.....l|-------|"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"furniture": { "f": "f_null" },
"furniture": { "f": "f_null", "C": "f_centrifuge" },
"terrain": {
"?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ],
"!": [ "t_thconc_floor", "t_thconc_floor", "t_console_broken", "t_generator_broken" ],
"C": "t_centrifuge"
"C": "t_thconc_floor"
},
"mapping": {
"c": { "items": [ { "item": "chem_lab", "chance": 10 }, { "item": "tools_science", "chance": 10 } ] },
Expand Down Expand Up @@ -533,10 +533,10 @@
"........................"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch" },
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch", "C": "f_centrifuge" },
"terrain": {
",": "t_floor_blue",
"C": "t_centrifuge",
"C": "t_floor_blue",
"?": "t_floor_blue",
"/": "t_floor_blue",
"7": "t_console",
Expand Down Expand Up @@ -614,12 +614,12 @@
],
"palettes": [ "lab_palette" ],
"terrain": {
"C": "t_centrifuge",
"C": "t_floor",
"?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ],
"7": "t_floor",
"8": "t_floor"
},
"furniture": { "7": "f_autodoc", "8": "f_autodoc_couch" },
"furniture": { "7": "f_autodoc", "8": "f_autodoc_couch", "C": "f_centrifuge" },
"items": {
"b": { "item": "hospital_bed", "chance": 33 },
"l": { "item": "surgery", "chance": 50 },
Expand Down Expand Up @@ -685,7 +685,8 @@
"........................"
],
"palettes": [ "lab_palette" ],
"terrain": { "C": "t_centrifuge", "7": "t_console", ",": "t_floor_blue" },
"furniture": { "C": "f_centrifuge" },
"terrain": { "C": "t_floor_blue", "7": "t_console", ",": "t_floor_blue" },
"mapping": {
"c": { "items": [ { "item": "office", "chance": 30 }, { "item": "tools_science", "chance": 15 } ] },
"l": { "items": [ { "item": "science", "chance": 60 } ] }
Expand Down Expand Up @@ -831,14 +832,14 @@
".........|....|---------"
],
"palettes": [ "lab_palette", "lab_loot_home_office" ],
"furniture": { "^": "f_indoor_plant" },
"furniture": { "^": "f_indoor_plant", "C": "f_centrifuge" },
"terrain": {
"E": "t_elevator",
"e": "t_elevator_control_off",
"w": "t_water_sh",
"W": "t_water_dp",
"=": "t_door_lab_c",
"C": "t_centrifuge"
"C": "t_thconc_floor"
},
"mapping": { "t": { "items": [ { "item": "vending_food_items", "chance": 20 } ] } },
"place_loot": [
Expand Down
4 changes: 2 additions & 2 deletions data/json/mapgen/lab/lab_floorplans_1side.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@
{ "monster": "mon_zombie_grabber", "x": [ 1, 5 ], "y": [ 12, 15 ] },
{ "monster": "mon_zombie_scientist", "x": [ 11, 12 ], "y": [ 5, 10 ], "pack_size": [ 1, 2 ], "chance": 50 }
],
"furniture": { "^": "f_indoor_plant" },
"terrain": { "7": "t_console", "C": "t_centrifuge" },
"furniture": { "^": "f_indoor_plant", "C": "f_centrifuge" },
"terrain": { "7": "t_console", "C": "t_strconc_floor" },
"mapping": {
"X": { "items": [ { "item": "softdrugs", "chance": 40 }, { "item": "harddrugs", "chance": 30 } ] },
"r": { "items": [ { "item": "softdrugs", "chance": 40 }, { "item": "harddrugs", "chance": 30 } ] },
Expand Down
8 changes: 4 additions & 4 deletions data/json/mapgen/lab/lab_floorplans_finale1level.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"........................"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch" },
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch", "C": "f_centrifuge" },
"terrain": {
",": "t_floor_blue",
"C": "t_centrifuge",
"C": "t_floor_blue",
"?": "t_floor_blue",
"/": "t_floor_blue",
"7": "t_console",
Expand Down Expand Up @@ -232,8 +232,8 @@
"........................"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"furniture": { "V": "f_standing_tank" },
"terrain": { ",": "t_floor_blue", "V": "t_floor_blue", "C": "t_centrifuge" },
"furniture": { "V": "f_standing_tank", "C": "f_centrifuge" },
"terrain": { ",": "t_floor_blue", "V": "t_floor_blue", "C": "t_floor_blue" },
"mapping": { "c": { "items": [ { "item": "mut_lab", "chance": 50 } ] } },
"computers": {
"6": {
Expand Down
15 changes: 4 additions & 11 deletions data/json/mapgen/lab/lab_rooms.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@
"........."
],
"palettes": [ "lab_palette" ],
"terrain": { "C": [ "t_centrifuge" ] }
"terrain": { "C": [ "t_thconc_floor" ] },
"furniture": { "C": [ "f_centrifuge" ] }
}
},
{
Expand Down Expand Up @@ -729,19 +730,11 @@
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "sub_t_machinery",
"//": "Todo: add f_centrifuge once all of the below terrain are converted to furniture.",
"object": {
"mapgensize": [ 1, 1 ],
"rows": [ "A" ],
"terrain": {
"A": [
"t_machinery_heavy",
"t_machinery_heavy",
"t_machinery_electronic",
"t_machinery_light",
"t_centrifuge",
"t_console_broken"
]
}
"terrain": { "A": [ "t_machinery_heavy", "t_machinery_heavy", "t_machinery_electronic", "t_machinery_light", "t_console_broken" ] }
}
},
{
Expand Down
5 changes: 3 additions & 2 deletions data/json/mapgen_palettes/fema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"s": "t_floor",
"w": [ "t_window_domestic", "t_curtains", "t_curtains" ],
"6": "t_console_broken",
"7": "t_centrifuge"
"7": "t_floor"
},
"furniture": {
"=": "f_canvas_wall",
Expand Down Expand Up @@ -59,7 +59,8 @@
"U": "f_cupboard",
"W": "f_woodstove",
"x": "f_crate_o",
"X": "f_crate_c"
"X": "f_crate_c",
"7": "f_centrifuge"
},
"toilets": { "&": { "amount": [ 0, 50 ] } },
"items": {
Expand Down
3 changes: 2 additions & 1 deletion data/json/mapgen_palettes/hospital.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"`": "t_thconc_floor",
"+": "t_door_c",
"!": "t_door_locked_interior",
"*": "t_centrifuge",
"*": "t_floor",
"6": "t_console",
"7": "t_console",
"S": "t_floor",
Expand All @@ -44,6 +44,7 @@
"?": "t_floor"
},
"furniture": {
"*": "f_centrifuge",
"b": "f_bench",
"c": "f_chair",
"B": "f_bed",
Expand Down
2 changes: 1 addition & 1 deletion data/json/mapgen_palettes/lab_surface_palette.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"=": "t_door_glass_frosted_lab_c",
":": "t_reinforced_glass",
"m": "t_door_metal_c",
"o": "t_centrifuge",
"x": "t_console_broken"
},
"furniture": {
Expand Down Expand Up @@ -159,6 +158,7 @@
"M": "f_MS",
"N": "f_NMR",
"O": "f_MRI",
"o": "f_centrifuge",
"0": "f_CTscan",
"r": "f_rack",
"s": "f_stool",
Expand Down
26 changes: 26 additions & 0 deletions data/json/obsoletion/uncategorized.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,5 +363,31 @@
"install": { "skills": [ [ "mechanics", 5 ], [ "electronics", 5 ] ] },
"removal": { "skills": [ [ "mechanics", 3 ] ] }
}
},
{
"type": "terrain",
"id": "t_centrifuge",
"name": "centrifuge",
"description": "This is a centrifuge, a liquid separating device with an automated analyzer unit. It could be used to analyze a medical fluid sample, such as blood, if a test tube was placed in it.",
"symbol": "{",
"color": "magenta",
"move_cost": 0,
"coverage": 30,
"flags": [ "TRANSPARENT", "PERMEABLE" ],
"bash": {
"str_min": 3,
"str_max": 45,
"sound": "crunch!",
"sound_fail": "whack!",
"ter_set": "t_rock_floor",
"items": [
{ "item": "e_scrap", "count": [ 1, 4 ], "prob": 50 },
{ "item": "circuit", "count": [ 1, 6 ], "prob": 50 },
{ "item": "scrap", "count": [ 2, 5 ] },
{ "item": "steel_chunk", "count": [ 0, 3 ] },
{ "item": "sheet_metal", "count": [ 1, 3 ] },
{ "item": "cable", "charges": [ 1, 15 ] }
]
}
}
]
3 changes: 2 additions & 1 deletion data/mods/Aftershock/maps/mapgen/millyficent_lab.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"=": "t_door_glass_frosted_lab_c",
":": "t_reinforced_glass",
"m": "t_door_metal_c",
"o": "t_centrifuge",
"o": "t_floor",
"x": "t_console_broken",
"*": "t_thconc_floor_olight",
"w": "t_window_bars_curtains",
Expand Down Expand Up @@ -275,6 +275,7 @@
"M": "f_MS",
"N": "f_NMR",
"O": "f_MRI",
"o": "f_centrifuge",
"0": "f_CTscan",
"P": "f_dishwasher",
"r": "f_rack",
Expand Down
4 changes: 2 additions & 2 deletions data/mods/DinoMod/mapgen/DinoLabFinale.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"........................"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch" },
"furniture": { "?": "f_autodoc", "/": "f_autodoc_couch", "C": "f_centrifuge" },
"terrain": {
",": "t_floor_blue",
"C": "t_centrifuge",
"C": "t_floor_blue",
"?": "t_floor_blue",
"/": "t_floor_blue",
"7": "t_console",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
],
"rotation": 2,
"palettes": [ "tri_tower", "upper_level", "bandit_tower_stuff" ],
"terrain": { "3": "t_centrifuge", "5": "t_pavement", "8": "t_bridge" },
"furniture": { "j": "f_displaycase", "p": "f_indoor_plant_y", "z": "f_statue" },
"terrain": { "3": "t_floor", "5": "t_pavement", "8": "t_bridge" },
"furniture": { "3": "f_centrifuge", "j": "f_displaycase", "p": "f_indoor_plant_y", "z": "f_statue" },
"items": {
"d": [ { "item": "fancyfurs", "chance": 30 }, { "item": "art", "chance": 30 } ],
"j": { "item": "museum_melee", "chance": 30 },
Expand Down
Loading

0 comments on commit 3952c69

Please sign in to comment.