From 905c6b649521296bba609db5b5c9a39008d34325 Mon Sep 17 00:00:00 2001 From: troido Date: Thu, 16 Apr 2020 10:54:23 +0200 Subject: add visit whitelist to homeportal, save and dedup its data even though it is loaded from template --- content/encyclopediae/default_encyclopedia.json | 6 +++++- content/maps/smallview.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index d3d0507..065db97 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -81,9 +81,13 @@ "flags": ["Floor"] }, "homeportal": { + "arguments": [["dedup_id", "string"], ["allowed", "list", []], ["dedup_priority", "int", 0]], + "extract": {"allowed": ["Whitelist", "allowed"], "dedup_priority": ["Dedup", "priority"]}, "components": [ ["RoomExit", {"destination": "_home+{player}", "dest_pos": ""}], - ["Interactable", {"action": ["interaction", ["visit", "_home+{player}"]]}] + ["Interactable", {"action": ["interaction", ["visit", "_home+{player}"]]}], + ["Whitelist", {"allowed": ["arg", "allowed"]}], + ["Dedup", {"id": ["arg", "dedup_id"], "priority": ["arg", "dedup_priority"]}] ], "flags": ["Floor"] }, diff --git a/content/maps/smallview.json b/content/maps/smallview.json index e9699a6..0f0982e 100644 --- a/content/maps/smallview.json +++ b/content/maps/smallview.json @@ -70,7 +70,7 @@ "type": "portal", "kwargs": {"destination": "town", "destpos": "gate"} }, "floor"], - "3": ["homeportal", "floor"], + "3": [{"type": "homeportal", "kwargs": {"dedup_id": "homeportal"}, "save": true}, "floor"], "4": [{ "type": "portal", "kwargs": {"destination": "room"} -- cgit