From 13e9ab2c859b9a6a1935acbb93d34a7f10b7e122 Mon Sep 17 00:00:00 2001 From: troido Date: Fri, 17 Apr 2020 11:15:02 +0200 Subject: added Mine interaction --- content/encyclopediae/default_encyclopedia.json | 20 +++++++++++++++++++- content/maps/room.json | 4 +++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index b4007d5..5f127cd 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -413,6 +413,17 @@ ]]}] ], "flags": ["Occupied"] + }, + "quarry": { + "sprite": "quarry", + "height": 2, + "components": [ + ["Interactable", {"action": ["interaction", ["mine", "mining"]]}], + ["Minable", {"total": 20, "trigger": "loot"}], + ["Loot", {"spread": true, "loot": ["list", [ + ["list", [{"type": "stone"}, 1.0]] + ]]}] + ] } }, "items": { @@ -442,7 +453,14 @@ "armour": {"action": ["equip", { "slot": "body", "stats": {"defence": 3} - }]} + }]}, + "pickaxe": { + "sprite": "sword", + "action": ["equip", { + "slot": "hand", + "stats": {"mining": 5} + }] + } }, "templates":{ "plantedcarrotseed": ["plantedseed", {"delay": 60, "next": "carrotseedling"}], diff --git a/content/maps/room.json b/content/maps/room.json index 052e65b..853e7a3 100644 --- a/content/maps/room.json +++ b/content/maps/room.json @@ -23,7 +23,7 @@ " X,,*,,.,,,,,,,,,,,~~~''''''''''''''''f'''X", " X*,,,,.,,,d,VVV,,,~~~'''''''''''f''''f'''X", "1.......,,,,,VVV,,,~~~'''''''''''ffffff'''X", - " X/,,,,.,,,,,VVV,,,~~~''''''''''''''''''''X", + " X/,,,,.,P,Q,VVV,,,~~~''''''''''''''''''''X", " XXXXX,.,XXXXXXXXXX~~~XXXXXXXXXXXXXXXXXXXXX", " %%% " ], @@ -51,6 +51,8 @@ "s": ["ground", "sign"], "u": ["ground", "dude"], "t": ["ground", "trader"], + "P": ["ground", "pickaxe"], + "Q": "quarry", " ": [] } } -- cgit