From 5af83beb6f10023cef7eba192a0b190518fe967b Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 28 Sep 2020 21:34:12 +0200 Subject: better type validation and spawners set home argument on their spawned template --- content/encyclopediae/npcs.json | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'content') diff --git a/content/encyclopediae/npcs.json b/content/encyclopediae/npcs.json index f4642b4..63f5b13 100644 --- a/content/encyclopediae/npcs.json +++ b/content/encyclopediae/npcs.json @@ -1,13 +1,15 @@ { "assemblages": { "rat": { + "arguments": {"home": []}, "sprite": "rat", "height": 1.0, "components": [ ["MonsterAI", { "view_distance": 3, "move_chance": 0.08, - "homesickness": 0.1 + "homesickness": 0.1, + "home": {"$arg": "home"} }], ["Health", {"health": 8, "maxhealth": 8}], ["Fighter", {"damage": 2, "cooldown": 6}], @@ -19,13 +21,15 @@ ] }, "goblin": { + "arguments": {"home": []}, "sprite": "goblin", "height": 1.0, "components": [ ["MonsterAI", { "view_distance": 8, "move_chance": 0.02, - "homesickness": 0.1 + "homesickness": 0.1, + "home": {"$arg": "home"} }], ["Health", {"health": 15, "maxhealth": 15}], ["Fighter", {"damage": 5, "cooldown": 8}], @@ -39,13 +43,15 @@ ] }, "troll": { + "arguments": {"home": []}, "sprite": "troll", "height": 1.0, "components": [ ["MonsterAI", { "view_distance": 8, "move_chance": 0.01, - "homesickness": 0.1 + "homesickness": 0.1, + "home": {"$arg": "home"} }], ["Health", {"health": 75, "maxhealth": 75}], ["Fighter", {"damage": 15, "cooldown": 10}], @@ -62,19 +68,22 @@ ] }, "rabbit": { + "arguments": {"home": []}, "sprite": "rabbit", "height": 1.0, "components": [ ["MonsterAI", { "view_distance": 3, "move_chance": 0.08, - "homesickness": 0.01 + "homesickness": 0.01, + "home": {"$arg": "home"} }], ["Movable", {"cooldown": 3}], ["Faction", {"faction": "neutral"}] ] }, "dude": { + "arguments": {"home": []}, "sprite": "human", "height": 1.5, "flags": ["Occupied"], @@ -83,11 +92,13 @@ ["MonsterAI", { "view_distance": 1, "move_chance": 0.01, - "homesickness": 0.3 + "homesickness": 0.3, + "home": {"$arg": "home"} }] ] }, "trader": { + "arguments": {"home": []}, "sprite": "human", "height": 1.5, "name": "crop trader", @@ -101,12 +112,14 @@ ["MonsterAI", { "view_distance": 1, "move_chance": 0.01, - "homesickness": 0.3 + "homesickness": 0.3, + "home": {"$arg": "home"} }], ["Movable", {"cooldown": 3}] ] }, "dyetrader": { + "arguments": {"home": []}, "sprite": "human", "height": 1.5, "name": "dye trader", @@ -119,12 +132,14 @@ ["MonsterAI", { "view_distance": 1, "move_chance": 0.01, - "homesickness": 0.3 + "homesickness": 0.3, + "home": {"$arg": "home"} }], ["Movable", {"cooldown": 3}] ] }, "toolsmith": { + "arguments": {"home": []}, "sprite": "human", "height": 1.5, "name": "toolsmith", @@ -135,12 +150,14 @@ ["MonsterAI", { "view_distance": 1, "move_chance": 0.01, - "homesickness": 0.3 + "homesickness": 0.3, + "home": {"$arg": "home"} }], ["Movable", {"cooldown": 3}] ] }, "villager": { + "arguments": {"home": []}, "sprite": "human", "height": 1.5, "name": "villager", @@ -148,7 +165,8 @@ ["MonsterAI", { "view_distance": 1, "move_chance": 0.01, - "homesickness": 0.3 + "homesickness": 0.3, + "home": {"$arg": "home"} }], ["Movable", {"cooldown": 3}], ["Interactable", {"typ": "say", "arg": "Hello"}] -- cgit