From 7a0c9326aa10dcff303c0c6c06cb1f63350b5ff6 Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:20:58 +0200 Subject: [PATCH 1/2] add more info --- src/types/StepLabelJsonType.ts | 40 +++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/types/StepLabelJsonType.ts b/src/types/StepLabelJsonType.ts index 887f509d..8fc12c02 100644 --- a/src/types/StepLabelJsonType.ts +++ b/src/types/StepLabelJsonType.ts @@ -5,20 +5,58 @@ import { LabelIdType } from "./LabelIdType" * Step label JSON type */ type StepLabelJsonType = { + /** + * Variable used to display a choice menu. + */ currentChoiceMenuOptions?: { + /** + * The text to be displayed. + */ text: string + /** + * The label id to be opened. + */ label: LabelIdType + /** + * Label opening mode + */ type: LabelRunModeType + /** + * The properties to be passed to the label. + */ props: StorageObjectType }[] + /** + * Variable used to display a dialog. + */ dialog?: { + /** + * The character id that will speak. + */ character: string, + /** + * The text to be displayed. + */ text: string, } | string + /** + * Variable used to open a label. + */ labelToOpen?: { + /** + * The id of the label to open. + */ labelId: string, - type: "jump" | "call", + /** + * Label opening mode + */ + type: LabelRunModeType, } + /** + * Variable used to end some elements of the narrative. + * - game_end: ends the game + * - label_end: ends the label + */ end?: "game_end" | "label_end" } From 1a8f6a7081b80c2320baa0a30f99f901ce69611a Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:22:29 +0200 Subject: [PATCH 2/2] gameEnd --- src/classes/LabelJson.ts | 4 ++-- src/managers/StepManager.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/classes/LabelJson.ts b/src/classes/LabelJson.ts index 58a5c1d6..620779d6 100644 --- a/src/classes/LabelJson.ts +++ b/src/classes/LabelJson.ts @@ -58,8 +58,8 @@ export default class LabelJson extends LabelAbstract { + * props.navigate("/end") + * } + * ``` + */ + static gameEnd: StepLabelType | undefined = undefined }