diff --git a/data/json/construction.json b/data/json/construction.json index eb0efc5dc9345..306424fd9555c 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -1988,6 +1988,17 @@ "pre_terrain": "t_window_alarm", "post_terrain": "t_window_bars_alarm" }, + { + "type": "construction", + "description": "Install Bars Onto Window", + "category": "CONSTRUCT", + "required_skills": [ [ "fabrication", 2 ] ], + "time": "30 m", + "qualities": [ [ { "id": "SAW_W", "level": 1 } ], [ { "id": "HAMMER", "level": 2 } ] ], + "components": [ [ [ "nail", 4 ] ], [ [ "sheet", 2 ] ], [ [ "stick", 1 ] ], [ [ "string_36", 1 ] ] ], + "pre_terrain": "t_window_bars", + "post_terrain": "t_window_bars_curtains" + }, { "type": "construction", "description": "Build Large Metal Support", diff --git a/data/json/furniture_and_terrain/terrain-windows.json b/data/json/furniture_and_terrain/terrain-windows.json index 1452fec5999a0..3d5a9f3c42b92 100644 --- a/data/json/furniture_and_terrain/terrain-windows.json +++ b/data/json/furniture_and_terrain/terrain-windows.json @@ -571,6 +571,65 @@ "items": [ { "item": "glass_shard", "count": [ 34, 50 ] } ] } }, + { + "type": "terrain", + "id": "t_window_bars_curtains", + "name": "window with metal bars and curtains", + "description": "A barred window with fancy curtains that have been drawn shut, blocking sunlight and visibility. The curtains can only be opened on the inside. If you examined the curtains more closely, you could peek through the drapes or tear down everything.", + "symbol": "\"", + "looks_like": "t_curtains", + "color": "light_gray", + "move_cost": 0, + "coverage": 95, + "roof": "t_flat_roof", + "flags": [ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND" ], + "examine_action": "curtains", + "open": "t_window_bars_domestic", + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_bars", + "items": [ + { "item": "glass_shard", "count": [ 34, 50 ] }, + { "item": "sheet", "count": 2 }, + { "item": "stick", "count": 1 }, + { "item": "string_36", "count": 1 } + ] + } + }, + { + "type": "terrain", + "id": "t_window_bars_domestic", + "name": "window with metal bars and curtains", + "description": "A giant sheet of glass inserted into a window with thick security grilles, making it impossible to crawl through. Typically installed for high-value stores, or at least stores in bad neighborhoods. This one has been retrofitted with curtains.", + "symbol": "#", + "looks_like": "t_window_bars", + "color": "light_gray", + "move_cost": 0, + "roof": "t_flat_roof", + "flags": [ "TRANSPARENT", "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", "CONNECT_TO_WALL" ], + "examine_action": "curtains", + "close": "t_window_bars_curtains", + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_bars", + "items": [ + { "item": "glass_shard", "count": [ 34, 50 ] }, + { "item": "sheet", "count": 2 }, + { "item": "stick", "count": 1 }, + { "item": "string_36", "count": 1 } + ] + } + }, { "type": "terrain", "id": "t_window_stained_green", diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 49e06d07ace1c..523663f6c22de 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -3753,6 +3753,8 @@ void iexamine::curtains( player &p, const tripoint &examp ) g->m.ter_set( examp, t_window_no_curtains_open ); } else if( ter == t_window_domestic_taped ) { g->m.ter_set( examp, t_window_no_curtains_taped ); + } else if( ter == t_window_bars_domestic || ter == t_window_bars_curtains ) { + g->m.ter_set( examp, t_window_bars ); } g->m.spawn_item( p.pos(), "nail", 1, 4, calendar::turn ); diff --git a/src/mapdata.cpp b/src/mapdata.cpp index d9579265ff03f..522a261cfe2bc 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -520,7 +520,7 @@ ter_id t_null, t_door_glass_c, t_door_glass_o, t_door_glass_frosted_c, t_door_glass_frosted_o, t_portcullis, t_recycler, t_window, t_window_taped, t_window_domestic, t_window_domestic_taped, t_window_open, - t_curtains, + t_curtains, t_window_bars_curtains, t_window_bars_domestic, t_window_alarm, t_window_alarm_taped, t_window_empty, t_window_frame, t_window_boarded, t_window_boarded_noglass, t_window_reinforced, t_window_reinforced_noglass, t_window_enhanced, t_window_enhanced_noglass, t_window_bars_alarm, t_window_bars, @@ -712,8 +712,10 @@ void set_ter_ids() t_window_taped = ter_id( "t_window_taped" ); t_window_domestic = ter_id( "t_window_domestic" ); t_window_domestic_taped = ter_id( "t_window_domestic_taped" ); + t_window_bars_domestic = ter_id( "t_window_bars_domestic" ); t_window_open = ter_id( "t_window_open" ); t_curtains = ter_id( "t_curtains" ); + t_window_bars_curtains = ter_id( "t_window_bars_curtains" ); t_window_alarm = ter_id( "t_window_alarm" ); t_window_alarm_taped = ter_id( "t_window_alarm_taped" ); t_window_empty = ter_id( "t_window_empty" ); diff --git a/src/mapdata.h b/src/mapdata.h index 864f5a17640e0..bb1f1d138bad2 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -434,7 +434,7 @@ extern ter_id t_null, t_door_glass_c, t_door_glass_o, t_door_glass_frosted_c, t_door_glass_frosted_o, t_portcullis, t_recycler, t_window, t_window_taped, t_window_domestic, t_window_domestic_taped, t_window_open, - t_curtains, + t_curtains, t_window_bars_curtains, t_window_bars_domestic, t_window_alarm, t_window_alarm_taped, t_window_empty, t_window_frame, t_window_boarded, t_window_boarded_noglass, t_window_bars_alarm, t_window_bars, t_window_stained_green, t_window_stained_red, t_window_stained_blue,