qpremake 1.5.1
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/README.md +184 -0
- package/lib/_localizationFiles/English.d.ts +2 -0
- package/lib/_localizationFiles/English.js +307 -0
- package/lib/_mods/parserModules/addSymbol.d.ts +7 -0
- package/lib/_mods/parserModules/addSymbol.js +18 -0
- package/lib/_mods/parserModules/expression.d.ts +7 -0
- package/lib/_mods/parserModules/expression.js +45 -0
- package/lib/_mods/parserModules/expression_parser.d.ts +143 -0
- package/lib/_mods/parserModules/expression_parser.js +728 -0
- package/lib/_mods/parserModules/img.d.ts +8 -0
- package/lib/_mods/parserModules/img.js +42 -0
- package/lib/_mods/parserModules/qpOriginal.d.ts +5 -0
- package/lib/_mods/parserModules/qpOriginal.js +27 -0
- package/lib/_mods/parserModules/sectionID.d.ts +13 -0
- package/lib/_mods/parserModules/sectionID.js +56 -0
- package/lib/_mods/parserModules/tags.d.ts +9 -0
- package/lib/_mods/parserModules/tags.js +29 -0
- package/lib/_mods/parserModules/uaddminus.d.ts +9 -0
- package/lib/_mods/parserModules/uaddminus.js +42 -0
- package/lib/_mods/parserModules/variantCheck.d.ts +10 -0
- package/lib/_mods/parserModules/variantCheck.js +53 -0
- package/lib/_queenSystem/handler/actionGenrator.d.ts +994 -0
- package/lib/_queenSystem/handler/actionGenrator.js +646 -0
- package/lib/_queenSystem/handler/actionInputGenerator.d.ts +95 -0
- package/lib/_queenSystem/handler/actionInputGenerator.js +373 -0
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.d.ts +92 -0
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.js +341 -0
- package/lib/_queenSystem/handler/cardHandler.d.ts +20 -0
- package/lib/_queenSystem/handler/cardHandler.js +61 -0
- package/lib/_queenSystem/handler/effectGenerator.d.ts +1 -0
- package/lib/_queenSystem/handler/effectGenerator.js +127 -0
- package/lib/_queenSystem/handler/localizationHandler.d.ts +28 -0
- package/lib/_queenSystem/handler/localizationHandler.js +166 -0
- package/lib/_queenSystem/handler/modHandler.d.ts +10 -0
- package/lib/_queenSystem/handler/modHandler.js +36 -0
- package/lib/_queenSystem/handler/oldDataProcessor.d.ts +9 -0
- package/lib/_queenSystem/handler/oldDataProcessor.js +129 -0
- package/lib/_queenSystem/handler/registryHandler.d.ts +36 -0
- package/lib/_queenSystem/handler/registryHandler.js +63 -0
- package/lib/_queenSystem/handler/zoneHandler.d.ts +102 -0
- package/lib/_queenSystem/handler/zoneHandler.js +606 -0
- package/lib/_queenSystem/loader/loader_card.d.ts +20 -0
- package/lib/_queenSystem/loader/loader_card.js +124 -0
- package/lib/_queenSystem/loader/loader_effect.d.ts +27 -0
- package/lib/_queenSystem/loader/loader_effect.js +163 -0
- package/lib/_queenSystem/loader/loader_handler.d.ts +11 -0
- package/lib/_queenSystem/loader/loader_handler.js +24 -0
- package/lib/_queenSystem/loader/loader_localization.d.ts +11 -0
- package/lib/_queenSystem/loader/loader_localization.js +73 -0
- package/lib/_queenSystem/loader/loader_mod.d.ts +10 -0
- package/lib/_queenSystem/loader/loader_mod.js +72 -0
- package/lib/_queenSystem/loader/loader_subtype.d.ts +9 -0
- package/lib/_queenSystem/loader/loader_subtype.js +39 -0
- package/lib/_queenSystem/loader/loader_type.d.ts +9 -0
- package/lib/_queenSystem/loader/loader_type.js +39 -0
- package/lib/_queenSystem/loader/loader_zone.d.ts +14 -0
- package/lib/_queenSystem/loader/loader_zone.js +35 -0
- package/lib/_queenSystem/queenSystem.d.ts +127 -0
- package/lib/_queenSystem/queenSystem.js +996 -0
- package/lib/_queenSystem/renderer/rendererInterface.d.ts +9 -0
- package/lib/_queenSystem/renderer/rendererInterface.js +2 -0
- package/lib/data/actionRegistry.d.ts +56 -0
- package/lib/data/actionRegistry.js +60 -0
- package/lib/data/cardRegistry.d.ts +1162 -0
- package/lib/data/cardRegistry.js +716 -0
- package/lib/data/deckRegistry.d.ts +19 -0
- package/lib/data/deckRegistry.js +41 -0
- package/lib/data/effectRegistry.d.ts +465 -0
- package/lib/data/effectRegistry.js +151 -0
- package/lib/data/effectTypeRegistry.d.ts +14 -0
- package/lib/data/effectTypeRegistry.js +14 -0
- package/lib/data/operatorRegistry.d.ts +92 -0
- package/lib/data/operatorRegistry.js +82 -0
- package/lib/data/rarityRegistry.d.ts +28 -0
- package/lib/data/rarityRegistry.js +63 -0
- package/lib/data/registryRegistry.d.ts +10 -0
- package/lib/data/registryRegistry.js +14 -0
- package/lib/data/subtypeRegistry.d.ts +15 -0
- package/lib/data/subtypeRegistry.js +15 -0
- package/lib/data/systemRegistry.d.ts +253 -0
- package/lib/data/systemRegistry.js +56 -0
- package/lib/data/zoneRegistry.d.ts +43 -0
- package/lib/data/zoneRegistry.js +157 -0
- package/lib/effectTextParser/index.d.ts +42 -0
- package/lib/effectTextParser/index.js +316 -0
- package/lib/global/index.d.ts +8 -0
- package/lib/global/index.js +12 -0
- package/lib/index.d.ts +6344 -0
- package/lib/index.js +213 -0
- package/lib/specificEffects/e_cond.d.ts +11 -0
- package/lib/specificEffects/e_cond.js +36 -0
- package/lib/specificEffects/e_fruit.d.ts +3 -0
- package/lib/specificEffects/e_fruit.js +187 -0
- package/lib/specificEffects/e_generic.d.ts +191 -0
- package/lib/specificEffects/e_generic.js +662 -0
- package/lib/specificEffects/e_generic_cardTargetting.d.ts +38 -0
- package/lib/specificEffects/e_generic_cardTargetting.js +82 -0
- package/lib/specificEffects/e_generic_noneTargetting.d.ts +10 -0
- package/lib/specificEffects/e_generic_noneTargetting.js +26 -0
- package/lib/specificEffects/e_status.d.ts +80 -0
- package/lib/specificEffects/e_status.js +151 -0
- package/lib/specificEffects/e_test.d.ts +3 -0
- package/lib/specificEffects/e_test.js +21 -0
- package/lib/types/abstract/gameComponents/API.d.ts +19 -0
- package/lib/types/abstract/gameComponents/API.js +2 -0
- package/lib/types/abstract/gameComponents/card.d.ts +108 -0
- package/lib/types/abstract/gameComponents/card.js +771 -0
- package/lib/types/abstract/gameComponents/effect.d.ts +82 -0
- package/lib/types/abstract/gameComponents/effect.js +331 -0
- package/lib/types/abstract/gameComponents/effectSubtype.d.ts +22 -0
- package/lib/types/abstract/gameComponents/effectSubtype.js +40 -0
- package/lib/types/abstract/gameComponents/effectType.d.ts +11 -0
- package/lib/types/abstract/gameComponents/effectType.js +8 -0
- package/lib/types/abstract/gameComponents/settings.d.ts +80 -0
- package/lib/types/abstract/gameComponents/settings.js +68 -0
- package/lib/types/abstract/gameComponents/zone.d.ts +113 -0
- package/lib/types/abstract/gameComponents/zone.js +614 -0
- package/lib/types/abstract/gameComponents/zone_gridBased.d.ts +18 -0
- package/lib/types/abstract/gameComponents/zone_gridBased.js +58 -0
- package/lib/types/abstract/gameComponents/zone_stackBased.d.ts +13 -0
- package/lib/types/abstract/gameComponents/zone_stackBased.js +55 -0
- package/lib/types/abstract/generics/node.d.ts +23 -0
- package/lib/types/abstract/generics/node.js +46 -0
- package/lib/types/abstract/generics/position.d.ts +23 -0
- package/lib/types/abstract/generics/position.js +91 -0
- package/lib/types/abstract/generics/tree.d.ts +25 -0
- package/lib/types/abstract/generics/tree.js +153 -0
- package/lib/types/abstract/generics/universalResponse.d.ts +4 -0
- package/lib/types/abstract/generics/universalResponse.js +2 -0
- package/lib/types/abstract/generics/wraper.d.ts +21 -0
- package/lib/types/abstract/generics/wraper.js +56 -0
- package/lib/types/abstract/parser/component.d.ts +88 -0
- package/lib/types/abstract/parser/component.js +132 -0
- package/lib/types/abstract/parser/index.d.ts +6 -0
- package/lib/types/abstract/parser/index.js +28 -0
- package/lib/types/abstract/parser/modPack.d.ts +21 -0
- package/lib/types/abstract/parser/modPack.js +48 -0
- package/lib/types/abstract/parser/moduleInputObject.d.ts +12 -0
- package/lib/types/abstract/parser/moduleInputObject.js +21 -0
- package/lib/types/abstract/parser/options.d.ts +31 -0
- package/lib/types/abstract/parser/options.js +45 -0
- package/lib/types/abstract/serializedGameComponents/Gamestate.d.ts +46 -0
- package/lib/types/abstract/serializedGameComponents/Gamestate.js +70 -0
- package/lib/types/abstract/serializedGameComponents/Localized.d.ts +69 -0
- package/lib/types/abstract/serializedGameComponents/Localized.js +84 -0
- package/lib/types/defaultZones/ability.d.ts +10 -0
- package/lib/types/defaultZones/ability.js +22 -0
- package/lib/types/defaultZones/deck.d.ts +25 -0
- package/lib/types/defaultZones/deck.js +90 -0
- package/lib/types/defaultZones/drop.d.ts +5 -0
- package/lib/types/defaultZones/drop.js +13 -0
- package/lib/types/defaultZones/field.d.ts +11 -0
- package/lib/types/defaultZones/field.js +35 -0
- package/lib/types/defaultZones/grave.d.ts +8 -0
- package/lib/types/defaultZones/grave.js +21 -0
- package/lib/types/defaultZones/hand.d.ts +5 -0
- package/lib/types/defaultZones/hand.js +14 -0
- package/lib/types/defaultZones/storage.d.ts +9 -0
- package/lib/types/defaultZones/storage.js +21 -0
- package/lib/types/defaultZones/system.d.ts +12 -0
- package/lib/types/defaultZones/system.js +35 -0
- package/lib/types/defaultZones/void.d.ts +4 -0
- package/lib/types/defaultZones/void.js +10 -0
- package/lib/types/effects/effectSubtypes/subtype_chained.d.ts +10 -0
- package/lib/types/effects/effectSubtypes/subtype_chained.js +17 -0
- package/lib/types/effects/effectSubtypes/subtype_delayed.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_delayed.js +16 -0
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_graveLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_graveLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.js +15 -0
- package/lib/types/effects/effectSubtypes/subtype_instant.d.ts +8 -0
- package/lib/types/effects/effectSubtypes/subtype_instant.js +20 -0
- package/lib/types/effects/effectSubtypes/subtype_once.d.ts +12 -0
- package/lib/types/effects/effectSubtypes/subtype_once.js +27 -0
- package/lib/types/effects/effectSubtypes/subtype_unique.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_unique.js +16 -0
- package/lib/types/effects/effectTypes/initEffect.d.ts +7 -0
- package/lib/types/effects/effectTypes/initEffect.js +23 -0
- package/lib/types/effects/effectTypes/lockEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/lockEffect.js +25 -0
- package/lib/types/effects/effectTypes/manualEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/manualEffect.js +18 -0
- package/lib/types/effects/effectTypes/passiveEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/passiveEffect.js +23 -0
- package/lib/types/effects/effectTypes/triggerEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/triggerEffect.js +28 -0
- package/lib/types/errors/cannotLoad.d.ts +5 -0
- package/lib/types/errors/cannotLoad.js +13 -0
- package/lib/types/errors/cardNotExist.d.ts +5 -0
- package/lib/types/errors/cardNotExist.js +13 -0
- package/lib/types/errors/cardNotInApplicableZone.d.ts +5 -0
- package/lib/types/errors/cardNotInApplicableZone.js +13 -0
- package/lib/types/errors/effectCondNotMet.d.ts +5 -0
- package/lib/types/errors/effectCondNotMet.js +13 -0
- package/lib/types/errors/effectNotExist.d.ts +5 -0
- package/lib/types/errors/effectNotExist.js +13 -0
- package/lib/types/errors/error.d.ts +17 -0
- package/lib/types/errors/error.js +42 -0
- package/lib/types/errors/incorrectActionType.d.ts +5 -0
- package/lib/types/errors/incorrectActionType.js +13 -0
- package/lib/types/errors/index.d.ts +16 -0
- package/lib/types/errors/index.js +36 -0
- package/lib/types/errors/invalidOrderMap.d.ts +6 -0
- package/lib/types/errors/invalidOrderMap.js +14 -0
- package/lib/types/errors/invalidPosition.d.ts +6 -0
- package/lib/types/errors/invalidPosition.js +13 -0
- package/lib/types/errors/subTypeOverrideConflict.d.ts +7 -0
- package/lib/types/errors/subTypeOverrideConflict.js +15 -0
- package/lib/types/errors/unknownError.d.ts +5 -0
- package/lib/types/errors/unknownError.js +13 -0
- package/lib/types/errors/unregisteredAction.d.ts +6 -0
- package/lib/types/errors/unregisteredAction.js +13 -0
- package/lib/types/errors/wrongEffectIdx.d.ts +5 -0
- package/lib/types/errors/wrongEffectIdx.js +14 -0
- package/lib/types/errors/zoneAttrConflict.d.ts +5 -0
- package/lib/types/errors/zoneAttrConflict.js +15 -0
- package/lib/types/errors/zoneFull.d.ts +5 -0
- package/lib/types/errors/zoneFull.js +13 -0
- package/lib/types/errors/zoneNotExist.d.ts +5 -0
- package/lib/types/errors/zoneNotExist.js +13 -0
- package/lib/types/misc.d.ts +97 -0
- package/lib/types/misc.js +8 -0
- package/lib/types/mods/effectTextParserModule.d.ts +16 -0
- package/lib/types/mods/effectTextParserModule.js +81 -0
- package/lib/types/mods/gameModule.d.ts +5 -0
- package/lib/types/mods/gameModule.js +8 -0
- package/lib/utils/index.d.ts +78 -0
- package/lib/utils/index.js +562 -0
- package/package.json +45 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type zoneData_fixxed_entries = {
|
|
2
|
+
priority: number;
|
|
3
|
+
posBound: number[];
|
|
4
|
+
minCapacity: number;
|
|
5
|
+
attriutesArr: zoneAttributes[];
|
|
6
|
+
instancedFor: playerTypeID[];
|
|
7
|
+
types?: number[];
|
|
8
|
+
};
|
|
9
|
+
type zoneData_variable_entries = {
|
|
10
|
+
[key: string]: string | number | boolean;
|
|
11
|
+
};
|
|
12
|
+
type zoneData = (zoneData_fixxed_entries) | (zoneData_fixxed_entries & zoneData_variable_entries);
|
|
13
|
+
declare enum zoneRegistry {
|
|
14
|
+
z_system = 0,
|
|
15
|
+
z_drop = 1,
|
|
16
|
+
z_void = 2,
|
|
17
|
+
z_deck = 3,
|
|
18
|
+
z_field = 4,
|
|
19
|
+
z_grave = 5,
|
|
20
|
+
z_hand = 6,
|
|
21
|
+
z_storage = 7,
|
|
22
|
+
z_ability = 8
|
|
23
|
+
}
|
|
24
|
+
declare enum zoneAttributes {
|
|
25
|
+
canReorderSelf = 0,
|
|
26
|
+
canMoveFrom = 1,
|
|
27
|
+
canMoveTo = 2,
|
|
28
|
+
moveToNeedPosition = 3
|
|
29
|
+
}
|
|
30
|
+
type zoneName = keyof typeof zoneRegistry;
|
|
31
|
+
type zoneID = (typeof zoneRegistry)[zoneName];
|
|
32
|
+
declare enum playerTypeID {
|
|
33
|
+
player = 1,
|
|
34
|
+
enemy = 2
|
|
35
|
+
}
|
|
36
|
+
type playerTypeName = keyof typeof playerTypeID;
|
|
37
|
+
declare const playerOppositeMap: {
|
|
38
|
+
readonly player: readonly [playerTypeID.enemy];
|
|
39
|
+
readonly enemy: readonly [playerTypeID.player];
|
|
40
|
+
};
|
|
41
|
+
declare const zoneDataRegistry: Record<zoneName, zoneData>;
|
|
42
|
+
export default zoneDataRegistry;
|
|
43
|
+
export { zoneAttributes, playerTypeID, playerTypeName, playerOppositeMap, zoneData, zoneRegistry, zoneName, zoneID, zoneDataRegistry };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.zoneDataRegistry = exports.zoneRegistry = exports.playerOppositeMap = exports.playerTypeID = exports.zoneAttributes = void 0;
|
|
4
|
+
//dataID lookup
|
|
5
|
+
var zoneRegistry;
|
|
6
|
+
(function (zoneRegistry) {
|
|
7
|
+
zoneRegistry[zoneRegistry["z_system"] = 0] = "z_system";
|
|
8
|
+
zoneRegistry[zoneRegistry["z_drop"] = 1] = "z_drop";
|
|
9
|
+
zoneRegistry[zoneRegistry["z_void"] = 2] = "z_void";
|
|
10
|
+
zoneRegistry[zoneRegistry["z_deck"] = 3] = "z_deck";
|
|
11
|
+
zoneRegistry[zoneRegistry["z_field"] = 4] = "z_field";
|
|
12
|
+
zoneRegistry[zoneRegistry["z_grave"] = 5] = "z_grave";
|
|
13
|
+
zoneRegistry[zoneRegistry["z_hand"] = 6] = "z_hand";
|
|
14
|
+
zoneRegistry[zoneRegistry["z_storage"] = 7] = "z_storage";
|
|
15
|
+
zoneRegistry[zoneRegistry["z_ability"] = 8] = "z_ability";
|
|
16
|
+
})(zoneRegistry || (exports.zoneRegistry = zoneRegistry = {}));
|
|
17
|
+
//booleans basically
|
|
18
|
+
var zoneAttributes;
|
|
19
|
+
(function (zoneAttributes) {
|
|
20
|
+
zoneAttributes[zoneAttributes["canReorderSelf"] = 0] = "canReorderSelf";
|
|
21
|
+
zoneAttributes[zoneAttributes["canMoveFrom"] = 1] = "canMoveFrom";
|
|
22
|
+
zoneAttributes[zoneAttributes["canMoveTo"] = 2] = "canMoveTo";
|
|
23
|
+
zoneAttributes[zoneAttributes["moveToNeedPosition"] = 3] = "moveToNeedPosition";
|
|
24
|
+
})(zoneAttributes || (exports.zoneAttributes = zoneAttributes = {}));
|
|
25
|
+
var playerTypeID;
|
|
26
|
+
(function (playerTypeID) {
|
|
27
|
+
playerTypeID[playerTypeID["player"] = 1] = "player";
|
|
28
|
+
playerTypeID[playerTypeID["enemy"] = 2] = "enemy";
|
|
29
|
+
})(playerTypeID || (exports.playerTypeID = playerTypeID = {}));
|
|
30
|
+
const playerOppositeMap = {
|
|
31
|
+
player: [playerTypeID.enemy],
|
|
32
|
+
enemy: [playerTypeID.player],
|
|
33
|
+
};
|
|
34
|
+
exports.playerOppositeMap = playerOppositeMap;
|
|
35
|
+
//priority high = act first
|
|
36
|
+
const zoneDataRegistry = {
|
|
37
|
+
z_system: {
|
|
38
|
+
priority: Infinity,
|
|
39
|
+
posBound: [],
|
|
40
|
+
minCapacity: -Infinity,
|
|
41
|
+
attriutesArr: [],
|
|
42
|
+
instancedFor: [],
|
|
43
|
+
startThreat: 0,
|
|
44
|
+
maxThreat: 20,
|
|
45
|
+
clearThreatWhenBurn: false,
|
|
46
|
+
},
|
|
47
|
+
z_drop: {
|
|
48
|
+
priority: Infinity,
|
|
49
|
+
posBound: [Infinity],
|
|
50
|
+
minCapacity: 0,
|
|
51
|
+
attriutesArr: [
|
|
52
|
+
zoneAttributes.canReorderSelf,
|
|
53
|
+
zoneAttributes.canMoveTo,
|
|
54
|
+
zoneAttributes.canMoveFrom,
|
|
55
|
+
],
|
|
56
|
+
instancedFor: [],
|
|
57
|
+
},
|
|
58
|
+
z_deck: {
|
|
59
|
+
priority: 1,
|
|
60
|
+
posBound: [Infinity],
|
|
61
|
+
minCapacity: 0,
|
|
62
|
+
attriutesArr: [
|
|
63
|
+
zoneAttributes.canReorderSelf,
|
|
64
|
+
zoneAttributes.canMoveTo,
|
|
65
|
+
zoneAttributes.canMoveFrom,
|
|
66
|
+
zoneAttributes.moveToNeedPosition,
|
|
67
|
+
],
|
|
68
|
+
instancedFor: [
|
|
69
|
+
playerTypeID.player
|
|
70
|
+
],
|
|
71
|
+
startCoolDown: 10,
|
|
72
|
+
maxCooldown: 10,
|
|
73
|
+
maxLoad: 20,
|
|
74
|
+
minLoad: 1,
|
|
75
|
+
},
|
|
76
|
+
z_storage: {
|
|
77
|
+
priority: 0,
|
|
78
|
+
posBound: [Infinity],
|
|
79
|
+
minCapacity: 0,
|
|
80
|
+
attriutesArr: [
|
|
81
|
+
zoneAttributes.canMoveFrom,
|
|
82
|
+
],
|
|
83
|
+
instancedFor: [
|
|
84
|
+
playerTypeID.player
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
z_grave: {
|
|
88
|
+
priority: 2,
|
|
89
|
+
posBound: [Infinity],
|
|
90
|
+
minCapacity: 0,
|
|
91
|
+
attriutesArr: [
|
|
92
|
+
zoneAttributes.canMoveTo,
|
|
93
|
+
zoneAttributes.canMoveFrom,
|
|
94
|
+
],
|
|
95
|
+
instancedFor: [
|
|
96
|
+
playerTypeID.player,
|
|
97
|
+
playerTypeID.enemy,
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
z_hand: {
|
|
101
|
+
priority: 4,
|
|
102
|
+
posBound: [7],
|
|
103
|
+
minCapacity: 0,
|
|
104
|
+
attriutesArr: [
|
|
105
|
+
zoneAttributes.canReorderSelf,
|
|
106
|
+
zoneAttributes.canMoveFrom,
|
|
107
|
+
zoneAttributes.canMoveTo,
|
|
108
|
+
zoneAttributes.moveToNeedPosition,
|
|
109
|
+
],
|
|
110
|
+
instancedFor: [
|
|
111
|
+
playerTypeID.player,
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
z_field: {
|
|
115
|
+
priority: 5,
|
|
116
|
+
posBound: [5, 2],
|
|
117
|
+
canReorderSelf: true,
|
|
118
|
+
canMoveTo: true,
|
|
119
|
+
canMoveFrom: true,
|
|
120
|
+
moveToNeedPosition: true,
|
|
121
|
+
minCapacity: 0,
|
|
122
|
+
attriutesArr: [
|
|
123
|
+
zoneAttributes.canReorderSelf,
|
|
124
|
+
zoneAttributes.canMoveFrom,
|
|
125
|
+
zoneAttributes.canMoveTo,
|
|
126
|
+
zoneAttributes.moveToNeedPosition,
|
|
127
|
+
],
|
|
128
|
+
instancedFor: [
|
|
129
|
+
playerTypeID.player,
|
|
130
|
+
playerTypeID.enemy,
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
z_ability: {
|
|
134
|
+
priority: -1,
|
|
135
|
+
posBound: [1],
|
|
136
|
+
canMoveFrom: true,
|
|
137
|
+
minCapacity: 0,
|
|
138
|
+
attriutesArr: [],
|
|
139
|
+
instancedFor: [
|
|
140
|
+
playerTypeID.player
|
|
141
|
+
],
|
|
142
|
+
maxCoolDown: 10,
|
|
143
|
+
},
|
|
144
|
+
z_void: {
|
|
145
|
+
//void is temporary card storage when cards are voided
|
|
146
|
+
//or "dissapear"
|
|
147
|
+
priority: -2,
|
|
148
|
+
posBound: [Infinity],
|
|
149
|
+
attriutesArr: [
|
|
150
|
+
zoneAttributes.canMoveTo,
|
|
151
|
+
],
|
|
152
|
+
instancedFor: [],
|
|
153
|
+
minCapacity: 0,
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
exports.zoneDataRegistry = zoneDataRegistry;
|
|
157
|
+
exports.default = zoneDataRegistry;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DisplayComponent, parseOptions, loadOptions } from '../types/abstract/parser';
|
|
2
|
+
import type { nestedTree } from '../types/misc';
|
|
3
|
+
export default class Parser {
|
|
4
|
+
private loaded;
|
|
5
|
+
private moduleArr;
|
|
6
|
+
private moduleMap;
|
|
7
|
+
load(l: loadOptions): Promise<void>;
|
|
8
|
+
private parse_internal_lib_level;
|
|
9
|
+
private parse_internal_loader_level_node;
|
|
10
|
+
private parse_internal_loader_level;
|
|
11
|
+
private recur_flat_tree;
|
|
12
|
+
private equationRegex;
|
|
13
|
+
private elementRegex;
|
|
14
|
+
private operationList_infix;
|
|
15
|
+
private operationList_prefix;
|
|
16
|
+
private preparse_regs;
|
|
17
|
+
private preParseXML;
|
|
18
|
+
private applyReg1;
|
|
19
|
+
parse(XML: string, o: parseOptions): nestedTree<DisplayComponent>;
|
|
20
|
+
}
|
|
21
|
+
export { parseOptions, loadOptions };
|
|
22
|
+
/**
|
|
23
|
+
* Added shorthands:
|
|
24
|
+
* =abcABC... : prints out the value of a, b, c, A, B, C...
|
|
25
|
+
* = a + 1 + A : do the expression
|
|
26
|
+
/*
|
|
27
|
+
USAGE
|
|
28
|
+
|
|
29
|
+
async function main() {
|
|
30
|
+
let p = new parser()
|
|
31
|
+
await p.load(new loadOptions(undefined, ["qpOriginal"]))
|
|
32
|
+
|
|
33
|
+
let str = `test numeric: <if type = "number"><numeric> a + b > c </><string> A + B </><string> C + D </></>`
|
|
34
|
+
let str2 = `<string> A + B </><string> C + D </>`
|
|
35
|
+
let str3 = `<string> A + " I am a cat "</>`
|
|
36
|
+
let option = new parseOptions(mode.gameplay, "", [3.115926, -5, 50, "cat", "dog", "horse", "house"], false)
|
|
37
|
+
console.log(`parsing test1: `, p.parse(str, option))
|
|
38
|
+
console.log(`parsing test2: `,p.parse(str2, option))
|
|
39
|
+
console.log(`parsing test3: `,p.parse(str3, option))
|
|
40
|
+
//console.log("debugMode: ", JSON.stringify(p.debug_parse(str), null, 4))
|
|
41
|
+
}
|
|
42
|
+
*/
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.loadOptions = exports.parseOptions = void 0;
|
|
46
|
+
const parse_xml_1 = require("@rgrove/parse-xml");
|
|
47
|
+
const parse_xml_2 = require("@rgrove/parse-xml");
|
|
48
|
+
const parser_1 = require("../types/abstract/parser");
|
|
49
|
+
Object.defineProperty(exports, "parseOptions", { enumerable: true, get: function () { return parser_1.parseOptions; } });
|
|
50
|
+
Object.defineProperty(exports, "loadOptions", { enumerable: true, get: function () { return parser_1.loadOptions; } });
|
|
51
|
+
class Parser {
|
|
52
|
+
constructor() {
|
|
53
|
+
this.loaded = false;
|
|
54
|
+
this.moduleArr = [];
|
|
55
|
+
this.moduleMap = new Map();
|
|
56
|
+
this.elementRegex = /[A-Za-z0-9]|".*"/;
|
|
57
|
+
this.operationList_infix = [
|
|
58
|
+
"==", "===",
|
|
59
|
+
"!=", "!==",
|
|
60
|
+
">", "<",
|
|
61
|
+
">=", "<=",
|
|
62
|
+
"&&", "&",
|
|
63
|
+
"||", "|",
|
|
64
|
+
">>", "<<",
|
|
65
|
+
"++",
|
|
66
|
+
"+", "-", "*", "/",
|
|
67
|
+
".."
|
|
68
|
+
];
|
|
69
|
+
this.operationList_prefix = [
|
|
70
|
+
"!", "+", "-"
|
|
71
|
+
];
|
|
72
|
+
this.preparse_regs = [
|
|
73
|
+
/=\s*([A-Za-z0-9]+)\s*;?/g, //=ABC...
|
|
74
|
+
this.equationRegex(this.operationList_prefix, this.operationList_infix, [], this.elementRegex, "=", ";")
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
//[module index, command index]
|
|
78
|
+
//
|
|
79
|
+
load(l) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
let path = l.modulePath;
|
|
82
|
+
if (!path.endsWith("/"))
|
|
83
|
+
path += "/";
|
|
84
|
+
// console.log(`load triggered, ab to load ${l.modulesInUse.length} modules`)
|
|
85
|
+
for (let x = 0; x < l.modulesInUse.length; x++) {
|
|
86
|
+
let i = l.modulesInUse[x];
|
|
87
|
+
//start dynamic importing
|
|
88
|
+
let moduleClass = yield Promise.resolve(`${path + i}`).then(s => __importStar(require(s)));
|
|
89
|
+
if (!moduleClass || !moduleClass.default) {
|
|
90
|
+
console.warn(`WARN: Cannot import module ${i} in path ${path + i}`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
let moduleInstance = new moduleClass.default();
|
|
94
|
+
//test malformed module
|
|
95
|
+
if (!(moduleInstance instanceof parser_1.ParserModule)) {
|
|
96
|
+
console.warn(`WARN: file ${path + i} is not a module, skipped`);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (moduleInstance.requiredAttr.length != moduleInstance.cmdName.length) {
|
|
100
|
+
console.warn(`WARN: module ${i} is malformed: paramName and cmdName length does not matched up, auto filled with empty arrays`);
|
|
101
|
+
while (moduleInstance.cmdName.length > moduleInstance.requiredAttr.length) {
|
|
102
|
+
moduleInstance.requiredAttr.push([]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
let k = this.moduleArr.length;
|
|
106
|
+
this.moduleArr.push(moduleInstance);
|
|
107
|
+
moduleInstance.cmdName.forEach((n, index) => {
|
|
108
|
+
//if repeated keys appear, take the latter
|
|
109
|
+
if (this.moduleMap.has(n)) {
|
|
110
|
+
let [oldModuleNumber, _] = this.moduleMap.get(n);
|
|
111
|
+
let oldName = l.modulesInUse[oldModuleNumber];
|
|
112
|
+
if (oldModuleNumber == k) {
|
|
113
|
+
console.warn(`WARN: Module ${oldName} has duplicate command : ${n}`);
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
console.warn(`WARN: Repeated commands in multiple modules found, cmd = ${n}, originally from ${oldName}, currently override to use from module ${i}`);
|
|
117
|
+
}
|
|
118
|
+
this.moduleMap.set(n, [k, index]);
|
|
119
|
+
// console.log(`loaded cmd ${n} from module ${i}`)
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
this.loaded = true;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
parse_internal_lib_level(str, inRecur = false, escapedCharLimit = str.length) {
|
|
128
|
+
if (!inRecur) {
|
|
129
|
+
str = `<document>${str}</document>`; //if i dont do this, it doesnt work
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
//the lib wraps everything in a layer so we need to extract that layer
|
|
133
|
+
return (0, parse_xml_1.parseXml)(str, parser_1.lib_parse_option).children[0];
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
if (err.message.startsWith("Missing end tag")) {
|
|
137
|
+
let temp = err.message.indexOf("(line");
|
|
138
|
+
if (temp == -1)
|
|
139
|
+
throw err;
|
|
140
|
+
let cTag = err.message.slice(28, temp - 1);
|
|
141
|
+
let pre = str.slice(0, err.pos);
|
|
142
|
+
let post = str.slice(err.pos + 1);
|
|
143
|
+
const properClose = `</${cTag}>`;
|
|
144
|
+
const properOpen = `<${cTag}>`;
|
|
145
|
+
//situation patchfix 1: allowing </> as a universal end tag
|
|
146
|
+
//by repllacing </> with the proper close tag
|
|
147
|
+
const flag1 = str.slice(err.pos, err.pos + 3) === "</>";
|
|
148
|
+
if (flag1) {
|
|
149
|
+
post = str.slice(err.pos + 3);
|
|
150
|
+
return this.parse_internal_lib_level(pre + properClose + post, true, escapedCharLimit); //reparse
|
|
151
|
+
}
|
|
152
|
+
const errorChar = str[err.pos];
|
|
153
|
+
if (errorChar) {
|
|
154
|
+
const escapedChar = `&#${errorChar.charCodeAt(0)};`;
|
|
155
|
+
//situation patchfix 2: escape the character that fails to parse
|
|
156
|
+
//try replacing the problematic character with its XML entity
|
|
157
|
+
if (escapedCharLimit <= 0)
|
|
158
|
+
throw err;
|
|
159
|
+
return this.parse_internal_lib_level(pre + escapedChar + post, true, escapedCharLimit - 1);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
throw err;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
parse_internal_loader_level_node(originalXML, tree, o, children) {
|
|
166
|
+
const cmd = tree.name;
|
|
167
|
+
if (this.moduleMap.has(cmd)) {
|
|
168
|
+
const [moduleIndex, cmdIndex] = this.moduleMap.get(cmd);
|
|
169
|
+
const module = this.moduleArr[moduleIndex];
|
|
170
|
+
const inputObj = module.generateInputObj(cmdIndex, tree.attributes, children);
|
|
171
|
+
if (!inputObj) {
|
|
172
|
+
//incorrect input
|
|
173
|
+
const errMes = `Failed to parse input for module ${cmd}, tried to parse attributes: ${JSON.stringify(tree.attributes, null, 0)}, required attributes = ${JSON.stringify(module.requiredAttr[cmdIndex], null, 0)}, reverting to text node`;
|
|
174
|
+
//console.warn(errMes)
|
|
175
|
+
return [new parser_1.TextComponent(tree.text, errMes, cmd, tree.text)];
|
|
176
|
+
}
|
|
177
|
+
return module.evaluate(cmd, inputObj, o, tree.text);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
const errMes = `WARN: unknown module, tried to invoke ${cmd}, reverting to a text node`;
|
|
181
|
+
// console.warn(errMes)
|
|
182
|
+
return [new parser_1.TextComponent(tree.text, errMes, cmd, tree.text)];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
parse_internal_loader_level(originalXML, tree, o) {
|
|
186
|
+
if (tree instanceof parse_xml_2.XmlProcessingInstruction) {
|
|
187
|
+
//undefined behavior?
|
|
188
|
+
//idk what this shit is???
|
|
189
|
+
const errMes = `WARN: XML processing instruction not supported (trying to parse instuction name = ${tree.name}, content = ${tree.content}), reverting to text node`;
|
|
190
|
+
// console.warn(errMes)
|
|
191
|
+
return [new parser_1.TextComponent(originalXML.slice(tree.start, tree.end), errMes, undefined, originalXML.slice(tree.start, tree.end))];
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
if (!tree.children || !tree.children.length) {
|
|
195
|
+
//base case
|
|
196
|
+
if (tree.type == "text") {
|
|
197
|
+
return [new parser_1.TextComponent(tree.text, undefined, undefined, tree.text)];
|
|
198
|
+
}
|
|
199
|
+
return this.parse_internal_loader_level_node(originalXML, tree, o, []);
|
|
200
|
+
}
|
|
201
|
+
const deeperParse = tree.children.map((i) => this.parse_internal_loader_level(originalXML, i, o));
|
|
202
|
+
return this.parse_internal_loader_level_node(originalXML, tree, o, deeperParse);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
recur_flat_tree(tree) {
|
|
206
|
+
let r = [];
|
|
207
|
+
tree.forEach(i => {
|
|
208
|
+
if (i instanceof parser_1.DisplayComponent)
|
|
209
|
+
r.push(i);
|
|
210
|
+
else
|
|
211
|
+
r.push(...this.recur_flat_tree(i));
|
|
212
|
+
});
|
|
213
|
+
return r;
|
|
214
|
+
}
|
|
215
|
+
equationRegex(prefixOperator, inFixOperator, postFixOperator, elementRegex, prefix, postfix) {
|
|
216
|
+
const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
217
|
+
// Operators
|
|
218
|
+
const preOps = prefixOperator.length ? `(?:${prefixOperator.map(escape).join("|")})?` : "";
|
|
219
|
+
const inOps = inFixOperator.length ? `(?:${inFixOperator.map(escape).join("|")})` : "";
|
|
220
|
+
const postOps = postFixOperator.length ? `(?:${postFixOperator.map(escape).join("|")})?` : "";
|
|
221
|
+
// Base element core
|
|
222
|
+
const elemCore = elementRegex.source;
|
|
223
|
+
// Bracketed sub-expressions
|
|
224
|
+
const bracketed = [
|
|
225
|
+
`\\(${elemCore}(?:\\s*${inOps}\\s*${elemCore})*\\)`,
|
|
226
|
+
`\\[${elemCore}(?:\\s*${inOps}\\s*${elemCore})*\\]`,
|
|
227
|
+
`\\{${elemCore}(?:\\s*${inOps}\\s*${elemCore})*\\}`
|
|
228
|
+
].join("|");
|
|
229
|
+
// Base element (prefix/postfix supported)
|
|
230
|
+
const elem = `${preOps}(?:${elemCore}|${bracketed})${postOps}`;
|
|
231
|
+
// Ternary expression form
|
|
232
|
+
const ternary = `${elem}\\s*\\?\\s*${elem}\\s*:\\s*${elem}`;
|
|
233
|
+
// Combined atomic unit: an element or a ternary expression
|
|
234
|
+
const atomic = `(?:${ternary}|${elem})`;
|
|
235
|
+
// Equation body (chain of atomic units with infix ops)
|
|
236
|
+
const body = `${atomic}(?:\\s*${inOps}\\s*${atomic})*`;
|
|
237
|
+
// Boundaries
|
|
238
|
+
const start = `(?:${escape(prefix)})`;
|
|
239
|
+
const end = postfix ? `(?:${escape(postfix)})` : "";
|
|
240
|
+
return new RegExp(`${start}\\s*(${body})\\s*${end}`, "g");
|
|
241
|
+
}
|
|
242
|
+
preParseXML(XML) {
|
|
243
|
+
const [reg1, reg2] = this.preparse_regs;
|
|
244
|
+
const segments = []; // ordered pieces of the final output
|
|
245
|
+
let lastIndex = 0;
|
|
246
|
+
// Scan for all reg2 matches
|
|
247
|
+
XML.replace(reg2, (match, group, offset) => {
|
|
248
|
+
// Unprotected text before this reg2 match
|
|
249
|
+
if (offset > lastIndex) {
|
|
250
|
+
const chunk = XML.slice(lastIndex, offset);
|
|
251
|
+
segments.push(this.applyReg1(chunk, reg1));
|
|
252
|
+
}
|
|
253
|
+
segments.push(`<expr> ${group} </>`);
|
|
254
|
+
lastIndex = offset + match.length;
|
|
255
|
+
return ""; // not used
|
|
256
|
+
});
|
|
257
|
+
// Remainder after last reg2 match
|
|
258
|
+
if (lastIndex < XML.length) {
|
|
259
|
+
const chunk = XML.slice(lastIndex);
|
|
260
|
+
segments.push(this.applyReg1(chunk, reg1));
|
|
261
|
+
}
|
|
262
|
+
return segments.join("");
|
|
263
|
+
}
|
|
264
|
+
// Apply reg1 only to normal text (NOT inside reg2 results)
|
|
265
|
+
applyReg1(text, reg1) {
|
|
266
|
+
return text.replace(reg1, (_, str) => str
|
|
267
|
+
.split("")
|
|
268
|
+
.map((c) => `<expr> ${c} </>`)
|
|
269
|
+
.join(""));
|
|
270
|
+
}
|
|
271
|
+
parse(XML, o) {
|
|
272
|
+
if (!this.loaded) {
|
|
273
|
+
throw `Parser did not finish loading modules, call load() first`;
|
|
274
|
+
}
|
|
275
|
+
//replace shorthands with actual tags
|
|
276
|
+
//=abc...
|
|
277
|
+
XML = this.preParseXML(XML);
|
|
278
|
+
let tree;
|
|
279
|
+
try {
|
|
280
|
+
tree = this.parse_internal_lib_level(XML);
|
|
281
|
+
}
|
|
282
|
+
catch (e) {
|
|
283
|
+
return [new parser_1.TextComponent(XML, "Failed to parse XML")];
|
|
284
|
+
}
|
|
285
|
+
if (!tree.children || !tree.children.length)
|
|
286
|
+
return [];
|
|
287
|
+
const parsedTree = tree.children.map(i => this.parse_internal_loader_level(XML, i, o));
|
|
288
|
+
if (o.flat_parse) {
|
|
289
|
+
return this.recur_flat_tree(parsedTree);
|
|
290
|
+
}
|
|
291
|
+
else
|
|
292
|
+
return parsedTree;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
exports.default = Parser;
|
|
296
|
+
/**
|
|
297
|
+
* Added shorthands:
|
|
298
|
+
* =abcABC... : prints out the value of a, b, c, A, B, C...
|
|
299
|
+
* = a + 1 + A : do the expression
|
|
300
|
+
/*
|
|
301
|
+
USAGE
|
|
302
|
+
|
|
303
|
+
async function main() {
|
|
304
|
+
let p = new parser()
|
|
305
|
+
await p.load(new loadOptions(undefined, ["qpOriginal"]))
|
|
306
|
+
|
|
307
|
+
let str = `test numeric: <if type = "number"><numeric> a + b > c </><string> A + B </><string> C + D </></>`
|
|
308
|
+
let str2 = `<string> A + B </><string> C + D </>`
|
|
309
|
+
let str3 = `<string> A + " I am a cat "</>`
|
|
310
|
+
let option = new parseOptions(mode.gameplay, "", [3.115926, -5, 50, "cat", "dog", "horse", "house"], false)
|
|
311
|
+
console.log(`parsing test1: `, p.parse(str, option))
|
|
312
|
+
console.log(`parsing test2: `,p.parse(str2, option))
|
|
313
|
+
console.log(`parsing test3: `,p.parse(str3, option))
|
|
314
|
+
//console.log("debugMode: ", JSON.stringify(p.debug_parse(str), null, 4))
|
|
315
|
+
}
|
|
316
|
+
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = __importDefault(require("../utils"));
|
|
7
|
+
const globalLoader = {
|
|
8
|
+
load() {
|
|
9
|
+
globalThis.Utils = utils_1.default;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.default = globalLoader;
|