From 9b7e3d14b3f35163199ed704ae35544fa658931e Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 26 Sep 2020 14:05:14 +0200 Subject: spawned entities are now saved but not spawned again until removed --- content/encyclopediae/default_encyclopedia.json | 29 ++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'content/encyclopediae/default_encyclopedia.json') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index 2c88f45..25e3d32 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -7,14 +7,13 @@ ], "flags": ["Floor"] }, - "homeportal": { - "arguments": [["dedup_id", "string"], ["allowed", "list", ["list", []]], ["dedup_priority", "int", 0]], - "extract": {"allowed": ["Whitelist", "allowed"], "dedup_priority": ["Dedup", "priority"]}, + "_homeportal": { + "arguments": [["allowed", "list", ["list", []]]], + "extract": {"allowed": ["Whitelist", "allowed"]}, "components": [ ["RoomExit", {"destination": "_home+{player}", "dest_pos": ""}], ["Interactable", {"typ": "visit", "arg": "_home+{player}"}], - ["Whitelist", {"allowed": ["arg", "allowed"]}], - ["Dedup", {"id": ["arg", "dedup_id"], "priority": ["arg", "dedup_priority"]}] + ["Whitelist", {"allowed": ["arg", "allowed"]}] ], "flags": ["Floor"] }, @@ -65,6 +64,23 @@ }] ] }, + "singleton": { + "arguments": [["ent", "template"], ["clan", "string", ""]], + "components": [ + ["Spawner", { + "template": ["arg", "ent"], + "amount": 1, + "clan": ["arg", "clan"], + "radius": 0 + }], + ["Timer", { + "delay": 999999999, + "spread": 0.0, + "trigger": "spawn", + "target_time": 0 + }] + ] + }, "closeddoor": { "sprite": "closeddoor", "height": 2, @@ -221,5 +237,8 @@ "sprite": "blueplayer" }} } + }, + "templates": { + "homeportal": ["singleton", {"ent": {"type": "_homeportal"}}] } } -- cgit