From 84c70cee089b72720a85d285ee0437b65be298b9 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 5 Apr 2020 13:19:27 +0200 Subject: interactions can have an argument --- content/encyclopediae/default_encyclopedia.json | 8 ++++++++ content/maps/room.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index 5fa6ebf..a7196d8 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -270,6 +270,14 @@ "components": [ ["Interactable", {"action": ["interaction", ["say", "Good morning there, World"]]}] ] + }, + "dude": { + "sprite": "human", + "height": 1.5, + "flags": ["Occupied"], + "components": [ + ["Interactable", {"action": ["interaction", ["reply", "did you say '{}'?"]]}] + ] } } } diff --git a/content/maps/room.json b/content/maps/room.json index e1bf55e..ca50eff 100644 --- a/content/maps/room.json +++ b/content/maps/room.json @@ -17,7 +17,7 @@ "X,^,,,.,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", "X,,,,,.............bbb..........D++++#,,,X", "X,**,,.,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", - "X,*,*,.,,,,,V,,V,,,~~~,,,T,,,T,,#++++#,,,X", + "X,*,*,.,u,,,V,,V,,,~~~,,,T,,,T,,#++++#,,,X", "X,,*,,.,,,,,,,,,,,,~~~,,,,,,,,,,######,,,X", "X,oo,,.,s,d,,,,,,,~~~~,,,,,,,,,,f,,,,f,,,X", "X,,*,,.,,,,,,,,,,,~~~''''''''''''''''f'''X", @@ -49,6 +49,7 @@ "/": ["grass", "sword"], "D": ["ground", "closeddoor"], "s": ["ground", "sign"], + "u": ["ground", "dude"], " ": [] } } -- cgit