@sharpee/world-model 0.9.66-beta → 0.9.69-beta
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/annotations/index.d.ts +2 -0
- package/annotations/index.d.ts.map +1 -0
- package/annotations/index.js +18 -0
- package/annotations/index.js.map +1 -0
- package/annotations/types.d.ts +35 -0
- package/annotations/types.d.ts.map +1 -0
- package/annotations/types.js +9 -0
- package/annotations/types.js.map +1 -0
- package/behaviors/attack.d.ts +52 -0
- package/behaviors/attack.d.ts.map +1 -0
- package/behaviors/attack.js +161 -0
- package/behaviors/attack.js.map +1 -0
- package/behaviors/behavior.d.ts +67 -0
- package/behaviors/behavior.d.ts.map +1 -0
- package/behaviors/behavior.js +80 -0
- package/behaviors/behavior.js.map +1 -0
- package/behaviors/index.d.ts +21 -0
- package/behaviors/index.d.ts.map +1 -0
- package/behaviors/index.js +39 -0
- package/behaviors/index.js.map +1 -0
- package/capabilities/action-interceptor.d.ts +169 -0
- package/capabilities/action-interceptor.d.ts.map +1 -0
- package/capabilities/action-interceptor.js +15 -0
- package/capabilities/action-interceptor.js.map +1 -0
- package/capabilities/capability-behavior.d.ts +112 -0
- package/capabilities/capability-behavior.d.ts.map +1 -0
- package/capabilities/capability-behavior.js +9 -0
- package/capabilities/capability-behavior.js.map +1 -0
- package/capabilities/capability-defaults.d.ts +67 -0
- package/capabilities/capability-defaults.d.ts.map +1 -0
- package/capabilities/capability-defaults.js +81 -0
- package/capabilities/capability-defaults.js.map +1 -0
- package/capabilities/capability-helpers.d.ts +76 -0
- package/capabilities/capability-helpers.d.ts.map +1 -0
- package/capabilities/capability-helpers.js +112 -0
- package/capabilities/capability-helpers.js.map +1 -0
- package/capabilities/capability-registry.d.ts +115 -0
- package/capabilities/capability-registry.d.ts.map +1 -0
- package/capabilities/capability-registry.js +136 -0
- package/capabilities/capability-registry.js.map +1 -0
- package/capabilities/entity-builder.d.ts +79 -0
- package/capabilities/entity-builder.d.ts.map +1 -0
- package/capabilities/entity-builder.js +116 -0
- package/capabilities/entity-builder.js.map +1 -0
- package/capabilities/index.d.ts +16 -0
- package/capabilities/index.d.ts.map +1 -0
- package/capabilities/index.js +56 -0
- package/capabilities/index.js.map +1 -0
- package/capabilities/interceptor-helpers.d.ts +74 -0
- package/capabilities/interceptor-helpers.d.ts.map +1 -0
- package/capabilities/interceptor-helpers.js +111 -0
- package/capabilities/interceptor-helpers.js.map +1 -0
- package/capabilities/interceptor-registry.d.ts +125 -0
- package/capabilities/interceptor-registry.d.ts.map +1 -0
- package/capabilities/interceptor-registry.js +176 -0
- package/capabilities/interceptor-registry.js.map +1 -0
- package/capabilities/types.d.ts +35 -0
- package/capabilities/types.d.ts.map +1 -0
- package/capabilities/types.js +16 -0
- package/capabilities/types.js.map +1 -0
- package/commands/command-types.d.ts +30 -0
- package/commands/command-types.d.ts.map +1 -0
- package/commands/command-types.js +6 -0
- package/commands/command-types.js.map +1 -0
- package/commands/index.d.ts +7 -0
- package/commands/index.d.ts.map +1 -0
- package/commands/index.js +23 -0
- package/commands/index.js.map +1 -0
- package/commands/parsed-command.d.ts +204 -0
- package/commands/parsed-command.d.ts.map +1 -0
- package/commands/parsed-command.js +25 -0
- package/commands/parsed-command.js.map +1 -0
- package/commands/validated-command.d.ts +52 -0
- package/commands/validated-command.d.ts.map +1 -0
- package/commands/validated-command.js +8 -0
- package/commands/validated-command.js.map +1 -0
- package/constants/action-failures.d.ts +54 -0
- package/constants/action-failures.d.ts.map +1 -0
- package/constants/action-failures.js +68 -0
- package/constants/action-failures.js.map +1 -0
- package/constants/directions.d.ts +32 -0
- package/constants/directions.d.ts.map +1 -0
- package/constants/directions.js +53 -0
- package/constants/directions.js.map +1 -0
- package/constants/if-events.d.ts +5 -0
- package/constants/if-events.d.ts.map +1 -0
- package/constants/if-events.js +10 -0
- package/constants/if-events.js.map +1 -0
- package/constants/index.d.ts +9 -0
- package/constants/index.d.ts.map +1 -0
- package/constants/index.js +25 -0
- package/constants/index.js.map +1 -0
- package/entities/entity-store.d.ts +66 -0
- package/entities/entity-store.d.ts.map +1 -0
- package/entities/entity-store.js +116 -0
- package/entities/entity-store.js.map +1 -0
- package/entities/entity-types.d.ts +40 -0
- package/entities/entity-types.d.ts.map +1 -0
- package/entities/entity-types.js +56 -0
- package/entities/entity-types.js.map +1 -0
- package/entities/if-entity.d.ts +314 -0
- package/entities/if-entity.d.ts.map +1 -0
- package/entities/if-entity.js +621 -0
- package/entities/if-entity.js.map +1 -0
- package/entities/index.d.ts +5 -0
- package/entities/index.d.ts.map +1 -0
- package/entities/index.js +13 -0
- package/entities/index.js.map +1 -0
- package/events/types.d.ts +45 -0
- package/events/types.d.ts.map +1 -0
- package/events/types.js +9 -0
- package/events/types.js.map +1 -0
- package/examples/event-handler-registration.d.ts +14 -0
- package/examples/event-handler-registration.d.ts.map +1 -0
- package/examples/event-handler-registration.js +158 -0
- package/examples/event-handler-registration.js.map +1 -0
- package/extensions/base-extension.d.ts +69 -0
- package/extensions/base-extension.d.ts.map +1 -0
- package/extensions/base-extension.js +83 -0
- package/extensions/base-extension.js.map +1 -0
- package/extensions/index.d.ts +11 -0
- package/extensions/index.d.ts.map +1 -0
- package/extensions/index.js +39 -0
- package/extensions/index.js.map +1 -0
- package/extensions/loader.d.ts +52 -0
- package/extensions/loader.d.ts.map +1 -0
- package/extensions/loader.js +177 -0
- package/extensions/loader.js.map +1 -0
- package/extensions/manager.d.ts +68 -0
- package/extensions/manager.d.ts.map +1 -0
- package/extensions/manager.js +164 -0
- package/extensions/manager.js.map +1 -0
- package/extensions/registry.d.ts +100 -0
- package/extensions/registry.d.ts.map +1 -0
- package/extensions/registry.js +193 -0
- package/extensions/registry.js.map +1 -0
- package/extensions/types.d.ts +226 -0
- package/extensions/types.d.ts.map +1 -0
- package/extensions/types.js +28 -0
- package/extensions/types.js.map +1 -0
- package/index.d.ts +41 -0
- package/index.d.ts.map +1 -0
- package/index.js +71 -0
- package/index.js.map +1 -0
- package/interfaces/command-executor.d.ts +17 -0
- package/interfaces/command-executor.d.ts.map +1 -0
- package/interfaces/command-executor.js +6 -0
- package/interfaces/command-executor.js.map +1 -0
- package/interfaces/command-processor.d.ts +17 -0
- package/interfaces/command-processor.d.ts.map +1 -0
- package/interfaces/command-processor.js +6 -0
- package/interfaces/command-processor.js.map +1 -0
- package/interfaces/command-validator.d.ts +17 -0
- package/interfaces/command-validator.d.ts.map +1 -0
- package/interfaces/command-validator.js +6 -0
- package/interfaces/command-validator.js.map +1 -0
- package/interfaces/index.d.ts +8 -0
- package/interfaces/index.d.ts.map +1 -0
- package/interfaces/index.js +24 -0
- package/interfaces/index.js.map +1 -0
- package/interfaces/language-provider.d.ts +86 -0
- package/interfaces/language-provider.d.ts.map +1 -0
- package/interfaces/language-provider.js +14 -0
- package/interfaces/language-provider.js.map +1 -0
- package/interfaces/parser.d.ts +16 -0
- package/interfaces/parser.d.ts.map +1 -0
- package/interfaces/parser.js +6 -0
- package/interfaces/parser.js.map +1 -0
- package/package.json +1 -16
- package/scope/index.d.ts +8 -0
- package/scope/index.d.ts.map +1 -0
- package/scope/index.js +24 -0
- package/scope/index.js.map +1 -0
- package/scope/scope-evaluator.d.ts +58 -0
- package/scope/scope-evaluator.d.ts.map +1 -0
- package/scope/scope-evaluator.js +207 -0
- package/scope/scope-evaluator.js.map +1 -0
- package/scope/scope-registry.d.ts +59 -0
- package/scope/scope-registry.d.ts.map +1 -0
- package/scope/scope-registry.js +182 -0
- package/scope/scope-registry.js.map +1 -0
- package/scope/scope-rule.d.ts +86 -0
- package/scope/scope-rule.d.ts.map +1 -0
- package/scope/scope-rule.js +7 -0
- package/scope/scope-rule.js.map +1 -0
- package/services/ScopeService.d.ts +8 -0
- package/services/ScopeService.d.ts.map +1 -0
- package/services/ScopeService.js +19 -0
- package/services/ScopeService.js.map +1 -0
- package/services/index.d.ts +2 -0
- package/services/index.d.ts.map +1 -0
- package/services/index.js +6 -0
- package/services/index.js.map +1 -0
- package/test-structure.d.ts +3 -0
- package/test-structure.d.ts.map +1 -0
- package/test-structure.js +26 -0
- package/test-structure.js.map +1 -0
- package/traits/actor/actorBehavior.d.ts +121 -0
- package/traits/actor/actorBehavior.d.ts.map +1 -0
- package/traits/actor/actorBehavior.js +288 -0
- package/traits/actor/actorBehavior.js.map +1 -0
- package/traits/actor/actorTrait.d.ts +158 -0
- package/traits/actor/actorTrait.d.ts.map +1 -0
- package/traits/actor/actorTrait.js +152 -0
- package/traits/actor/actorTrait.js.map +1 -0
- package/traits/actor/index.d.ts +3 -0
- package/traits/actor/index.d.ts.map +1 -0
- package/traits/actor/index.js +11 -0
- package/traits/actor/index.js.map +1 -0
- package/traits/all-traits.d.ts +95 -0
- package/traits/all-traits.d.ts.map +1 -0
- package/traits/all-traits.js +178 -0
- package/traits/all-traits.js.map +1 -0
- package/traits/attached/attachedTrait.d.ts +61 -0
- package/traits/attached/attachedTrait.d.ts.map +1 -0
- package/traits/attached/attachedTrait.js +36 -0
- package/traits/attached/attachedTrait.js.map +1 -0
- package/traits/attached/index.d.ts +2 -0
- package/traits/attached/index.d.ts.map +1 -0
- package/traits/attached/index.js +18 -0
- package/traits/attached/index.js.map +1 -0
- package/traits/breakable/breakableBehavior.d.ts +43 -0
- package/traits/breakable/breakableBehavior.d.ts.map +1 -0
- package/traits/breakable/breakableBehavior.js +70 -0
- package/traits/breakable/breakableBehavior.js.map +1 -0
- package/traits/breakable/breakableTrait.d.ts +22 -0
- package/traits/breakable/breakableTrait.d.ts.map +1 -0
- package/traits/breakable/breakableTrait.js +25 -0
- package/traits/breakable/breakableTrait.js.map +1 -0
- package/traits/breakable/index.d.ts +3 -0
- package/traits/breakable/index.d.ts.map +1 -0
- package/traits/breakable/index.js +8 -0
- package/traits/breakable/index.js.map +1 -0
- package/traits/button/buttonTrait.d.ts +53 -0
- package/traits/button/buttonTrait.d.ts.map +1 -0
- package/traits/button/buttonTrait.js +36 -0
- package/traits/button/buttonTrait.js.map +1 -0
- package/traits/button/index.d.ts +2 -0
- package/traits/button/index.d.ts.map +1 -0
- package/traits/button/index.js +18 -0
- package/traits/button/index.js.map +1 -0
- package/traits/climbable/climbableBehavior.d.ts +37 -0
- package/traits/climbable/climbableBehavior.d.ts.map +1 -0
- package/traits/climbable/climbableBehavior.js +70 -0
- package/traits/climbable/climbableBehavior.js.map +1 -0
- package/traits/climbable/climbableTrait.d.ts +31 -0
- package/traits/climbable/climbableTrait.d.ts.map +1 -0
- package/traits/climbable/climbableTrait.js +47 -0
- package/traits/climbable/climbableTrait.js.map +1 -0
- package/traits/climbable/index.d.ts +6 -0
- package/traits/climbable/index.d.ts.map +1 -0
- package/traits/climbable/index.js +22 -0
- package/traits/climbable/index.js.map +1 -0
- package/traits/clothing/clothingTrait.d.ts +58 -0
- package/traits/clothing/clothingTrait.d.ts.map +1 -0
- package/traits/clothing/clothingTrait.js +78 -0
- package/traits/clothing/clothingTrait.js.map +1 -0
- package/traits/clothing/index.d.ts +2 -0
- package/traits/clothing/index.d.ts.map +1 -0
- package/traits/clothing/index.js +19 -0
- package/traits/clothing/index.js.map +1 -0
- package/traits/combatant/combatantBehavior.d.ts +70 -0
- package/traits/combatant/combatantBehavior.d.ts.map +1 -0
- package/traits/combatant/combatantBehavior.js +155 -0
- package/traits/combatant/combatantBehavior.js.map +1 -0
- package/traits/combatant/combatantTrait.d.ts +98 -0
- package/traits/combatant/combatantTrait.d.ts.map +1 -0
- package/traits/combatant/combatantTrait.js +122 -0
- package/traits/combatant/combatantTrait.js.map +1 -0
- package/traits/combatant/index.d.ts +3 -0
- package/traits/combatant/index.d.ts.map +1 -0
- package/traits/combatant/index.js +8 -0
- package/traits/combatant/index.js.map +1 -0
- package/traits/container/container-utils.d.ts +39 -0
- package/traits/container/container-utils.d.ts.map +1 -0
- package/traits/container/container-utils.js +72 -0
- package/traits/container/container-utils.js.map +1 -0
- package/traits/container/containerBehavior.d.ts +94 -0
- package/traits/container/containerBehavior.d.ts.map +1 -0
- package/traits/container/containerBehavior.js +256 -0
- package/traits/container/containerBehavior.js.map +1 -0
- package/traits/container/containerTrait.d.ts +30 -0
- package/traits/container/containerTrait.d.ts.map +1 -0
- package/traits/container/containerTrait.js +45 -0
- package/traits/container/containerTrait.js.map +1 -0
- package/traits/container/index.d.ts +4 -0
- package/traits/container/index.d.ts.map +1 -0
- package/traits/container/index.js +14 -0
- package/traits/container/index.js.map +1 -0
- package/traits/destructible/destructibleBehavior.d.ts +57 -0
- package/traits/destructible/destructibleBehavior.d.ts.map +1 -0
- package/traits/destructible/destructibleBehavior.js +145 -0
- package/traits/destructible/destructibleBehavior.js.map +1 -0
- package/traits/destructible/destructibleTrait.d.ts +49 -0
- package/traits/destructible/destructibleTrait.d.ts.map +1 -0
- package/traits/destructible/destructibleTrait.js +43 -0
- package/traits/destructible/destructibleTrait.js.map +1 -0
- package/traits/destructible/index.d.ts +3 -0
- package/traits/destructible/index.d.ts.map +1 -0
- package/traits/destructible/index.js +8 -0
- package/traits/destructible/index.js.map +1 -0
- package/traits/door/doorBehavior.d.ts +42 -0
- package/traits/door/doorBehavior.d.ts.map +1 -0
- package/traits/door/doorBehavior.js +76 -0
- package/traits/door/doorBehavior.js.map +1 -0
- package/traits/door/doorTrait.d.ts +19 -0
- package/traits/door/doorTrait.d.ts.map +1 -0
- package/traits/door/doorTrait.js +33 -0
- package/traits/door/doorTrait.js.map +1 -0
- package/traits/door/index.d.ts +3 -0
- package/traits/door/index.d.ts.map +1 -0
- package/traits/door/index.js +9 -0
- package/traits/door/index.js.map +1 -0
- package/traits/edible/edibleBehavior.d.ts +63 -0
- package/traits/edible/edibleBehavior.d.ts.map +1 -0
- package/traits/edible/edibleBehavior.js +157 -0
- package/traits/edible/edibleBehavior.js.map +1 -0
- package/traits/edible/edibleTrait.d.ts +57 -0
- package/traits/edible/edibleTrait.d.ts.map +1 -0
- package/traits/edible/edibleTrait.js +51 -0
- package/traits/edible/edibleTrait.js.map +1 -0
- package/traits/edible/index.d.ts +3 -0
- package/traits/edible/index.d.ts.map +1 -0
- package/traits/edible/index.js +20 -0
- package/traits/edible/index.js.map +1 -0
- package/traits/enterable/enterableTrait.d.ts +33 -0
- package/traits/enterable/enterableTrait.d.ts.map +1 -0
- package/traits/enterable/enterableTrait.js +38 -0
- package/traits/enterable/enterableTrait.js.map +1 -0
- package/traits/enterable/index.d.ts +5 -0
- package/traits/enterable/index.d.ts.map +1 -0
- package/traits/enterable/index.js +21 -0
- package/traits/enterable/index.js.map +1 -0
- package/traits/equipped/equippedTrait.d.ts +46 -0
- package/traits/equipped/equippedTrait.d.ts.map +1 -0
- package/traits/equipped/equippedTrait.js +34 -0
- package/traits/equipped/equippedTrait.js.map +1 -0
- package/traits/equipped/index.d.ts +2 -0
- package/traits/equipped/index.d.ts.map +1 -0
- package/traits/equipped/index.js +6 -0
- package/traits/equipped/index.js.map +1 -0
- package/traits/exit/exitBehavior.d.ts +51 -0
- package/traits/exit/exitBehavior.d.ts.map +1 -0
- package/traits/exit/exitBehavior.js +231 -0
- package/traits/exit/exitBehavior.js.map +1 -0
- package/traits/exit/exitTrait.d.ts +41 -0
- package/traits/exit/exitTrait.d.ts.map +1 -0
- package/traits/exit/exitTrait.js +75 -0
- package/traits/exit/exitTrait.js.map +1 -0
- package/traits/exit/index.d.ts +3 -0
- package/traits/exit/index.d.ts.map +1 -0
- package/traits/exit/index.js +9 -0
- package/traits/exit/index.js.map +1 -0
- package/traits/identity/identityBehavior.d.ts +64 -0
- package/traits/identity/identityBehavior.d.ts.map +1 -0
- package/traits/identity/identityBehavior.js +154 -0
- package/traits/identity/identityBehavior.js.map +1 -0
- package/traits/identity/identityTrait.d.ts +70 -0
- package/traits/identity/identityTrait.d.ts.map +1 -0
- package/traits/identity/identityTrait.js +79 -0
- package/traits/identity/identityTrait.js.map +1 -0
- package/traits/identity/index.d.ts +3 -0
- package/traits/identity/index.d.ts.map +1 -0
- package/traits/identity/index.js +20 -0
- package/traits/identity/index.js.map +1 -0
- package/traits/implementations.d.ts +52 -0
- package/traits/implementations.d.ts.map +1 -0
- package/traits/implementations.js +150 -0
- package/traits/implementations.js.map +1 -0
- package/traits/index.d.ts +37 -0
- package/traits/index.d.ts.map +1 -0
- package/traits/index.js +64 -0
- package/traits/index.js.map +1 -0
- package/traits/light-source/index.d.ts +3 -0
- package/traits/light-source/index.d.ts.map +1 -0
- package/traits/light-source/index.js +9 -0
- package/traits/light-source/index.js.map +1 -0
- package/traits/light-source/lightSourceBehavior.d.ts +57 -0
- package/traits/light-source/lightSourceBehavior.d.ts.map +1 -0
- package/traits/light-source/lightSourceBehavior.js +135 -0
- package/traits/light-source/lightSourceBehavior.js.map +1 -0
- package/traits/light-source/lightSourceTrait.d.ts +28 -0
- package/traits/light-source/lightSourceTrait.d.ts.map +1 -0
- package/traits/light-source/lightSourceTrait.js +37 -0
- package/traits/light-source/lightSourceTrait.js.map +1 -0
- package/traits/lockable/index.d.ts +3 -0
- package/traits/lockable/index.d.ts.map +1 -0
- package/traits/lockable/index.js +20 -0
- package/traits/lockable/index.js.map +1 -0
- package/traits/lockable/lockableBehavior.d.ts +88 -0
- package/traits/lockable/lockableBehavior.d.ts.map +1 -0
- package/traits/lockable/lockableBehavior.js +196 -0
- package/traits/lockable/lockableBehavior.js.map +1 -0
- package/traits/lockable/lockableTrait.d.ts +59 -0
- package/traits/lockable/lockableTrait.d.ts.map +1 -0
- package/traits/lockable/lockableTrait.js +50 -0
- package/traits/lockable/lockableTrait.js.map +1 -0
- package/traits/moveable-scenery/index.d.ts +2 -0
- package/traits/moveable-scenery/index.d.ts.map +1 -0
- package/traits/moveable-scenery/index.js +18 -0
- package/traits/moveable-scenery/index.js.map +1 -0
- package/traits/moveable-scenery/moveableSceneryTrait.d.ts +69 -0
- package/traits/moveable-scenery/moveableSceneryTrait.d.ts.map +1 -0
- package/traits/moveable-scenery/moveableSceneryTrait.js +43 -0
- package/traits/moveable-scenery/moveableSceneryTrait.js.map +1 -0
- package/traits/npc/index.d.ts +5 -0
- package/traits/npc/index.d.ts.map +1 -0
- package/traits/npc/index.js +9 -0
- package/traits/npc/index.js.map +1 -0
- package/traits/npc/npcTrait.d.ts +128 -0
- package/traits/npc/npcTrait.d.ts.map +1 -0
- package/traits/npc/npcTrait.js +180 -0
- package/traits/npc/npcTrait.js.map +1 -0
- package/traits/openable/index.d.ts +3 -0
- package/traits/openable/index.d.ts.map +1 -0
- package/traits/openable/index.js +20 -0
- package/traits/openable/index.js.map +1 -0
- package/traits/openable/openableBehavior.d.ts +64 -0
- package/traits/openable/openableBehavior.d.ts.map +1 -0
- package/traits/openable/openableBehavior.js +109 -0
- package/traits/openable/openableBehavior.js.map +1 -0
- package/traits/openable/openableTrait.d.ts +46 -0
- package/traits/openable/openableTrait.d.ts.map +1 -0
- package/traits/openable/openableTrait.js +42 -0
- package/traits/openable/openableTrait.js.map +1 -0
- package/traits/pullable/index.d.ts +2 -0
- package/traits/pullable/index.d.ts.map +1 -0
- package/traits/pullable/index.js +18 -0
- package/traits/pullable/index.js.map +1 -0
- package/traits/pullable/pullableTrait.d.ts +81 -0
- package/traits/pullable/pullableTrait.d.ts.map +1 -0
- package/traits/pullable/pullableTrait.js +44 -0
- package/traits/pullable/pullableTrait.js.map +1 -0
- package/traits/pushable/index.d.ts +2 -0
- package/traits/pushable/index.d.ts.map +1 -0
- package/traits/pushable/index.js +18 -0
- package/traits/pushable/index.js.map +1 -0
- package/traits/pushable/pushableTrait.d.ts +81 -0
- package/traits/pushable/pushableTrait.d.ts.map +1 -0
- package/traits/pushable/pushableTrait.js +44 -0
- package/traits/pushable/pushableTrait.js.map +1 -0
- package/traits/readable/index.d.ts +3 -0
- package/traits/readable/index.d.ts.map +1 -0
- package/traits/readable/index.js +9 -0
- package/traits/readable/index.js.map +1 -0
- package/traits/readable/readableBehavior.d.ts +42 -0
- package/traits/readable/readableBehavior.d.ts.map +1 -0
- package/traits/readable/readableBehavior.js +174 -0
- package/traits/readable/readableBehavior.js.map +1 -0
- package/traits/readable/readableTrait.d.ts +37 -0
- package/traits/readable/readableTrait.d.ts.map +1 -0
- package/traits/readable/readableTrait.js +51 -0
- package/traits/readable/readableTrait.js.map +1 -0
- package/traits/register-all.d.ts +10 -0
- package/traits/register-all.d.ts.map +1 -0
- package/traits/register-all.js +19 -0
- package/traits/register-all.js.map +1 -0
- package/traits/room/index.d.ts +9 -0
- package/traits/room/index.d.ts.map +1 -0
- package/traits/room/index.js +14 -0
- package/traits/room/index.js.map +1 -0
- package/traits/room/roomBehavior.d.ts +87 -0
- package/traits/room/roomBehavior.d.ts.map +1 -0
- package/traits/room/roomBehavior.js +232 -0
- package/traits/room/roomBehavior.js.map +1 -0
- package/traits/room/roomTrait.d.ts +101 -0
- package/traits/room/roomTrait.d.ts.map +1 -0
- package/traits/room/roomTrait.js +59 -0
- package/traits/room/roomTrait.js.map +1 -0
- package/traits/scenery/index.d.ts +3 -0
- package/traits/scenery/index.d.ts.map +1 -0
- package/traits/scenery/index.js +9 -0
- package/traits/scenery/index.js.map +1 -0
- package/traits/scenery/sceneryBehavior.d.ts +21 -0
- package/traits/scenery/sceneryBehavior.d.ts.map +1 -0
- package/traits/scenery/sceneryBehavior.js +42 -0
- package/traits/scenery/sceneryBehavior.js.map +1 -0
- package/traits/scenery/sceneryTrait.d.ts +30 -0
- package/traits/scenery/sceneryTrait.d.ts.map +1 -0
- package/traits/scenery/sceneryTrait.js +39 -0
- package/traits/scenery/sceneryTrait.js.map +1 -0
- package/traits/story-info/index.d.ts +2 -0
- package/traits/story-info/index.d.ts.map +1 -0
- package/traits/story-info/index.js +6 -0
- package/traits/story-info/index.js.map +1 -0
- package/traits/story-info/storyInfoTrait.d.ts +22 -0
- package/traits/story-info/storyInfoTrait.d.ts.map +1 -0
- package/traits/story-info/storyInfoTrait.js +30 -0
- package/traits/story-info/storyInfoTrait.js.map +1 -0
- package/traits/supporter/index.d.ts +3 -0
- package/traits/supporter/index.d.ts.map +1 -0
- package/traits/supporter/index.js +9 -0
- package/traits/supporter/index.js.map +1 -0
- package/traits/supporter/supporterBehavior.d.ts +83 -0
- package/traits/supporter/supporterBehavior.d.ts.map +1 -0
- package/traits/supporter/supporterBehavior.js +210 -0
- package/traits/supporter/supporterBehavior.js.map +1 -0
- package/traits/supporter/supporterTrait.d.ts +26 -0
- package/traits/supporter/supporterTrait.d.ts.map +1 -0
- package/traits/supporter/supporterTrait.js +30 -0
- package/traits/supporter/supporterTrait.js.map +1 -0
- package/traits/switchable/index.d.ts +3 -0
- package/traits/switchable/index.d.ts.map +1 -0
- package/traits/switchable/index.js +20 -0
- package/traits/switchable/index.js.map +1 -0
- package/traits/switchable/switchableBehavior.d.ts +73 -0
- package/traits/switchable/switchableBehavior.d.ts.map +1 -0
- package/traits/switchable/switchableBehavior.js +191 -0
- package/traits/switchable/switchableBehavior.js.map +1 -0
- package/traits/switchable/switchableTrait.d.ts +61 -0
- package/traits/switchable/switchableTrait.d.ts.map +1 -0
- package/traits/switchable/switchableTrait.js +52 -0
- package/traits/switchable/switchableTrait.js.map +1 -0
- package/traits/trait-types.d.ts +82 -0
- package/traits/trait-types.d.ts.map +1 -0
- package/traits/trait-types.js +150 -0
- package/traits/trait-types.js.map +1 -0
- package/traits/trait.d.ts +44 -0
- package/traits/trait.d.ts.map +1 -0
- package/traits/trait.js +42 -0
- package/traits/trait.js.map +1 -0
- package/traits/vehicle/index.d.ts +6 -0
- package/traits/vehicle/index.d.ts.map +1 -0
- package/traits/vehicle/index.js +22 -0
- package/traits/vehicle/index.js.map +1 -0
- package/traits/vehicle/vehicleBehavior.d.ts +62 -0
- package/traits/vehicle/vehicleBehavior.d.ts.map +1 -0
- package/traits/vehicle/vehicleBehavior.js +145 -0
- package/traits/vehicle/vehicleBehavior.js.map +1 -0
- package/traits/vehicle/vehicleTrait.d.ts +77 -0
- package/traits/vehicle/vehicleTrait.d.ts.map +1 -0
- package/traits/vehicle/vehicleTrait.js +92 -0
- package/traits/vehicle/vehicleTrait.js.map +1 -0
- package/traits/weapon/index.d.ts +3 -0
- package/traits/weapon/index.d.ts.map +1 -0
- package/traits/weapon/index.js +8 -0
- package/traits/weapon/index.js.map +1 -0
- package/traits/weapon/weaponBehavior.d.ts +47 -0
- package/traits/weapon/weaponBehavior.d.ts.map +1 -0
- package/traits/weapon/weaponBehavior.js +106 -0
- package/traits/weapon/weaponBehavior.js.map +1 -0
- package/traits/weapon/weaponTrait.d.ts +67 -0
- package/traits/weapon/weaponTrait.d.ts.map +1 -0
- package/traits/weapon/weaponTrait.js +60 -0
- package/traits/weapon/weaponTrait.js.map +1 -0
- package/traits/wearable/index.d.ts +3 -0
- package/traits/wearable/index.d.ts.map +1 -0
- package/traits/wearable/index.js +20 -0
- package/traits/wearable/index.js.map +1 -0
- package/traits/wearable/wearableBehavior.d.ts +64 -0
- package/traits/wearable/wearableBehavior.d.ts.map +1 -0
- package/traits/wearable/wearableBehavior.js +142 -0
- package/traits/wearable/wearableBehavior.js.map +1 -0
- package/traits/wearable/wearableTrait.d.ts +54 -0
- package/traits/wearable/wearableTrait.d.ts.map +1 -0
- package/traits/wearable/wearableTrait.js +53 -0
- package/traits/wearable/wearableTrait.js.map +1 -0
- package/utils/event-utils.d.ts +30 -0
- package/utils/event-utils.d.ts.map +1 -0
- package/utils/event-utils.js +33 -0
- package/utils/event-utils.js.map +1 -0
- package/world/AuthorModel.d.ts +151 -0
- package/world/AuthorModel.d.ts.map +1 -0
- package/world/AuthorModel.js +416 -0
- package/world/AuthorModel.js.map +1 -0
- package/world/SharedDataStore.d.ts +24 -0
- package/world/SharedDataStore.d.ts.map +1 -0
- package/world/SharedDataStore.js +50 -0
- package/world/SharedDataStore.js.map +1 -0
- package/world/SpatialIndex.d.ts +16 -0
- package/world/SpatialIndex.d.ts.map +1 -0
- package/world/SpatialIndex.js +117 -0
- package/world/SpatialIndex.js.map +1 -0
- package/world/VisibilityBehavior.d.ts +83 -0
- package/world/VisibilityBehavior.d.ts.map +1 -0
- package/world/VisibilityBehavior.js +484 -0
- package/world/VisibilityBehavior.js.map +1 -0
- package/world/WorldModel.d.ts +301 -0
- package/world/WorldModel.d.ts.map +1 -0
- package/world/WorldModel.js +1085 -0
- package/world/WorldModel.js.map +1 -0
- package/world/capabilities.d.ts +36 -0
- package/world/capabilities.d.ts.map +1 -0
- package/world/capabilities.js +18 -0
- package/world/capabilities.js.map +1 -0
- package/world/index.d.ts +7 -0
- package/world/index.d.ts.map +1 -0
- package/world/index.js +21 -0
- package/world/index.js.map +1 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IFEntity } from './if-entity';
|
|
2
|
+
/**
|
|
3
|
+
* Entity store that works with IFEntity instances.
|
|
4
|
+
* Provides trait-aware entity management.
|
|
5
|
+
*/
|
|
6
|
+
export declare class EntityStore {
|
|
7
|
+
private ifEntities;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Add an IF entity to the store
|
|
11
|
+
*/
|
|
12
|
+
add(entity: IFEntity): void;
|
|
13
|
+
/**
|
|
14
|
+
* Get an IF entity by ID
|
|
15
|
+
*/
|
|
16
|
+
get(id: string): IFEntity | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Check if an entity exists
|
|
19
|
+
*/
|
|
20
|
+
has(id: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Remove an entity from the store
|
|
23
|
+
*/
|
|
24
|
+
remove(id: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Get all entities
|
|
27
|
+
*/
|
|
28
|
+
getAll(): IFEntity[];
|
|
29
|
+
/**
|
|
30
|
+
* Get entities by type
|
|
31
|
+
*/
|
|
32
|
+
getByType(type: string): IFEntity[];
|
|
33
|
+
/**
|
|
34
|
+
* Find entities with a specific trait
|
|
35
|
+
*/
|
|
36
|
+
findWithTrait(traitType: string): IFEntity[];
|
|
37
|
+
/**
|
|
38
|
+
* Find entities with all specified traits
|
|
39
|
+
*/
|
|
40
|
+
findWithAllTraits(...traitTypes: string[]): IFEntity[];
|
|
41
|
+
/**
|
|
42
|
+
* Find entities with any of the specified traits
|
|
43
|
+
*/
|
|
44
|
+
findWithAnyTraits(...traitTypes: string[]): IFEntity[];
|
|
45
|
+
/**
|
|
46
|
+
* Clear all entities from the store
|
|
47
|
+
*/
|
|
48
|
+
clear(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get the number of entities in the store
|
|
51
|
+
*/
|
|
52
|
+
get size(): number;
|
|
53
|
+
/**
|
|
54
|
+
* Iterate over all entities
|
|
55
|
+
*/
|
|
56
|
+
[Symbol.iterator](): Iterator<IFEntity>;
|
|
57
|
+
/**
|
|
58
|
+
* Serialize all entities to JSON
|
|
59
|
+
*/
|
|
60
|
+
toJSON(): any[];
|
|
61
|
+
/**
|
|
62
|
+
* Load entities from JSON data
|
|
63
|
+
*/
|
|
64
|
+
static fromJSON(json: any[]): EntityStore;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=entity-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-store.d.ts","sourceRoot":"","sources":["../../../../../../mnt/c/repotemp/sharpee/packages/world-model/src/entities/entity-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,UAAU,CAAwB;;IAM1C;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI;IAI3B;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAIrC;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAQ3B;;OAEG;IACH,MAAM,IAAI,QAAQ,EAAE;IAIpB;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE;IAInC;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,EAAE;IAI5C;;OAEG;IACH,iBAAiB,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE;IAItD;;OAEG;IACH,iBAAiB,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE;IAItD;;OAEG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAIvC;;OAEG;IACH,MAAM,IAAI,GAAG,EAAE;IAIf;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW;CAY1C"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// packages/world-model/src/entities/entity-store.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EntityStore = void 0;
|
|
5
|
+
const if_entity_1 = require("./if-entity");
|
|
6
|
+
/**
|
|
7
|
+
* Entity store that works with IFEntity instances.
|
|
8
|
+
* Provides trait-aware entity management.
|
|
9
|
+
*/
|
|
10
|
+
class EntityStore {
|
|
11
|
+
ifEntities;
|
|
12
|
+
constructor() {
|
|
13
|
+
this.ifEntities = new Map();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Add an IF entity to the store
|
|
17
|
+
*/
|
|
18
|
+
add(entity) {
|
|
19
|
+
this.ifEntities.set(entity.id, entity);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get an IF entity by ID
|
|
23
|
+
*/
|
|
24
|
+
get(id) {
|
|
25
|
+
return this.ifEntities.get(id);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if an entity exists
|
|
29
|
+
*/
|
|
30
|
+
has(id) {
|
|
31
|
+
return this.ifEntities.has(id);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Remove an entity from the store
|
|
35
|
+
*/
|
|
36
|
+
remove(id) {
|
|
37
|
+
const entity = this.ifEntities.get(id);
|
|
38
|
+
if (entity) {
|
|
39
|
+
entity.clearTraits(); // Cleanup traits before removal
|
|
40
|
+
}
|
|
41
|
+
return this.ifEntities.delete(id);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get all entities
|
|
45
|
+
*/
|
|
46
|
+
getAll() {
|
|
47
|
+
return Array.from(this.ifEntities.values());
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get entities by type
|
|
51
|
+
*/
|
|
52
|
+
getByType(type) {
|
|
53
|
+
return this.getAll().filter(entity => entity.type === type);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Find entities with a specific trait
|
|
57
|
+
*/
|
|
58
|
+
findWithTrait(traitType) {
|
|
59
|
+
return this.getAll().filter(entity => entity.has(traitType));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Find entities with all specified traits
|
|
63
|
+
*/
|
|
64
|
+
findWithAllTraits(...traitTypes) {
|
|
65
|
+
return this.getAll().filter(entity => entity.hasAll(...traitTypes));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Find entities with any of the specified traits
|
|
69
|
+
*/
|
|
70
|
+
findWithAnyTraits(...traitTypes) {
|
|
71
|
+
return this.getAll().filter(entity => entity.hasAny(...traitTypes));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Clear all entities from the store
|
|
75
|
+
*/
|
|
76
|
+
clear() {
|
|
77
|
+
// Cleanup all entities
|
|
78
|
+
for (const entity of this.ifEntities.values()) {
|
|
79
|
+
entity.clearTraits();
|
|
80
|
+
}
|
|
81
|
+
this.ifEntities.clear();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the number of entities in the store
|
|
85
|
+
*/
|
|
86
|
+
get size() {
|
|
87
|
+
return this.ifEntities.size;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Iterate over all entities
|
|
91
|
+
*/
|
|
92
|
+
[Symbol.iterator]() {
|
|
93
|
+
return this.ifEntities.values();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Serialize all entities to JSON
|
|
97
|
+
*/
|
|
98
|
+
toJSON() {
|
|
99
|
+
return this.getAll().map(entity => entity.toJSON());
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Load entities from JSON data
|
|
103
|
+
*/
|
|
104
|
+
static fromJSON(json) {
|
|
105
|
+
const store = new EntityStore();
|
|
106
|
+
if (Array.isArray(json)) {
|
|
107
|
+
for (const entityData of json) {
|
|
108
|
+
const entity = if_entity_1.IFEntity.fromJSON(entityData);
|
|
109
|
+
store.add(entity);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return store;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.EntityStore = EntityStore;
|
|
116
|
+
//# sourceMappingURL=entity-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-store.js","sourceRoot":"","sources":["../../../../../../../../../mnt/c/repotemp/sharpee/packages/world-model/src/entities/entity-store.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,2CAAuC;AAEvC;;;GAGG;AACH,MAAa,WAAW;IACd,UAAU,CAAwB;IAE1C;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,MAAgB;QAClB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC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,EAAE,CAAC;YAC9C,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAW;QACzB,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC;QAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,KAAK,MAAM,UAAU,IAAI,IAAI,EAAE,CAAC;gBAC9B,MAAM,MAAM,GAAG,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;gBAC7C,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAzHD,kCAyHC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard Interactive Fiction entity types
|
|
3
|
+
*
|
|
4
|
+
* These represent the fundamental object types in IF games.
|
|
5
|
+
* The values match the type strings used throughout the system.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EntityType: {
|
|
8
|
+
/** A location in the game world */
|
|
9
|
+
readonly ROOM: "room";
|
|
10
|
+
/** A doorway or portal between rooms */
|
|
11
|
+
readonly DOOR: "door";
|
|
12
|
+
/** A generic takeable object */
|
|
13
|
+
readonly ITEM: "item";
|
|
14
|
+
/** A character (NPC or player) */
|
|
15
|
+
readonly ACTOR: "actor";
|
|
16
|
+
/** An object that can contain other objects */
|
|
17
|
+
readonly CONTAINER: "container";
|
|
18
|
+
/** An object that can support other objects on top */
|
|
19
|
+
readonly SUPPORTER: "supporter";
|
|
20
|
+
/** Fixed decorative objects that can't be taken */
|
|
21
|
+
readonly SCENERY: "scenery";
|
|
22
|
+
/** A directional exit (rarely used as entity) */
|
|
23
|
+
readonly EXIT: "exit";
|
|
24
|
+
/** Generic object type (default) */
|
|
25
|
+
readonly OBJECT: "object";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Type representing valid entity types
|
|
29
|
+
*/
|
|
30
|
+
export type EntityType = typeof EntityType[keyof typeof EntityType];
|
|
31
|
+
/**
|
|
32
|
+
* Type guard to check if a string is a valid IF entity type
|
|
33
|
+
*/
|
|
34
|
+
export declare function isEntityType(type: string): type is EntityType;
|
|
35
|
+
/**
|
|
36
|
+
* Get the ID prefix for an entity type
|
|
37
|
+
* Used for generating consistent entity IDs
|
|
38
|
+
*/
|
|
39
|
+
export declare function getEntityTypePrefix(type: EntityType): string;
|
|
40
|
+
//# sourceMappingURL=entity-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-types.d.ts","sourceRoot":"","sources":["../../../../../../mnt/c/repotemp/sharpee/packages/world-model/src/entities/entity-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,UAAU;IACrB,mCAAmC;;IAGnC,wCAAwC;;IAGxC,gCAAgC;;IAGhC,kCAAkC;;IAGlC,+CAA+C;;IAG/C,sDAAsD;;IAGtD,mDAAmD;;IAGnD,iDAAiD;;IAGjD,oCAAoC;;CAE5B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEpE;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,UAAU,CAE7D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAc5D"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityType = void 0;
|
|
4
|
+
exports.isEntityType = isEntityType;
|
|
5
|
+
exports.getEntityTypePrefix = getEntityTypePrefix;
|
|
6
|
+
/**
|
|
7
|
+
* Standard Interactive Fiction entity types
|
|
8
|
+
*
|
|
9
|
+
* These represent the fundamental object types in IF games.
|
|
10
|
+
* The values match the type strings used throughout the system.
|
|
11
|
+
*/
|
|
12
|
+
exports.EntityType = {
|
|
13
|
+
/** A location in the game world */
|
|
14
|
+
ROOM: 'room',
|
|
15
|
+
/** A doorway or portal between rooms */
|
|
16
|
+
DOOR: 'door',
|
|
17
|
+
/** A generic takeable object */
|
|
18
|
+
ITEM: 'item',
|
|
19
|
+
/** A character (NPC or player) */
|
|
20
|
+
ACTOR: 'actor',
|
|
21
|
+
/** An object that can contain other objects */
|
|
22
|
+
CONTAINER: 'container',
|
|
23
|
+
/** An object that can support other objects on top */
|
|
24
|
+
SUPPORTER: 'supporter',
|
|
25
|
+
/** Fixed decorative objects that can't be taken */
|
|
26
|
+
SCENERY: 'scenery',
|
|
27
|
+
/** A directional exit (rarely used as entity) */
|
|
28
|
+
EXIT: 'exit',
|
|
29
|
+
/** Generic object type (default) */
|
|
30
|
+
OBJECT: 'object'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Type guard to check if a string is a valid IF entity type
|
|
34
|
+
*/
|
|
35
|
+
function isEntityType(type) {
|
|
36
|
+
return Object.values(exports.EntityType).includes(type);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the ID prefix for an entity type
|
|
40
|
+
* Used for generating consistent entity IDs
|
|
41
|
+
*/
|
|
42
|
+
function getEntityTypePrefix(type) {
|
|
43
|
+
const prefixMap = {
|
|
44
|
+
[exports.EntityType.ROOM]: 'r',
|
|
45
|
+
[exports.EntityType.DOOR]: 'd',
|
|
46
|
+
[exports.EntityType.ITEM]: 'i',
|
|
47
|
+
[exports.EntityType.ACTOR]: 'a',
|
|
48
|
+
[exports.EntityType.CONTAINER]: 'c',
|
|
49
|
+
[exports.EntityType.SUPPORTER]: 's',
|
|
50
|
+
[exports.EntityType.SCENERY]: 'y',
|
|
51
|
+
[exports.EntityType.EXIT]: 'e',
|
|
52
|
+
[exports.EntityType.OBJECT]: 'o'
|
|
53
|
+
};
|
|
54
|
+
return prefixMap[type] || 'o';
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=entity-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-types.js","sourceRoot":"","sources":["../../../../../../../../../mnt/c/repotemp/sharpee/packages/world-model/src/entities/entity-types.ts"],"names":[],"mappings":";;;AA2CA,oCAEC;AAMD,kDAcC;AAjED;;;;;GAKG;AACU,QAAA,UAAU,GAAG;IACxB,mCAAmC;IACnC,IAAI,EAAE,MAAM;IAEZ,wCAAwC;IACxC,IAAI,EAAE,MAAM;IAEZ,gCAAgC;IAChC,IAAI,EAAE,MAAM;IAEZ,kCAAkC;IAClC,KAAK,EAAE,OAAO;IAEd,+CAA+C;IAC/C,SAAS,EAAE,WAAW;IAEtB,sDAAsD;IACtD,SAAS,EAAE,WAAW;IAEtB,mDAAmD;IACnD,OAAO,EAAE,SAAS;IAElB,iDAAiD;IACjD,IAAI,EAAE,MAAM;IAEZ,oCAAoC;IACpC,MAAM,EAAE,QAAQ;CACR,CAAC;AAOX;;GAEG;AACH,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC,QAAQ,CAAC,IAAkB,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,IAAgB;IAClD,MAAM,SAAS,GAA+B;QAC5C,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,GAAG;QACtB,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,GAAG;QACtB,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,GAAG;QACtB,CAAC,kBAAU,CAAC,KAAK,CAAC,EAAE,GAAG;QACvB,CAAC,kBAAU,CAAC,SAAS,CAAC,EAAE,GAAG;QAC3B,CAAC,kBAAU,CAAC,SAAS,CAAC,EAAE,GAAG;QAC3B,CAAC,kBAAU,CAAC,OAAO,CAAC,EAAE,GAAG;QACzB,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,GAAG;QACtB,CAAC,kBAAU,CAAC,MAAM,CAAC,EAAE,GAAG;KACzB,CAAC;IAEF,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { IEntity, EntityId, IEntityCreationParams } from "../src/index";
|
|
2
|
+
import { ITrait, ITraitConstructor } from '../traits/trait';
|
|
3
|
+
import { TraitType } from '../traits/trait-types';
|
|
4
|
+
import { IEventHandlers } from '../events/types';
|
|
5
|
+
import { Annotation, AnnotationCondition } from '../annotations/types';
|
|
6
|
+
/**
|
|
7
|
+
* Interactive Fiction Entity with trait-based composition.
|
|
8
|
+
* Implements the core Entity interface and adds trait management capabilities.
|
|
9
|
+
*/
|
|
10
|
+
export declare class IFEntity implements IEntity {
|
|
11
|
+
readonly id: EntityId;
|
|
12
|
+
readonly type: string;
|
|
13
|
+
attributes: Record<string, unknown>;
|
|
14
|
+
relationships: Record<string, EntityId[]>;
|
|
15
|
+
traits: Map<TraitType, ITrait>;
|
|
16
|
+
/**
|
|
17
|
+
* Author-controlled disambiguation priorities per action
|
|
18
|
+
* Higher priority = more likely to be selected when ambiguous
|
|
19
|
+
* Key is action ID (e.g., 'if.action.eating')
|
|
20
|
+
* Value is priority (default 100, higher = preferred)
|
|
21
|
+
*/
|
|
22
|
+
private scopePriorities;
|
|
23
|
+
/**
|
|
24
|
+
* Author-controlled minimum scope levels
|
|
25
|
+
* Allows entities to be "in scope" regardless of spatial location.
|
|
26
|
+
* Key is room ID (or '*' for all rooms)
|
|
27
|
+
* Value is minimum scope level (0=UNAWARE, 1=AWARE, 2=VISIBLE, 3=REACHABLE, 4=CARRIED)
|
|
28
|
+
*
|
|
29
|
+
* Example uses:
|
|
30
|
+
* - sky.setMinimumScope(2) - always visible everywhere
|
|
31
|
+
* - mountain.setMinimumScope(2, ['overlook']) - visible from specific room
|
|
32
|
+
* - butterfly.setMinimumScope(3, ['garden']) - reachable in garden
|
|
33
|
+
*/
|
|
34
|
+
private minimumScopes;
|
|
35
|
+
/**
|
|
36
|
+
* Presentation metadata annotations (ADR-124).
|
|
37
|
+
* Keyed by kind (e.g., 'illustration', 'portrait', 'voice').
|
|
38
|
+
* Multiple annotations per kind are supported.
|
|
39
|
+
*/
|
|
40
|
+
private annotations;
|
|
41
|
+
/**
|
|
42
|
+
* Event handlers for this entity
|
|
43
|
+
* Key is the event type (e.g., 'if.event.pushed')
|
|
44
|
+
* Value is the handler function
|
|
45
|
+
*/
|
|
46
|
+
on?: IEventHandlers;
|
|
47
|
+
constructor(id: string, type: string, params?: Partial<IEntityCreationParams>);
|
|
48
|
+
/**
|
|
49
|
+
* Check if entity has a specific trait
|
|
50
|
+
*/
|
|
51
|
+
has(type: TraitType | string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Get a typed trait from the entity
|
|
54
|
+
*/
|
|
55
|
+
get<T extends ITrait>(type: TraitType | string | ITraitConstructor<T>): T | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Alias for get() method - for backwards compatibility
|
|
58
|
+
*/
|
|
59
|
+
getTrait<T extends ITrait>(type: TraitType | string | ITraitConstructor<T>): T | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Add a trait to the entity
|
|
62
|
+
*/
|
|
63
|
+
add(trait: ITrait): this;
|
|
64
|
+
/**
|
|
65
|
+
* Remove a trait from the entity
|
|
66
|
+
*/
|
|
67
|
+
remove(type: TraitType | string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Check if entity has all specified traits
|
|
70
|
+
*/
|
|
71
|
+
hasAll(...types: (TraitType | string)[]): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Check if entity has any of the specified traits
|
|
74
|
+
*/
|
|
75
|
+
hasAny(...types: (TraitType | string)[]): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Get all traits on this entity
|
|
78
|
+
*/
|
|
79
|
+
getTraits(): ITrait[];
|
|
80
|
+
/**
|
|
81
|
+
* Get all trait types on this entity
|
|
82
|
+
*/
|
|
83
|
+
getTraitTypes(): (TraitType | string)[];
|
|
84
|
+
/**
|
|
85
|
+
* Clear all traits from the entity
|
|
86
|
+
*/
|
|
87
|
+
clearTraits(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Get or set author-controlled disambiguation priority for an action.
|
|
90
|
+
*
|
|
91
|
+
* When multiple entities match a command, higher priority entities are
|
|
92
|
+
* preferred for automatic disambiguation.
|
|
93
|
+
*
|
|
94
|
+
* @param actionId - The action ID (e.g., 'if.action.eating')
|
|
95
|
+
* @param priority - Optional priority to set (100 = default, higher = preferred)
|
|
96
|
+
* @returns The current priority for this action (default 100)
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* // Make real apple preferred for eating over wax apple
|
|
100
|
+
* realApple.scope('if.action.eating', 150);
|
|
101
|
+
* waxApple.scope('if.action.eating', 50);
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* // Get current priority
|
|
105
|
+
* const priority = apple.scope('if.action.eating'); // Returns 150
|
|
106
|
+
*/
|
|
107
|
+
scope(actionId: string, priority?: number): number;
|
|
108
|
+
/**
|
|
109
|
+
* Clear disambiguation priority for an action (resets to default)
|
|
110
|
+
*/
|
|
111
|
+
clearScope(actionId: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* Clear all disambiguation priorities
|
|
114
|
+
*/
|
|
115
|
+
clearAllScopes(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Get all scope priorities for serialization
|
|
118
|
+
*/
|
|
119
|
+
getScopePriorities(): Record<string, number>;
|
|
120
|
+
/**
|
|
121
|
+
* Set minimum scope level for this entity.
|
|
122
|
+
*
|
|
123
|
+
* Makes an entity "in scope" regardless of its spatial location.
|
|
124
|
+
* The scope resolver will return the maximum of the physical scope
|
|
125
|
+
* and the minimum scope (additive only - can raise scope, not lower it).
|
|
126
|
+
*
|
|
127
|
+
* Scope levels (numeric values match ScopeLevel enum in stdlib):
|
|
128
|
+
* - 0: UNAWARE - not in scope
|
|
129
|
+
* - 1: AWARE - can hear/smell but not see
|
|
130
|
+
* - 2: VISIBLE - can see but not reach
|
|
131
|
+
* - 3: REACHABLE - can physically interact
|
|
132
|
+
* - 4: CARRIED - in inventory (rarely used for minimum)
|
|
133
|
+
*
|
|
134
|
+
* @param level The minimum scope level (0-4)
|
|
135
|
+
* @param rooms Optional array of room IDs where this applies. If omitted, applies everywhere.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* // Sky is always visible everywhere
|
|
139
|
+
* sky.setMinimumScope(2);
|
|
140
|
+
*
|
|
141
|
+
* // Mountain visible only from overlook and trail
|
|
142
|
+
* mountain.setMinimumScope(2, ['overlook', 'mountain_trail']);
|
|
143
|
+
*
|
|
144
|
+
* // Butterfly reachable (but may escape) in garden areas
|
|
145
|
+
* butterfly.setMinimumScope(3, ['garden', 'meadow', 'pond']);
|
|
146
|
+
*
|
|
147
|
+
* // Ticking clock audible from adjacent rooms
|
|
148
|
+
* clock.setMinimumScope(1, ['hallway', 'study']);
|
|
149
|
+
*/
|
|
150
|
+
setMinimumScope(level: number, rooms?: string[]): this;
|
|
151
|
+
/**
|
|
152
|
+
* Get the minimum scope level for this entity in a specific room.
|
|
153
|
+
*
|
|
154
|
+
* @param roomId The room to check (or null to get global minimum)
|
|
155
|
+
* @returns The minimum scope level, or 0 (UNAWARE) if not set
|
|
156
|
+
*/
|
|
157
|
+
getMinimumScope(roomId: string | null): number;
|
|
158
|
+
/**
|
|
159
|
+
* Clear minimum scope for specific rooms or all rooms.
|
|
160
|
+
*
|
|
161
|
+
* @param rooms Optional array of room IDs to clear. If omitted, clears all.
|
|
162
|
+
*/
|
|
163
|
+
clearMinimumScope(rooms?: string[]): void;
|
|
164
|
+
/**
|
|
165
|
+
* Get all minimum scopes for serialization
|
|
166
|
+
*/
|
|
167
|
+
getMinimumScopes(): Record<string, number>;
|
|
168
|
+
/**
|
|
169
|
+
* Add a presentation annotation to this entity.
|
|
170
|
+
*
|
|
171
|
+
* @param kind - Annotation kind (e.g., 'illustration', 'portrait')
|
|
172
|
+
* @param data - Kind-specific payload. Must include an `id` field.
|
|
173
|
+
* @param condition - Optional condition for when this annotation is active
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* entity.annotate('illustration', {
|
|
177
|
+
* id: 'dam-exterior',
|
|
178
|
+
* src: 'dam-dry.jpg',
|
|
179
|
+
* alt: 'The massive concrete face of Flood Control Dam #3',
|
|
180
|
+
* trigger: 'on-enter',
|
|
181
|
+
* position: 'right',
|
|
182
|
+
* });
|
|
183
|
+
*/
|
|
184
|
+
annotate(kind: string, data: Record<string, unknown> & {
|
|
185
|
+
id: string;
|
|
186
|
+
}, condition?: AnnotationCondition): this;
|
|
187
|
+
/**
|
|
188
|
+
* Get all annotations of a given kind (unfiltered).
|
|
189
|
+
*/
|
|
190
|
+
getAnnotations(kind: string): Annotation[];
|
|
191
|
+
/**
|
|
192
|
+
* Get annotations whose conditions are currently met.
|
|
193
|
+
* Requires a world model reference to resolve trait state on self/player/location.
|
|
194
|
+
*
|
|
195
|
+
* @param kind - Annotation kind to query
|
|
196
|
+
* @param world - World model for condition evaluation (must have getEntity, getPlayer, getLocation)
|
|
197
|
+
*/
|
|
198
|
+
getActiveAnnotations(kind: string, world: {
|
|
199
|
+
getEntity(id: string): IFEntity | undefined;
|
|
200
|
+
getPlayer(): IFEntity | undefined;
|
|
201
|
+
getLocation(entityId: string): string | undefined;
|
|
202
|
+
}): Annotation[];
|
|
203
|
+
/**
|
|
204
|
+
* Remove a specific annotation by kind and id.
|
|
205
|
+
* @returns true if the annotation was found and removed
|
|
206
|
+
*/
|
|
207
|
+
removeAnnotation(kind: string, id: string): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Check if entity has any annotations of a given kind.
|
|
210
|
+
*/
|
|
211
|
+
hasAnnotations(kind: string): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Evaluate an annotation condition against current world state.
|
|
214
|
+
*/
|
|
215
|
+
private evaluateCondition;
|
|
216
|
+
/**
|
|
217
|
+
* Clone this entity with all its traits
|
|
218
|
+
*/
|
|
219
|
+
clone(newId: string): IFEntity;
|
|
220
|
+
/**
|
|
221
|
+
* Serialize entity and traits to JSON
|
|
222
|
+
*/
|
|
223
|
+
toJSON(): any;
|
|
224
|
+
/**
|
|
225
|
+
* Create entity from JSON data
|
|
226
|
+
*/
|
|
227
|
+
static fromJSON(json: any): IFEntity;
|
|
228
|
+
/**
|
|
229
|
+
* Check if this is a room
|
|
230
|
+
*/
|
|
231
|
+
get isRoom(): boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Check if this can contain other entities
|
|
234
|
+
*/
|
|
235
|
+
get canContain(): boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Check if this is takeable (default behavior unless has scenery trait)
|
|
238
|
+
*/
|
|
239
|
+
get isTakeable(): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Check if this is fixed in place (has scenery trait)
|
|
242
|
+
*/
|
|
243
|
+
get isScenery(): boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Check if this can be opened
|
|
246
|
+
*/
|
|
247
|
+
get isOpenable(): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Check if this is currently open
|
|
250
|
+
*/
|
|
251
|
+
get isOpen(): boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Check if this can be locked
|
|
254
|
+
*/
|
|
255
|
+
get isLockable(): boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Check if this is currently locked
|
|
258
|
+
*/
|
|
259
|
+
get isLocked(): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Check if this is a container
|
|
262
|
+
*/
|
|
263
|
+
get isContainer(): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Check if this is a supporter
|
|
266
|
+
*/
|
|
267
|
+
get isSupporter(): boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Check if this is a door
|
|
270
|
+
*/
|
|
271
|
+
get isDoor(): boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Check if this is an actor
|
|
274
|
+
*/
|
|
275
|
+
get isActor(): boolean;
|
|
276
|
+
/**
|
|
277
|
+
* Check if this is the player
|
|
278
|
+
*/
|
|
279
|
+
get isPlayer(): boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Check if this provides light
|
|
282
|
+
*/
|
|
283
|
+
get providesLight(): boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Check if this is switchable
|
|
286
|
+
*/
|
|
287
|
+
get isSwitchable(): boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Check if this can be entered by actors
|
|
290
|
+
* Vehicles are inherently enterable (boats, baskets, etc.)
|
|
291
|
+
*/
|
|
292
|
+
get enterable(): boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Check if this is switched on
|
|
295
|
+
*/
|
|
296
|
+
get isOn(): boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Get the name of this entity
|
|
299
|
+
*/
|
|
300
|
+
get name(): string;
|
|
301
|
+
/**
|
|
302
|
+
* Get the description of this entity
|
|
303
|
+
*/
|
|
304
|
+
get description(): string | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Get the weight of this entity
|
|
307
|
+
*/
|
|
308
|
+
get weight(): number;
|
|
309
|
+
/**
|
|
310
|
+
* Alias for has() method - for backwards compatibility
|
|
311
|
+
*/
|
|
312
|
+
hasTrait(type: TraitType | string): boolean;
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=if-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"if-entity.d.ts","sourceRoot":"","sources":["../../../../../../mnt/c/repotemp/sharpee/packages/world-model/src/entities/if-entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAW,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEvE;;;GAGG;AACH,qBAAa,QAAS,YAAW,OAAO;IACtC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1C,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,OAAO,CAAC,eAAe,CAAkC;IAEzD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,aAAa,CAAkC;IAEvD;;;;OAIG;IACH,OAAO,CAAC,WAAW,CAAwC;IAE3D;;;;OAIG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;gBAER,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAW7E;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO;IAItC;;OAE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