@turnipxenon/pineapple 2.4.18 → 2.4.19
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 +15 -14
- package/.svelte-kit/__package__/components/Card.svelte +3 -0
- package/.svelte-kit/__package__/components/RandomizedBackground.svelte +2 -2
- package/.svelte-kit/__package__/components/pineapple/PineappleBaseLayout.svelte +6 -39
- package/.svelte-kit/__package__/index.d.ts +3 -1
- package/.svelte-kit/__package__/index.js +3 -1
- package/{dist/util/stable_random.d.ts → .svelte-kit/__package__/util/util.d.ts} +1 -0
- package/{dist/util/stable_random.js → .svelte-kit/__package__/util/util.js} +5 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/Card.svelte +3 -0
- package/dist/components/RandomizedBackground.svelte +2 -2
- package/dist/components/pineapple/PineappleBaseLayout.svelte +6 -39
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/{.svelte-kit/__package__/util/stable_random.d.ts → dist/util/util.d.ts} +1 -0
- package/{.svelte-kit/__package__/util/stable_random.js → dist/util/util.js} +5 -0
- package/docs/PineappleFiberSpec.md +2 -2
- package/package.json +1 -1
- package/src/lib/components/Card.svelte +4 -0
- 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 +10 -18
- package/src/lib/index.ts +3 -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/lib/util/{stable_random.ts → util.ts} +22 -16
- package/src/routes/(pineapple)/+page.svelte +22 -12
- package/src/routes/(pineapple)/pineapple/+page.svelte +13 -16
- package/src/routes/+error.svelte +1 -1
- package/src/routes/+layout.svelte +3 -3
- package/src/routes/ErrorYarn.ts +3 -3
- package/.svelte-kit/__package__/util/create_go_to_function.d.ts +0 -1
- package/.svelte-kit/__package__/util/create_go_to_function.js +0 -5
- package/dist/util/create_go_to_function.d.ts +0 -1
- package/dist/util/create_go_to_function.js +0 -5
- package/src/lib/util/create_go_to_function.ts +0 -5
|
@@ -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 "$lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { operatorMap } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { commandMap } from "$lib/components/dialog_manager/behavior_tree/expression/commands/CommandMap";
|
|
5
|
+
import { BehaviorStatus } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import { RandomRangeCommand } from "$lib/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand";
|
|
3
|
+
import { VisitedCountCommand } from "$lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand";
|
|
4
|
+
import { VisitedCommand } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import { VisitedCountCommand } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import { dialogVariableStore } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode";
|
|
2
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
3
|
+
import type { ExpressionResult } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
2
|
+
import { EqualityOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator";
|
|
3
|
+
import { InequalityOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator";
|
|
4
|
+
import { GreaterThanOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator";
|
|
5
|
+
import { GreaterThanEqualOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator";
|
|
6
|
+
import { LessThanOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator";
|
|
7
|
+
import { LessThanEqualOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator";
|
|
8
|
+
import { NegationOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/NegationOperator";
|
|
9
|
+
import { AndOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/AndOperator";
|
|
10
|
+
import { OrOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/OrOperator";
|
|
11
|
+
import { XorOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/XorOperator";
|
|
12
|
+
import { AddOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator";
|
|
13
|
+
import { MinusOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator";
|
|
14
|
+
import { MultiplicationOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator";
|
|
15
|
+
import { DivisionOperator } from "$lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator";
|
|
16
|
+
import { RemainderDivisionOperator } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments";
|
|
6
|
+
import { btreeUtils } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode";
|
|
5
|
+
import type { ExpressionArguments } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/core/BehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
2
|
+
import type { BaseBehaviorResult } from "$lib/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 "$lib/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 "$lib/components/dialog_manager/behavior_tree/core/SelectorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorState } from "$lib/components/dialog_manager/behavior_tree/line_processors/BehaviorState";
|
|
5
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { IfMode } from "$lib/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
|
+
import { expressionEvaluator } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { IfMode } from "$lib/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import type { LineBehaviorNode } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { IfMode } from "$lib/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
5
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
6
|
+
import { expressionEvaluator } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator";
|
|
7
|
+
import { btreeUtils } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
4
|
+
import { IfMode } from "$lib/components/dialog_manager/behavior_tree/line_processors/IfMode";
|
|
5
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
3
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
4
|
+
import type { LineBehaviorResult } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
3
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
4
|
+
import type { LineBehaviorResult } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import type { LineBehaviorNode } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { dialogVariableStore } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
|
+
import { expressionEvaluator } from "$lib/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 "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { SetVariableNode } from "$lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
6
6
|
|
|
7
7
|
export class DeclareCommand implements LineBehaviorNode {
|
|
8
8
|
setVariableNode = new SetVariableNode();
|