diff --git a/data/json/furniture_and_terrain/terrain-manufactured.json b/data/json/furniture_and_terrain/terrain-manufactured.json index cbd9bcb2f04e..21063f6997e0 100644 --- a/data/json/furniture_and_terrain/terrain-manufactured.json +++ b/data/json/furniture_and_terrain/terrain-manufactured.json @@ -255,6 +255,93 @@ "items": [ { "item": "steel_chunk", "count": [ 1, 3 ] }, { "item": "scrap", "count": [ 4, 8 ] } ] } }, + { + "type": "terrain", + "id": "t_secure_locker_l", + "name": "locked secure locker", + "description": "A reinforced locker most commonly used for storing cargo or military equipment. This one is locked.", + "symbol": "X", + "color": "light_gray", + "looks_like": "f_locker", + "move_cost": 0, + "coverage": 75, + "max_volume": "500 L", + "flags": [ "TRANSPARENT", "CONTAINER", "SEALED", "PLACE_ITEM", "MOUNTABLE", "MINEABLE", "BLOCKSDOOR" ], + "lockpick_result": "t_secure_locker_c", + "lockpick_message": "With a satisfying click, the lock on the secure locker opens.", + "examine_action": "locked_object_pickable", + "oxytorch": { "result": "t_secure_locker_o", "duration": "10 seconds" }, + "bash": { + "ter_set": "t_floor", + "str_min": 40, + "str_max": 100, + "sound": "screeching metal!", + "sound_fail": "clang!", + "items": [ + { "item": "sheet_metal", "count": 3 }, + { "item": "scrap", "count": [ 7, 15 ] }, + { "item": "sheet_metal_small", "count": [ 9, 16 ] }, + { "item": "pipe", "count": [ 2, 5 ] } + ], + "ranged": { "reduction": [ 20, 40 ], "destroy_threshold": 100, "block_unaimed_chance": "75%" } + } + }, + { + "type": "terrain", + "id": "t_secure_locker_c", + "name": "closed secure locker", + "description": "A reinforced locker most commonly used for storing cargo or military equipment. This one is closed but not locked.", + "symbol": "X", + "color": "light_gray", + "looks_like": "f_locker", + "move_cost": 0, + "coverage": 75, + "max_volume": "500 L", + "open": "t_secure_locker_o", + "flags": [ "TRANSPARENT", "CONTAINER", "SEALED", "PLACE_ITEM", "MOUNTABLE", "MINEABLE", "BLOCKSDOOR" ], + "bash": { + "ter_set": "t_floor", + "str_min": 40, + "str_max": 100, + "sound": "screeching metal!", + "sound_fail": "clang!", + "items": [ + { "item": "sheet_metal", "count": 3 }, + { "item": "scrap", "count": [ 7, 15 ] }, + { "item": "sheet_metal_small", "count": [ 9, 16 ] }, + { "item": "pipe", "count": [ 2, 5 ] } + ], + "ranged": { "reduction": [ 20, 40 ], "destroy_threshold": 100, "block_unaimed_chance": "75%" } + } + }, + { + "type": "terrain", + "id": "t_secure_locker_o", + "name": "open secure locker", + "description": "A reinforced locker most commonly used for storing cargo or military equipment. This one is open.", + "symbol": "X", + "looks_like": "f_locker", + "color": "light_gray", + "move_cost": 0, + "coverage": 75, + "max_volume": "500 L", + "close": "t_secure_locker_c", + "flags": [ "TRANSPARENT", "CONTAINER", "PLACE_ITEM", "MOUNTABLE", "MINEABLE", "BLOCKSDOOR" ], + "bash": { + "ter_set": "t_floor", + "str_min": 40, + "str_max": 100, + "sound": "screeching metal!", + "sound_fail": "clang!", + "items": [ + { "item": "sheet_metal", "count": 3 }, + { "item": "scrap", "count": [ 7, 15 ] }, + { "item": "sheet_metal_small", "count": [ 9, 16 ] }, + { "item": "pipe", "count": [ 2, 5 ] } + ], + "ranged": { "reduction": [ 20, 40 ], "destroy_threshold": 100, "block_unaimed_chance": "75%" } + } + }, { "type": "terrain", "id": "t_metal_ventilation_shutter", diff --git a/data/json/items/comestibles/mushroom.json b/data/json/items/comestibles/mushroom.json index 4ee2d4073883..787e46808c56 100644 --- a/data/json/items/comestibles/mushroom.json +++ b/data/json/items/comestibles/mushroom.json @@ -94,6 +94,7 @@ "comestible_type": "FOOD", "symbol": "%", "healthy": 1, + "charges": 10, "calories": 15, "description": "Mushrooms are tasty, but be careful. Some can poison you, while others are hallucinogenic.", "price": "140 cent", @@ -104,6 +105,7 @@ "charges": 10, "flags": [ "SMOKABLE", "FORAGE_POISON", "FORAGE_HALLU", "RAW" ], "smoking_result": "dry_mushroom", + "//": "if we ever implement macro nutritients, mushrooms should be a good protein source.", "vitamins": [ [ "vitC", 2 ], [ "iron", 2 ] ] } ] diff --git a/src/computer.cpp b/src/computer.cpp index 30709df19323..e52f28a78edc 100644 --- a/src/computer.cpp +++ b/src/computer.cpp @@ -313,6 +313,7 @@ std::string enum_to_string( const computer_action act ) case COMPACT_MISS_DISARM: return "miss_disarm"; case COMPACT_OPEN: return "open"; case COMPACT_OPEN_DISARM: return "open_disarm"; + case COMPACT_OPEN_LOCKER: return "open_locker"; case COMPACT_PORTAL: return "portal"; case COMPACT_RADIO_ARCHIVE: return "radio_archive"; case COMPACT_RELEASE: return "release"; diff --git a/src/computer.h b/src/computer.h index 109fed3349c8..2fb67eb3bc8a 100644 --- a/src/computer.h +++ b/src/computer.h @@ -37,6 +37,7 @@ enum computer_action { COMPACT_MISS_DISARM, COMPACT_OPEN, COMPACT_OPEN_DISARM, + COMPACT_OPEN_LOCKER, COMPACT_PORTAL, COMPACT_RADIO_ARCHIVE, COMPACT_RELEASE, diff --git a/src/computer_session.cpp b/src/computer_session.cpp index 5404cc4d84a0..257e1e582ad4 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -274,6 +274,7 @@ computer_session::computer_action_functions = { { COMPACT_MAPS, &computer_session::action_maps }, { COMPACT_MISS_DISARM, &computer_session::action_miss_disarm }, { COMPACT_OPEN, &computer_session::action_open }, + { COMPACT_OPEN_LOCKER, &computer_session::action_open_locker }, { COMPACT_OPEN_DISARM, &computer_session::action_open_disarm }, { COMPACT_PORTAL, &computer_session::action_portal }, { COMPACT_RADIO_ARCHIVE, &computer_session::action_radio_archive }, @@ -322,6 +323,11 @@ void computer_session::action_open() get_map().translate_radius( t_door_metal_locked, t_floor, 25.0, g->u.pos(), true ); query_any( _( "Doors opened. Press any key…" ) ); } +void computer_session::action_open_locker() +{ + get_map().translate_radius( t_secure_locker_l, t_secure_locker_o, 8.0, g->u.pos(), true ); + query_any( _( "Lockers opened. Press any key…" ) ); +} //LOCK AND UNLOCK are used to build more complex buildings // that can have multiple doors that can be locked and be diff --git a/src/computer_session.h b/src/computer_session.h index ac12ae5a6e51..e2b02ac8d34d 100644 --- a/src/computer_session.h +++ b/src/computer_session.h @@ -102,6 +102,7 @@ class computer_session void action_miss_disarm(); void action_open(); void action_open_disarm(); + void action_open_locker(); void action_portal(); void action_radio_archive(); void action_release(); diff --git a/src/mapdata.cpp b/src/mapdata.cpp index a14042f658ce..2a9510cf50ba 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -713,6 +713,7 @@ ter_id t_null, t_sewage_pipe, t_sewage_pump, t_centrifuge, t_column, + t_secure_locker_l, t_secure_locker_o, t_vat, t_rootcellar, t_cvdbody, t_cvdmachine, @@ -888,6 +889,8 @@ void set_ter_ids() t_paper = ter_id( "t_paper" ); t_rock_wall = ter_id( "t_rock_wall" ); t_rock_wall_half = ter_id( "t_rock_wall_half" ); + t_secure_locker_l = ter_id( "t_secure_locker_l" ); + t_secure_locker_o = ter_id( "t_secure_locker_o" ); t_tree = ter_id( "t_tree" ); t_tree_young = ter_id( "t_tree_young" ); t_tree_apple = ter_id( "t_tree_apple" ); diff --git a/src/mapdata.h b/src/mapdata.h index f8bdd50a8e6f..5c69e717f4fc 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -648,7 +648,7 @@ extern ter_id t_null, // Ground t_dirt, t_sand, t_clay, t_dirtmound, t_pit_shallow, t_pit, t_grave, t_grave_new, t_pit_corpsed, t_pit_covered, t_pit_spiked, t_pit_spiked_covered, t_pit_glass, t_pit_glass_covered, - t_rock_floor, + _floor, t_grass, t_grass_long, t_grass_tall, t_grass_golf, t_grass_dead, t_grass_white, t_moss, t_metal_floor, t_pavement, t_pavement_y, t_sidewalk, t_concrete, @@ -660,6 +660,7 @@ extern ter_id t_null, t_slime, t_bridge, t_covered_well, + t_rock_floor, // Lighting related t_utility_light, // Walls @@ -690,9 +691,11 @@ extern ter_id t_null, t_window_boarded_noglass, t_window_bars_alarm, t_window_bars, t_window_stained_green, t_window_stained_red, t_window_stained_blue, t_window_no_curtains, t_window_no_curtains_open, t_window_no_curtains_taped, - t_rock, t_fault, + t_fault, + t_rock, t_paper, t_rock_wall, t_rock_wall_half, + t_secure_locker_l, t_secure_locker_o, // Tree t_tree, t_tree_young, t_tree_apple, t_tree_apple_harvested, t_tree_coffee, t_tree_coffee_harvested, t_tree_pear, t_tree_pear_harvested,