From b597d2279db7beb0d619fac472481b7f707609c8 Mon Sep 17 00:00:00 2001 From: troido Date: Thu, 2 Apr 2020 16:07:32 +0200 Subject: built doors --- content/encyclopediae/default_encyclopedia.json | 18 +++++++++++++++++- content/maps/room.json | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index 9b625b9..b3dc5d0 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -182,7 +182,7 @@ "name": "radishplant", "height": 0.5, "components": [ - ["Interactable", {"action": ["string", "harvest"]}], + ["Interactable", {"action": ["interaction", "harvest"]}], "Mortal", ["Loot", {"loot": ["lootlist", [["radishseed", 0.92], ["radishseed", 0.20], ["radishes", 0.8], ["radishes", 0.4]]]}] ], @@ -241,6 +241,22 @@ "slot": "hand", "stats": {"strength": 50} }] + }, + "closeddoor": { + "sprite": "closeddoor", + "height": 2, + "flags": ["Blocking"], + "components": [ + ["Interactable", {"action": ["interaction", ["change", {"type": "opendoor", "save": false}]]}] + ] + }, + "opendoor": { + "sprite": "opendoor", + "height": 0.8, + "flags": ["Occupied"], + "components": [ + ["Interactable", {"action": ["interaction", ["change", {"type": "closeddoor", "save": false}]]}] + ] } } } diff --git a/content/maps/room.json b/content/maps/room.json index 39d504e..cbf7bdc 100644 --- a/content/maps/room.json +++ b/content/maps/room.json @@ -15,7 +15,7 @@ "X,,,,,.,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,X", "X,^,,,.,,,,,,,,,,,,~~~,,,,,T,,,,######,,,X", "X,^,,,.,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", - "X,,,,,.............bbb...........++++#,,,X", + "X,,,,,.............bbb..........D++++#,,,X", "X,**,,.,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", "X,*,*,.,,,,,V,,V,,,~~~,,,T,,,T,,#++++#,,,X", "X,,*,,.,,,,,,,,,,,,~~~,,,,,,,,,,######,,,X", @@ -46,6 +46,7 @@ "r": ["grass", {"type": "spawner", "kwargs": {"template": {"type": "rat"}, "amount": 3, "clan": "rats", "delay": 200}}], "V": ["grass", "radishplant"], "/": ["grass", "sword"], + "D": ["ground", "closeddoor"], " ": [] } } -- cgit