@turnipxenon/pineapple 2.4.17 → 2.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/workspace.xml +13 -16
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/docs/PineappleFiberSpec.md +2 -2
- package/package.json +1 -1
- package/src/lib/components/DialogOverlay.svelte +2 -2
- package/src/lib/components/LazyAsset.svelte +2 -2
- package/src/lib/components/RandomizedBackground.svelte +8 -8
- package/src/lib/components/dialog_manager/DialogManagerStore.ts +5 -5
- package/src/lib/components/dialog_manager/DialogProcessor.ts +15 -15
- package/src/lib/components/dialog_manager/DialogUtils.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/core/BaseBehaviorResult.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/core/SelectorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionResult.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperandNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperatorNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandMap.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/AndOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorMap.ts +16 -16
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OrOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/XorOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineSelectorNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/BehaviorState.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseIfNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/EndIfNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IfNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/LineCommentNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.ts +5 -5
- package/src/lib/components/layouts/SeaweedBaseLayout.svelte +3 -3
- package/src/lib/components/pineapple/PineappleBaseLayout.svelte +1 -1
- package/src/lib/scripts/util/ManualCheck.ts +1 -1
- package/src/lib/scripts/util/ManualCheckRun.ts +1 -1
- package/src/lib/store.ts +1 -1
- package/src/lib/types/pineapple_fiber/DialogDetail.ts +1 -1
- package/src/routes/+error.svelte +1 -1
- package/src/routes/+layout.svelte +3 -3
- package/src/routes/ErrorYarn.ts +3 -3
package/.idea/workspace.xml
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/+page.svelte" afterDir="false" />
|
|
10
|
-
</list>
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Replace all $lib to $pkg" />
|
|
11
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
12
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
13
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -211,15 +208,7 @@
|
|
|
211
208
|
<workItem from="1710914868232" duration="41000" />
|
|
212
209
|
<workItem from="1711051949931" duration="144000" />
|
|
213
210
|
<workItem from="1711052377810" duration="128000" />
|
|
214
|
-
<workItem from="1711090540281" duration="
|
|
215
|
-
</task>
|
|
216
|
-
<task id="LOCAL-00029" summary="Add game section">
|
|
217
|
-
<option name="closed" value="true" />
|
|
218
|
-
<created>1709926810058</created>
|
|
219
|
-
<option name="number" value="00029" />
|
|
220
|
-
<option name="presentableId" value="LOCAL-00029" />
|
|
221
|
-
<option name="project" value="LOCAL" />
|
|
222
|
-
<updated>1709926810058</updated>
|
|
211
|
+
<workItem from="1711090540281" duration="2384000" />
|
|
223
212
|
</task>
|
|
224
213
|
<task id="LOCAL-00030" summary="Migrate to skeleton 2.0">
|
|
225
214
|
<option name="closed" value="true" />
|
|
@@ -605,7 +594,15 @@
|
|
|
605
594
|
<option name="project" value="LOCAL" />
|
|
606
595
|
<updated>1711093190088</updated>
|
|
607
596
|
</task>
|
|
608
|
-
<
|
|
597
|
+
<task id="LOCAL-00078" summary="Replace all $lib to $pkg">
|
|
598
|
+
<option name="closed" value="true" />
|
|
599
|
+
<created>1711093944293</created>
|
|
600
|
+
<option name="number" value="00078" />
|
|
601
|
+
<option name="presentableId" value="LOCAL-00078" />
|
|
602
|
+
<option name="project" value="LOCAL" />
|
|
603
|
+
<updated>1711093944293</updated>
|
|
604
|
+
</task>
|
|
605
|
+
<option name="localTasksCounter" value="79" />
|
|
609
606
|
<servers />
|
|
610
607
|
</component>
|
|
611
608
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -663,7 +660,6 @@
|
|
|
663
660
|
</option>
|
|
664
661
|
</component>
|
|
665
662
|
<component name="VcsManagerConfiguration">
|
|
666
|
-
<MESSAGE value="Fix accordion rounded border missing" />
|
|
667
663
|
<MESSAGE value="v2.4.6" />
|
|
668
664
|
<MESSAGE value="Extract styling out of Skeleton accordion" />
|
|
669
665
|
<MESSAGE value="Attempt to make postcss exportable" />
|
|
@@ -688,7 +684,8 @@
|
|
|
688
684
|
<MESSAGE value="Fix dialog layout to make it usable on hobby site" />
|
|
689
685
|
<MESSAGE value="Add option to set default dialog behavior in Pineapple" />
|
|
690
686
|
<MESSAGE value="Export Card" />
|
|
691
|
-
<
|
|
687
|
+
<MESSAGE value="Replace all $lib to $pkg" />
|
|
688
|
+
<option name="LAST_COMMIT_MESSAGE" value="Replace all $lib to $pkg" />
|
|
692
689
|
</component>
|
|
693
690
|
<component name="XDebuggerManager">
|
|
694
691
|
<breakpoint-manager>
|
|
@@ -21,7 +21,7 @@ export const options = {
|
|
|
21
21
|
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
|
|
22
22
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
23
23
|
},
|
|
24
|
-
version_hash: "
|
|
24
|
+
version_hash: "1lwpjw0"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -312,8 +312,8 @@ In Typescript, this would look like:
|
|
|
312
312
|
|
|
313
313
|
// auto-generated from About.yarn
|
|
314
314
|
|
|
315
|
-
import { dialogManager } from "$
|
|
316
|
-
import { PortraitType } from "$
|
|
315
|
+
import { dialogManager } from "$pkg/store";
|
|
316
|
+
import { PortraitType } from "$pkg/types/pineapple_fiber/PortraitType";
|
|
317
317
|
|
|
318
318
|
class _AboutYarn {
|
|
319
319
|
setDialogTree = () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turnipxenon/pineapple",
|
|
3
3
|
"description": "personal package for base styling for other personal projects",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.18",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build": "npm run check-requirements && vite build && yarn package",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import AresHappy from "$
|
|
2
|
+
import AresHappy from "$pkg/assets/characters/ares/ares_happy.webp";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
4
|
|
|
5
|
-
import { dialogManager } from "$
|
|
5
|
+
import { dialogManager } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
6
6
|
import { DialogState } from "$pkg/types/pineapple_fiber/DialogState";
|
|
7
7
|
|
|
8
8
|
let currentMessage = "";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {LazyAssetStatus, LazyAssetType} from "$
|
|
3
|
-
import BgTiledAres from "$
|
|
2
|
+
import {LazyAssetStatus, LazyAssetType} from "$pkg/components/LazyAssetType";
|
|
3
|
+
import BgTiledAres from "$pkg/assets/bg_tiled/bg_tiled_ares.png";
|
|
4
4
|
import {onMount} from "svelte";
|
|
5
5
|
|
|
6
6
|
export let src: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { generatedDailySeed, mulberry32Generator } from "$
|
|
3
|
-
import BgTiledAres from "$
|
|
4
|
-
import BgTiledCorn from "$
|
|
5
|
-
import BgTiledPineapple from "$
|
|
6
|
-
import BgTiledReinhard from "$
|
|
7
|
-
import BgTiledTomato from "$
|
|
8
|
-
import BgTiledTurnip from "$
|
|
9
|
-
import RandomizedImage from "$
|
|
2
|
+
import { generatedDailySeed, mulberry32Generator } from "$pkg/util/stable_random";
|
|
3
|
+
import BgTiledAres from "$pkg/assets/bg_tiled/bg_tiled_ares.png";
|
|
4
|
+
import BgTiledCorn from "$pkg/assets/bg_tiled/bg_tiled_corn.png";
|
|
5
|
+
import BgTiledPineapple from "$pkg/assets/bg_tiled/bg_tiled_pineapple.png";
|
|
6
|
+
import BgTiledReinhard from "$pkg/assets/bg_tiled/bg_tiled_reinhard.png";
|
|
7
|
+
import BgTiledTomato from "$pkg/assets/bg_tiled/bg_tiled_tomato.png";
|
|
8
|
+
import BgTiledTurnip from "$pkg/assets/bg_tiled/bg_tiled_turnip.png";
|
|
9
|
+
import RandomizedImage from "$pkg/components/RandomizedImage.svelte";
|
|
10
10
|
|
|
11
11
|
export let enable;
|
|
12
12
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* or is saved in local storage
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { DialogMapStore } from "$
|
|
7
|
-
import { createNewMapStore } from "$
|
|
6
|
+
import type { DialogMapStore } from "$pkg/types/pineapple_fiber/DialogVariableStore";
|
|
7
|
+
import { createNewMapStore } from "$pkg/types/pineapple_fiber/DialogVariableStore";
|
|
8
8
|
import { writable } from "svelte/store";
|
|
9
|
-
import type { DialogDetail } from "$
|
|
10
|
-
import { DialogManager } from "$
|
|
9
|
+
import type { DialogDetail } from "$pkg/types/pineapple_fiber/DialogDetail";
|
|
10
|
+
import { DialogManager } from "$pkg/components/dialog_manager/DialogManager";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Enables the dialogue overlay
|
|
@@ -16,7 +16,7 @@ import { DialogManager } from "$lib/components/dialog_manager/DialogManager";
|
|
|
16
16
|
* When updating to false, remember to restore the value to true, our default value, onDestroy.
|
|
17
17
|
* Avoid async to prevent weird flashes of updates!
|
|
18
18
|
* ```
|
|
19
|
-
* import {enableDialogueOverlay} from "$
|
|
19
|
+
* import {enableDialogueOverlay} from "$pkg/store.ts";
|
|
20
20
|
* enableDialogueOverlay.update(() => false);
|
|
21
21
|
*
|
|
22
22
|
* onDestroy(() => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { DialogDetail } from "$
|
|
2
|
-
import { BehaviorState } from "$
|
|
3
|
-
import { IfNode } from "$
|
|
4
|
-
import { EndIfNode } from "$
|
|
5
|
-
import { ElseNode } from "$
|
|
6
|
-
import { ElseIfNode } from "$
|
|
7
|
-
import { SetVariableNode } from "$
|
|
8
|
-
import { IgnoreGuardNode } from "$
|
|
9
|
-
import { NormalLineProcessorNode } from "$
|
|
10
|
-
import { LineSelectorNode } from "$
|
|
1
|
+
import type { DialogDetail } from "$pkg/types/pineapple_fiber/DialogDetail";
|
|
2
|
+
import { BehaviorState } from "$pkg/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
3
|
+
import { IfNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IfNode";
|
|
4
|
+
import { EndIfNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/EndIfNode";
|
|
5
|
+
import { ElseNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/ElseNode";
|
|
6
|
+
import { ElseIfNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/ElseIfNode";
|
|
7
|
+
import { SetVariableNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
8
|
+
import { IgnoreGuardNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode";
|
|
9
|
+
import { NormalLineProcessorNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode";
|
|
10
|
+
import { LineSelectorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineSelectorNode";
|
|
11
11
|
import { browser } from "$app/environment";
|
|
12
|
-
import { LineCommentNode } from "$
|
|
13
|
-
import { DeclareCommand } from "$
|
|
14
|
-
import { JumpCommand } from "$
|
|
15
|
-
import { IgnoreJumpNode } from "$
|
|
16
|
-
import { UnvisitCommand } from "$
|
|
12
|
+
import { LineCommentNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/LineCommentNode";
|
|
13
|
+
import { DeclareCommand } from "$pkg/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand";
|
|
14
|
+
import { JumpCommand } from "$pkg/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand";
|
|
15
|
+
import { IgnoreJumpNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode";
|
|
16
|
+
import { UnvisitCommand } from "$pkg/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* DialogProcessor processes dialogs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BehaviorStatus } from "$
|
|
1
|
+
import type { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
2
|
|
|
3
3
|
export interface BaseBehaviorResult {
|
|
4
4
|
status: BehaviorStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BehaviorNode } from "$
|
|
2
|
-
import { BehaviorStatus } from "$
|
|
3
|
-
import type { BaseBehaviorResult } from "$
|
|
1
|
+
import type { BehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorNode";
|
|
2
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
3
|
+
import type { BaseBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/core/BaseBehaviorResult";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Selector is a composite behavior node where it tries to process everything until it
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExpressionState } from "$
|
|
1
|
+
import type { ExpressionState } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionState";
|
|
2
2
|
|
|
3
3
|
export interface ExpressionArguments {
|
|
4
4
|
token: string;
|
package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
1
|
+
import type { BehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
4
|
|
|
5
5
|
export type ExpressionBehaviorNode = BehaviorNode<ExpressionArguments, ExpressionResult>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { browser } from "$app/environment";
|
|
2
|
-
import { OperatorNode } from "$
|
|
3
|
-
import { OperandNode } from "$
|
|
4
|
-
import { ExpressionSelectorNode } from "$
|
|
5
|
-
import type { ExpressionState } from "$
|
|
6
|
-
import { btreeUtils } from "$
|
|
7
|
-
import { CommandExpressionNode } from "$
|
|
2
|
+
import { OperatorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/OperatorNode";
|
|
3
|
+
import { OperandNode } from "$pkg/components/dialog_manager/behavior_tree/expression/OperandNode";
|
|
4
|
+
import { ExpressionSelectorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode";
|
|
5
|
+
import type { ExpressionState } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionState";
|
|
6
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
7
|
+
import { CommandExpressionNode } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode";
|
|
8
8
|
|
|
9
9
|
class ExpressionEvaluator {
|
|
10
10
|
evaluatorTree = new ExpressionSelectorNode([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseBehaviorResult } from "$
|
|
2
|
-
import type { ExpressionState } from "$
|
|
1
|
+
import type { BaseBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/core/BaseBehaviorResult";
|
|
2
|
+
import type { ExpressionState } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionState";
|
|
3
3
|
|
|
4
4
|
export interface ExpressionResult extends BaseBehaviorResult {
|
|
5
5
|
nextState: ExpressionState;
|
package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SelectorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import type { ExpressionBehaviorNode } from "$
|
|
1
|
+
import { SelectorNode } from "$pkg/components/dialog_manager/behavior_tree/core/SelectorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
6
6
|
|
|
7
7
|
export class ExpressionSelectorNode extends SelectorNode<ExpressionArguments, ExpressionResult> {
|
|
8
8
|
constructor(nodeList: ExpressionBehaviorNode[]) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ExpressionBehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { btreeUtils } from "$
|
|
1
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Puts the token as an operand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ExpressionBehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { operatorMap } from "$
|
|
1
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { operatorMap } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorMap";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A leaf node that returns:
|
package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ExpressionBehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { commandMap } from "$
|
|
5
|
-
import { BehaviorStatus } from "$
|
|
1
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { commandMap } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandMap";
|
|
5
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
6
6
|
|
|
7
7
|
export class CommandExpressionNode implements ExpressionBehaviorNode {
|
|
8
8
|
process(nodeArgs: ExpressionArguments): ExpressionResult {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExpressionBehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
1
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
5
|
|
|
6
6
|
export abstract class CommandLogicNode implements ExpressionBehaviorNode {
|
|
7
7
|
abstract getToken: () => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CommandLogicNode } from "$
|
|
2
|
-
import { RandomRangeCommand } from "$
|
|
3
|
-
import { VisitedCountCommand } from "$
|
|
4
|
-
import { VisitedCommand } from "$
|
|
1
|
+
import type { CommandLogicNode } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import { RandomRangeCommand } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand";
|
|
3
|
+
import { VisitedCountCommand } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand";
|
|
4
|
+
import { VisitedCommand } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand";
|
|
5
5
|
|
|
6
6
|
class CommandMap {
|
|
7
7
|
_commandMap: Map<string, CommandLogicNode> = new Map();
|
package/src/lib/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommandLogicNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
1
|
+
import { CommandLogicNode } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Used for command like
|
package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommandLogicNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import { VisitedCountCommand } from "$
|
|
1
|
+
import { CommandLogicNode } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import { VisitedCountCommand } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Used for command like
|
package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommandLogicNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import { dialogVariableStore } from "$
|
|
1
|
+
import { CommandLogicNode } from "$pkg/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import { dialogVariableStore } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Used for command like
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
6
|
-
import { btreeUtils } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
7
7
|
|
|
8
8
|
export class AndOperator extends OperatorLogicNode {
|
|
9
9
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class EqualityOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class GreaterThanEqualOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class GreaterThanOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class InequalityOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class LessThanEqualOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class LessThanOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
6
|
-
import { btreeUtils } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
7
7
|
|
|
8
8
|
export class NegationOperator extends OperatorLogicNode {
|
|
9
9
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExpressionBehaviorNode } from "$
|
|
2
|
-
import type { ExpressionArguments } from "$
|
|
3
|
-
import type { ExpressionResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
1
|
+
import type { ExpressionBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
5
|
|
|
6
6
|
export enum OperatorType {
|
|
7
7
|
Unary,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { OperatorLogicNode } from "$
|
|
2
|
-
import { EqualityOperator } from "$
|
|
3
|
-
import { InequalityOperator } from "$
|
|
4
|
-
import { GreaterThanOperator } from "$
|
|
5
|
-
import { GreaterThanEqualOperator } from "$
|
|
6
|
-
import { LessThanOperator } from "$
|
|
7
|
-
import { LessThanEqualOperator } from "$
|
|
8
|
-
import { NegationOperator } from "$
|
|
9
|
-
import { AndOperator } from "$
|
|
10
|
-
import { OrOperator } from "$
|
|
11
|
-
import { XorOperator } from "$
|
|
12
|
-
import { AddOperator } from "$
|
|
13
|
-
import { MinusOperator } from "$
|
|
14
|
-
import { MultiplicationOperator } from "$
|
|
15
|
-
import { DivisionOperator } from "$
|
|
16
|
-
import { RemainderDivisionOperator } from "$
|
|
1
|
+
import type { OperatorLogicNode } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
2
|
+
import { EqualityOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator";
|
|
3
|
+
import { InequalityOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator";
|
|
4
|
+
import { GreaterThanOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator";
|
|
5
|
+
import { GreaterThanEqualOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator";
|
|
6
|
+
import { LessThanOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator";
|
|
7
|
+
import { LessThanEqualOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator";
|
|
8
|
+
import { NegationOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/NegationOperator";
|
|
9
|
+
import { AndOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/AndOperator";
|
|
10
|
+
import { OrOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OrOperator";
|
|
11
|
+
import { XorOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/XorOperator";
|
|
12
|
+
import { AddOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator";
|
|
13
|
+
import { MinusOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator";
|
|
14
|
+
import { MultiplicationOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator";
|
|
15
|
+
import { DivisionOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator";
|
|
16
|
+
import { RemainderDivisionOperator } from "$pkg/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator";
|
|
17
17
|
|
|
18
18
|
class OperatorMap {
|
|
19
19
|
_operatorLogicMap: Map<string, OperatorLogicNode> = new Map();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
6
|
-
import { btreeUtils } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
7
7
|
|
|
8
8
|
export class OrOperator extends OperatorLogicNode {
|
|
9
9
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
6
|
-
import { btreeUtils } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
7
7
|
|
|
8
8
|
export class XorOperator extends OperatorLogicNode {
|
|
9
9
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class DivisionOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class MinusOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class MultiplicationOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class AddOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OperatorLogicNode,
|
|
3
3
|
OperatorType
|
|
4
|
-
} from "$
|
|
5
|
-
import type { ExpressionArguments } from "$
|
|
4
|
+
} from "$pkg/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
6
|
|
|
7
7
|
export class RemainderDivisionOperator extends OperatorLogicNode {
|
|
8
8
|
doOperation = (currentOperands: string[], nodeArgs: ExpressionArguments) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import type { BehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
4
|
|
|
5
5
|
export type LineBehaviorNode = BehaviorNode<LineNodeArguments, LineBehaviorResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BehaviorState } from "$
|
|
2
|
-
import type { BaseBehaviorResult } from "$
|
|
1
|
+
import type { BehaviorState } from "$pkg/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
2
|
+
import type { BaseBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/core/BaseBehaviorResult";
|
|
3
3
|
|
|
4
4
|
export interface LineBehaviorResult extends BaseBehaviorResult {
|
|
5
5
|
renderedLine: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BehaviorState } from "$
|
|
1
|
+
import type { BehaviorState } from "$pkg/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
2
2
|
|
|
3
3
|
export interface LineNodeArguments {
|
|
4
4
|
line: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SelectorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorState } from "$
|
|
5
|
-
import { BehaviorStatus } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
1
|
+
import { SelectorNode } from "$pkg/components/dialog_manager/behavior_tree/core/SelectorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorState } from "$pkg/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
5
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
6
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
7
|
|
|
8
8
|
export class LineSelectorNode extends SelectorNode<LineNodeArguments, LineBehaviorResult> {
|
|
9
9
|
constructor(nodeList: LineBehaviorNode[]) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import { btreeUtils } from "$
|
|
5
|
-
import { IfMode } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
7
|
-
import { expressionEvaluator } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { IfMode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
6
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
|
+
import { expressionEvaluator } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ElseIfNode is a leaf node that returns:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import { btreeUtils } from "$
|
|
5
|
-
import { IfMode } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { IfMode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
6
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* ElseNode is a leaf node that returns:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import type { LineBehaviorNode } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* EndIfNode is a leaf node returns the following results:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import { IfMode } from "$
|
|
5
|
-
import type { LineBehaviorNode } from "$
|
|
6
|
-
import { expressionEvaluator } from "$
|
|
7
|
-
import { btreeUtils } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { IfMode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
5
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
6
|
+
import { expressionEvaluator } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator";
|
|
7
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* IfNode is a leaf node which tries to determine whether the current line is an
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { btreeUtils } from "$
|
|
4
|
-
import { IfMode } from "$
|
|
5
|
-
import { BehaviorStatus } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
4
|
+
import { IfMode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
5
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
6
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This is a leaf node that returns:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BehaviorStatus } from "$
|
|
2
|
-
import type { LineBehaviorNode } from "$
|
|
3
|
-
import type { LineNodeArguments } from "$
|
|
4
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
3
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
4
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
5
5
|
|
|
6
6
|
export class IgnoreJumpNode implements LineBehaviorNode {
|
|
7
7
|
process(nodeArgs: LineNodeArguments): LineBehaviorResult {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BehaviorStatus } from "$
|
|
2
|
-
import type { LineBehaviorNode } from "$
|
|
3
|
-
import type { LineNodeArguments } from "$
|
|
4
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
3
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
4
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
5
5
|
|
|
6
6
|
export class LineCommentNode implements LineBehaviorNode {
|
|
7
7
|
process(nodeArgs: LineNodeArguments): LineBehaviorResult {
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
3
|
import { browser } from "$app/environment";
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import type { LineBehaviorNode } from "$
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This is a leaf node that ALWAYS returns success
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import { btreeUtils } from "$
|
|
5
|
-
import { dialogVariableStore } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
7
|
-
import { expressionEvaluator } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { dialogVariableStore } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
6
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
|
+
import { expressionEvaluator } from "$pkg/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This is a leaf node that returns:
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { SetVariableNode } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { SetVariableNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
6
6
|
|
|
7
7
|
export class DeclareCommand implements LineBehaviorNode {
|
|
8
8
|
setVariableNode = new SetVariableNode();
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { SetVariableNode } from "$
|
|
6
|
-
import { dialogManager } from "$
|
|
7
|
-
import { btreeUtils } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { SetVariableNode } from "$pkg/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
6
|
+
import { dialogManager } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
7
|
+
import { btreeUtils } from "$pkg/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
8
8
|
|
|
9
9
|
export class JumpCommand implements LineBehaviorNode {
|
|
10
10
|
setVariableNode = new SetVariableNode();
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { dialogVariableStore } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$pkg/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$pkg/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { dialogVariableStore } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
6
6
|
import { browser } from "$app/environment";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// For auto dark/light mode
|
|
3
3
|
import { AppBar, AppShell, autoModeWatcher, LightSwitch } from "@skeletonlabs/skeleton";
|
|
4
|
-
import RandomizedBackground from "$
|
|
4
|
+
import RandomizedBackground from "$pkg/components/RandomizedBackground.svelte";
|
|
5
5
|
|
|
6
6
|
// store
|
|
7
|
-
import { enableBackground } from "$
|
|
7
|
+
import { enableBackground } from "$pkg/store";
|
|
8
8
|
// assets
|
|
9
|
-
import { enableDialogueOverlay } from "$
|
|
9
|
+
import { enableDialogueOverlay } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
10
10
|
import { writable } from "svelte/store";
|
|
11
11
|
import { fly } from "svelte/transition";
|
|
12
12
|
// todo: clean up all these imports!
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { enableBackground } from "$pkg/store";
|
|
12
12
|
import type { BreadcrumbData } from "$pkg/types/BreadcrumbData";
|
|
13
13
|
// assets
|
|
14
|
-
// import DialogOverlay from "$
|
|
14
|
+
// import DialogOverlay from "$pkg/components/DialogOverlay.svelte";
|
|
15
15
|
import AresLogo from "$pkg/assets/characters/ares/ares_logo.webp";
|
|
16
16
|
import FABIcon from "$pkg/assets/placeholder/placeholder_circle.png";
|
|
17
17
|
import CloseIcon from "$pkg/assets/icons/close.svg";
|
package/src/lib/store.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { writable } from "svelte/store";
|
|
|
7
7
|
* When updating to false, remember to restore the value to true, our default value, onDestroy.
|
|
8
8
|
* Avoid async to prevent weird flashes of updates!
|
|
9
9
|
* ```
|
|
10
|
-
* import {enableBackground} from "$
|
|
10
|
+
* import {enableBackground} from "$pkg/store.ts";
|
|
11
11
|
* enableBackground.update(() => false);
|
|
12
12
|
*
|
|
13
13
|
* onDestroy(() => {
|
package/src/routes/+error.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onDestroy } from "svelte";
|
|
3
|
-
import { dialogManager } from "$
|
|
3
|
+
import { dialogManager } from "$pkg/components/dialog_manager/DialogManagerStore.ts";
|
|
4
4
|
import { ErrorYarn } from "./ErrorYarn";
|
|
5
5
|
|
|
6
6
|
ErrorYarn.setDialogTree();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// The ordering of these imports is critical to your app working properly
|
|
3
|
-
import "$
|
|
3
|
+
import "$pkg/theme.postcss";
|
|
4
4
|
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
|
|
5
5
|
// import "@skeletonlabs/skeleton/styles/all.css";
|
|
6
6
|
// Most of your app wide CSS should be put in this file
|
|
7
|
-
import "$
|
|
7
|
+
import "$pkg/app.postcss";
|
|
8
8
|
|
|
9
|
-
import "$
|
|
9
|
+
import "$pkg/styles/global.css";
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<slot />
|
package/src/routes/ErrorYarn.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// this file was generated by PineappleWeaver.ts
|
|
2
2
|
// do not edit!
|
|
3
3
|
|
|
4
|
-
import { PortraitType } from "$
|
|
5
|
-
import { dialogManager } from "$
|
|
6
|
-
import type { DialogDetail } from "$
|
|
4
|
+
import { PortraitType } from "$pkg/types/pineapple_fiber/PortraitType";
|
|
5
|
+
import { dialogManager } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
6
|
+
import type { DialogDetail } from "$pkg/types/pineapple_fiber/DialogDetail";
|
|
7
7
|
|
|
8
8
|
class _ErrorYarn {
|
|
9
9
|
dialogList: DialogDetail[] = [
|