From b16b27e03d256cad38586a7bce7d2c5bf8f41633 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 16 Feb 2024 02:54:58 -0300 Subject: [PATCH] Test out some YarnSpinner format stuff --- res/text/intro.yarn | 23 ++++++++++++++++++++++- src/Game.hx | 1 + src/scene/WorldMapScene.hx | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/res/text/intro.yarn b/res/text/intro.yarn index 7fa78bb..9f07a29 100644 --- a/res/text/intro.yarn +++ b/res/text/intro.yarn @@ -8,10 +8,31 @@ You: What happened to the updates from mission control? -> Is this even still the same ship? You: Best not get too philsophical just yet You: Let's have another look around... +<> === title: Room:quarters --- -You: It's the crew quarters +<> +// You: It's the crew quarters. +// You: Well, it will be. Set-up hasn't started yet. +// You: That was meant to be one of my first jobs after defrost... +// You: ...but it doesn't exactly seem like a priority now. +You: Maybe there's something useful here? +-> Search the lockers [perception] + <> + < 2>> + You: Aha! A small piece of paper with the **hangar access code**. + <> + <> + You: Just some dust bunnies. Guess they stowed away from Earth. + <> +-> Set up a sleeping mat [ingenuity] + <> + < 2>> + You: Nice, at least I have somewhere to crash now. + <> + You: Hmm, I was never good at this camping stuff. Maybe I can find somewhere else to rest. + <> === title: Room:hangar --- diff --git a/src/Game.hx b/src/Game.hx index 5d72652..f444c4b 100644 --- a/src/Game.hx +++ b/src/Game.hx @@ -172,6 +172,7 @@ class Game extends hxd.App { for (o in options) { o.remove(); } + options.splice(0, options.length); } function onDialogueComplete(event:DialogueComplete) { diff --git a/src/scene/WorldMapScene.hx b/src/scene/WorldMapScene.hx index c8cb6df..387f67e 100644 --- a/src/scene/WorldMapScene.hx +++ b/src/scene/WorldMapScene.hx @@ -59,7 +59,7 @@ class WorldMapScene extends h2d.Flow implements GameScene implements h2d.domkit. #if debug trace('skipping intro dialogue'); - Game.current.globalEventBus.publishEvent(new OpenRoomEvent("hangar")); + Game.current.globalEventBus.publishEvent(new OpenRoomEvent("quarters")); #else Game.current.globalEventBus.publishEvent(new StartDialogueNode("Intro")); #end @@ -68,7 +68,7 @@ class WorldMapScene extends h2d.Flow implements GameScene implements h2d.domkit. public function openRoom(event:OpenRoomEvent) { var room = rooms.get(event.roomName); room.isOpen = true; - room.area.alpha = 0; + room.rect.alpha = 0; } public function getH2dObject() {