From 57c6bbd1c54f01c49523396c53c335c39c508624 Mon Sep 17 00:00:00 2001 From: Milopetilo <78963720+Milopetilo@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:15:37 +0100 Subject: [PATCH 1/3] Add windows --- .../terrain-windows.json | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) diff --git a/data/json/furniture_and_terrain/terrain-windows.json b/data/json/furniture_and_terrain/terrain-windows.json index 7f324b5690b2f..487cd823f2f73 100644 --- a/data/json/furniture_and_terrain/terrain-windows.json +++ b/data/json/furniture_and_terrain/terrain-windows.json @@ -454,6 +454,285 @@ }, "shoot": { "reduce_damage": [ 1, 6 ], "reduce_damage_laser": [ 2, 10 ], "destroy_damage": [ 2, 8 ], "no_laser_destroy": true } }, + { + "type": "terrain", + "id": "t_window_domestic_alarm", + "name": "window with curtains", + "looks_like": "t_window_domestic", + "description": "A closed window with fancy curtains on the inside that can be drawn closed to block visibility and shut out any light.", + "symbol": "\"", + "color": "light_gray", + "move_cost": 0, + "coverage": 60, + "roof": "t_flat_roof", + "connect_groups": "WALL", + "connects_to": "WALL", + "rotates_to": "INDOORFLOOR", + "flags": [ + "TRANSPARENT", + "FLAMMABLE", + "NOITEM", + "ALARMED", + "OPENCLOSE_INSIDE", + "BARRICADABLE_WINDOW_CURTAINS", + "BLOCK_WIND", + "WINDOW", + "SUPPORTS_ROOF" + ], + "curtain_transform": "t_window_no_curtains_alarm", + "examine_action": "curtains", + "close": "t_curtains_alarm", + "open": "t_window_open_alarm", + "deconstruct": { + "ter_set": "t_window_empty", + "items": [ + { "item": "stick", "count": 1 }, + { "item": "sheet", "count": 2 }, + { "item": "glass_sheet", "count": 1 }, + { "item": "nail", "charges": [ 3, 4 ] }, + { "item": "string_36", "count": 1 } + ] + }, + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_frame", + "items": [ + { "item": "glass_shard", "count": [ 21, 29 ] }, + { "item": "sheet", "count": 2 }, + { "item": "stick", "count": 1 }, + { "item": "string_36", "count": 1 } + ] + }, + "prying": { + "result": "t_window_open_alarm", + "message": "You pry open the window.", + "prying_data": { + "difficulty": 6, + "prying_level": 2, + "noisy": true, + "breakable": true, + "failure": "You pry, but can't pry open the window." + } + }, + "shoot": { "reduce_damage": [ 1, 4 ], "reduce_damage_laser": [ 0, 4 ], "destroy_damage": [ 1, 4 ], "no_laser_destroy": true } + }, + { + "type": "terrain", + "id": "t_window_no_curtains_alarm", + "name": "window without curtains", + "looks_like": "t_window_no_curtains", + "description": "A closed smaller window typically found in residential homes. You could install a curtain rod and drapes to block visibility and shut out any light if you had the supplies and skill.", + "symbol": "\"", + "color": "white", + "move_cost": 0, + "coverage": 60, + "roof": "t_flat_roof", + "connect_groups": "WALL", + "connects_to": "WALL", + "rotates_to": "INDOORFLOOR", + "flags": [ + "TRANSPARENT", + "FLAMMABLE", + "NOITEM", + "ALARMED", + "OPENCLOSE_INSIDE", + "BARRICADABLE_WINDOW", + "BLOCK_WIND", + "WINDOW", + "SUPPORTS_ROOF" + ], + "examine_action": "locked_object", + "open": "t_window_no_curtains_open_alarm", + "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "glass_sheet", "count": 1 } ] }, + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_frame", + "items": [ { "item": "glass_shard", "count": [ 21, 29 ] } ] + }, + "prying": { + "result": "t_window_no_curtains_open_alarm", + "message": "You pry open the window.", + "prying_data": { + "difficulty": 6, + "prying_level": 2, + "noisy": true, + "breakable": true, + "failure": "You pry, but can't pry open the window." + } + }, + "shoot": { "reduce_damage": [ 1, 4 ], "reduce_damage_laser": [ 0, 4 ], "destroy_damage": [ 1, 4 ], "no_laser_destroy": true } + }, + { + "type": "terrain", + "id": "t_window_no_curtains_open_alarm", + "name": "open window without curtains", + "looks_like": "t_window_no_curtains_open", + "description": "A smaller window typically found in residential homes. It's open and can be crawled through.", + "symbol": "'", + "color": "white", + "move_cost": 4, + "coverage": 60, + "roof": "t_flat_roof", + "connect_groups": "WALL", + "connects_to": "WALL", + "rotates_to": "INDOORFLOOR", + "flags": [ + "TRANSPARENT", + "FLAMMABLE", + "NOITEM", + "ALARMED", + "OPENCLOSE_INSIDE", + "MOUNTABLE", + "THIN_OBSTACLE", + "SMALL_PASSAGE", + "PERMEABLE", + "WINDOW", + "SUPPORTS_ROOF" + ], + "close": "t_window_no_curtains_alarm", + "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "glass_sheet", "count": 1 } ] }, + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_frame", + "items": [ { "item": "glass_shard", "count": [ 21, 29 ] } ] + } + }, + { + "type": "terrain", + "id": "t_window_open_alarm", + "name": "open window with curtains", + "looks_like": "t_window_open", + "description": "A window with fancy curtains on the inside that can be drawn closed to block visibility and shut out any light. It's open and you can crawl through.", + "symbol": "'", + "color": "light_gray", + "move_cost": 4, + "coverage": 60, + "roof": "t_flat_roof", + "connect_groups": "WALL", + "connects_to": "WALL", + "rotates_to": "INDOORFLOOR", + "flags": [ + "TRANSPARENT", + "FLAMMABLE", + "NOITEM", + "ALARMED", + "OPENCLOSE_INSIDE", + "MOUNTABLE", + "THIN_OBSTACLE", + "SMALL_PASSAGE", + "PERMEABLE", + "WINDOW", + "SUPPORTS_ROOF" + ], + "curtain_transform": "t_window_no_curtains_open_alarm", + "examine_action": "curtains", + "close": "t_window_domestic_alarm", + "deconstruct": { + "ter_set": "t_window_empty", + "items": [ + { "item": "stick", "count": 1 }, + { "item": "sheet", "count": 2 }, + { "item": "glass_sheet", "count": 1 }, + { "item": "nail", "charges": [ 3, 4 ] }, + { "item": "string_36", "count": 1 } + ] + }, + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_frame", + "items": [ + { "item": "glass_shard", "count": [ 21, 29 ] }, + { "item": "sheet", "count": 2 }, + { "item": "stick", "count": 1 }, + { "item": "string_36", "count": 1 } + ] + } + }, + { + "type": "terrain", + "id": "t_curtains_alarm", + "name": "window with closed curtains", + "looks_like": "t_curtains", + "description": "A closed window with fancy curtains that have been drawn shut, blocking sunlight and visibility. The curtains can only be opened from the inside. If you examined the curtains more closely, you could peek through the drapes or tear down everything. Or you could just smash the window open.", + "symbol": "\"", + "color": "dark_gray", + "move_cost": 0, + "coverage": 95, + "roof": "t_flat_roof", + "connect_groups": "WALL", + "connects_to": "WALL", + "rotates_to": "INDOORFLOOR", + "flags": [ + "FLAMMABLE", + "NOITEM", + "ALARMED", + "OPENCLOSE_INSIDE", + "BARRICADABLE_WINDOW_CURTAINS", + "BLOCK_WIND", + "WINDOW", + "SUPPORTS_ROOF" + ], + "curtain_transform": "t_window_no_curtains_alarm", + "open": "t_window_domestic_alarm", + "examine_action": "curtains", + "deconstruct": { + "ter_set": "t_window_empty", + "items": [ + { "item": "stick", "count": 1 }, + { "item": "sheet", "count": 2 }, + { "item": "glass_sheet", "count": 1 }, + { "item": "nail", "charges": [ 3, 4 ] }, + { "item": "string_36", "count": 1 } + ] + }, + "bash": { + "str_min": 3, + "str_max": 6, + "sound": "glass breaking!", + "sound_fail": "whack!", + "sound_vol": 16, + "sound_fail_vol": 10, + "ter_set": "t_window_frame", + "items": [ + { "item": "glass_shard", "count": [ 21, 29 ] }, + { "item": "sheet", "count": 2 }, + { "item": "stick", "count": 1 }, + { "item": "string_36", "count": 1 } + ] + }, + "prying": { + "result": "t_window_open_alarm", + "message": "You pry open the window.", + "prying_data": { + "difficulty": 6, + "prying_level": 2, + "noisy": true, + "breakable": true, + "failure": "You pry, but can't pry open the window." + } + }, + "shoot": { "reduce_damage": [ 1, 6 ], "reduce_damage_laser": [ 2, 10 ], "destroy_damage": [ 1, 4 ], "no_laser_destroy": true } + }, { "type": "terrain", "id": "t_window_empty", From 50073b2fd6b2c7686da99e8b58f61b0de52e1433 Mon Sep 17 00:00:00 2001 From: Milopetilo <78963720+Milopetilo@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:15:46 +0100 Subject: [PATCH 2/3] Add windows to palette --- data/json/mapgen_palettes/house_general_palette.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/json/mapgen_palettes/house_general_palette.json b/data/json/mapgen_palettes/house_general_palette.json index 90d8990d125dd..c9abbd0671dbd 100644 --- a/data/json/mapgen_palettes/house_general_palette.json +++ b/data/json/mapgen_palettes/house_general_palette.json @@ -63,7 +63,13 @@ "terrain": { "*": [ [ "t_door_locked_alarm", 2 ], [ "t_door_elocked_alarm", 2 ] ], ":": "t_wall_glass_alarm", - "o": "t_window_alarm" + "o": [ + [ "t_window_domestic_alarm", 10 ], + "t_window_no_curtains_alarm", + "t_window_open_alarm", + "t_window_no_curtains_open_alarm", + [ "t_curtains_alarm", 5 ] + ] } }, { From f20e0045f6dac5ff290759e74d9fa9a24c1ecf78 Mon Sep 17 00:00:00 2001 From: Milopetilo <78963720+Milopetilo@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:18:42 +0100 Subject: [PATCH 3/3] Adjust ratio --- data/json/mapgen_palettes/house_general_palette.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/mapgen_palettes/house_general_palette.json b/data/json/mapgen_palettes/house_general_palette.json index c9abbd0671dbd..cdd3d0699966a 100644 --- a/data/json/mapgen_palettes/house_general_palette.json +++ b/data/json/mapgen_palettes/house_general_palette.json @@ -46,7 +46,7 @@ "scope": "overmap_special", "//": "Determines if house has alarm", "//2": "Couldn't find an exact value of houses with alarms so estimated 25%, change if you have any good source", - "default": { "distribution": [ [ "domestic_alarm_palette", 1 ], [ "domestic_locked_palette", 1 ] ] } + "default": { "distribution": [ [ "domestic_alarm_palette", 1 ], [ "domestic_locked_palette", 3 ] ] } } }, "palettes": [