From ee200f3003acdfdfde1a746246a7a4669188eb18 Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 13 Apr 2020 14:16:35 +0200 Subject: spawners now also use timer component and triggers --- content/encyclopediae/default_encyclopedia.json | 10 +++++++--- content/maps/room.json | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index f95de5e..68acc02 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -193,12 +193,16 @@ "spawner": { "arguments": [["template", "template"], ["amount", "int", 1], ["delay", "int", 0], ["clan", "string", ""], ["initial_spawn", "bool", true]], "components": [ + ["Timer", { + "delay": ["arg", "delay"], + "spread": 0.9, + "trigger": "spawn", + "target_time": 0 + }], ["Spawner", { "template": ["arg", "template"], "amount": ["arg", "amount"], - "delay": ["arg", "delay"], - "clan": ["arg", "clan"], - "initial_spawn": ["arg", "initial_spawn"] + "clan": ["arg", "clan"] }] ] }, diff --git a/content/maps/room.json b/content/maps/room.json index 728ee4d..41663fc 100644 --- a/content/maps/room.json +++ b/content/maps/room.json @@ -44,7 +44,7 @@ "1": {"type": "portal", "kwargs": {"destination": "smallview"}}, "^": ["grass", "spiketrap"], "d": ["grass", {"type": "spawner", "kwargs": {"template": {"type": "dummy"}, "delay": 100}}], - "r": ["grass", {"type": "spawner", "kwargs": {"template": {"type": "rat"}, "amount": 3, "clan": "rats", "delay": 200}}], + "r": ["grass", {"type": "spawner", "kwargs": {"template": {"type": "rat"}, "amount": 10, "clan": "rats", "delay": 20}}], "V": ["grass", "radishplant"], "/": ["grass", "sword"], "D": ["ground", "closeddoor"], -- cgit