@sharpee/world-model 0.9.62-beta → 0.9.66-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/README.md +0 -0
- package/package.json +17 -30
- package/LICENSE +0 -21
- package/dist-npm/annotations/index.d.ts +0 -2
- package/dist-npm/annotations/index.d.ts.map +0 -1
- package/dist-npm/annotations/index.js +0 -18
- package/dist-npm/annotations/index.js.map +0 -1
- package/dist-npm/annotations/types.d.ts +0 -35
- package/dist-npm/annotations/types.d.ts.map +0 -1
- package/dist-npm/annotations/types.js +0 -9
- package/dist-npm/annotations/types.js.map +0 -1
- package/dist-npm/behaviors/attack.d.ts +0 -52
- package/dist-npm/behaviors/attack.d.ts.map +0 -1
- package/dist-npm/behaviors/attack.js +0 -161
- package/dist-npm/behaviors/attack.js.map +0 -1
- package/dist-npm/behaviors/behavior.d.ts +0 -67
- package/dist-npm/behaviors/behavior.d.ts.map +0 -1
- package/dist-npm/behaviors/behavior.js +0 -80
- package/dist-npm/behaviors/behavior.js.map +0 -1
- package/dist-npm/behaviors/index.d.ts +0 -21
- package/dist-npm/behaviors/index.d.ts.map +0 -1
- package/dist-npm/behaviors/index.js +0 -39
- package/dist-npm/behaviors/index.js.map +0 -1
- package/dist-npm/capabilities/action-interceptor.d.ts +0 -169
- package/dist-npm/capabilities/action-interceptor.d.ts.map +0 -1
- package/dist-npm/capabilities/action-interceptor.js +0 -15
- package/dist-npm/capabilities/action-interceptor.js.map +0 -1
- package/dist-npm/capabilities/capability-behavior.d.ts +0 -112
- package/dist-npm/capabilities/capability-behavior.d.ts.map +0 -1
- package/dist-npm/capabilities/capability-behavior.js +0 -9
- package/dist-npm/capabilities/capability-behavior.js.map +0 -1
- package/dist-npm/capabilities/capability-defaults.d.ts +0 -67
- package/dist-npm/capabilities/capability-defaults.d.ts.map +0 -1
- package/dist-npm/capabilities/capability-defaults.js +0 -81
- package/dist-npm/capabilities/capability-defaults.js.map +0 -1
- package/dist-npm/capabilities/capability-helpers.d.ts +0 -76
- package/dist-npm/capabilities/capability-helpers.d.ts.map +0 -1
- package/dist-npm/capabilities/capability-helpers.js +0 -112
- package/dist-npm/capabilities/capability-helpers.js.map +0 -1
- package/dist-npm/capabilities/capability-registry.d.ts +0 -115
- package/dist-npm/capabilities/capability-registry.d.ts.map +0 -1
- package/dist-npm/capabilities/capability-registry.js +0 -136
- package/dist-npm/capabilities/capability-registry.js.map +0 -1
- package/dist-npm/capabilities/entity-builder.d.ts +0 -79
- package/dist-npm/capabilities/entity-builder.d.ts.map +0 -1
- package/dist-npm/capabilities/entity-builder.js +0 -116
- package/dist-npm/capabilities/entity-builder.js.map +0 -1
- package/dist-npm/capabilities/index.d.ts +0 -16
- package/dist-npm/capabilities/index.d.ts.map +0 -1
- package/dist-npm/capabilities/index.js +0 -56
- package/dist-npm/capabilities/index.js.map +0 -1
- package/dist-npm/capabilities/interceptor-helpers.d.ts +0 -74
- package/dist-npm/capabilities/interceptor-helpers.d.ts.map +0 -1
- package/dist-npm/capabilities/interceptor-helpers.js +0 -111
- package/dist-npm/capabilities/interceptor-helpers.js.map +0 -1
- package/dist-npm/capabilities/interceptor-registry.d.ts +0 -125
- package/dist-npm/capabilities/interceptor-registry.d.ts.map +0 -1
- package/dist-npm/capabilities/interceptor-registry.js +0 -176
- package/dist-npm/capabilities/interceptor-registry.js.map +0 -1
- package/dist-npm/capabilities/types.d.ts +0 -35
- package/dist-npm/capabilities/types.d.ts.map +0 -1
- package/dist-npm/capabilities/types.js +0 -16
- package/dist-npm/capabilities/types.js.map +0 -1
- package/dist-npm/commands/command-types.d.ts +0 -30
- package/dist-npm/commands/command-types.d.ts.map +0 -1
- package/dist-npm/commands/command-types.js +0 -6
- package/dist-npm/commands/command-types.js.map +0 -1
- package/dist-npm/commands/index.d.ts +0 -7
- package/dist-npm/commands/index.d.ts.map +0 -1
- package/dist-npm/commands/index.js +0 -23
- package/dist-npm/commands/index.js.map +0 -1
- package/dist-npm/commands/parsed-command.d.ts +0 -204
- package/dist-npm/commands/parsed-command.d.ts.map +0 -1
- package/dist-npm/commands/parsed-command.js +0 -25
- package/dist-npm/commands/parsed-command.js.map +0 -1
- package/dist-npm/commands/validated-command.d.ts +0 -52
- package/dist-npm/commands/validated-command.d.ts.map +0 -1
- package/dist-npm/commands/validated-command.js +0 -8
- package/dist-npm/commands/validated-command.js.map +0 -1
- package/dist-npm/constants/action-failures.d.ts +0 -54
- package/dist-npm/constants/action-failures.d.ts.map +0 -1
- package/dist-npm/constants/action-failures.js +0 -68
- package/dist-npm/constants/action-failures.js.map +0 -1
- package/dist-npm/constants/directions.d.ts +0 -32
- package/dist-npm/constants/directions.d.ts.map +0 -1
- package/dist-npm/constants/directions.js +0 -53
- package/dist-npm/constants/directions.js.map +0 -1
- package/dist-npm/constants/if-events.d.ts +0 -5
- package/dist-npm/constants/if-events.d.ts.map +0 -1
- package/dist-npm/constants/if-events.js +0 -10
- package/dist-npm/constants/if-events.js.map +0 -1
- package/dist-npm/constants/index.d.ts +0 -9
- package/dist-npm/constants/index.d.ts.map +0 -1
- package/dist-npm/constants/index.js +0 -25
- package/dist-npm/constants/index.js.map +0 -1
- package/dist-npm/entities/entity-store.d.ts +0 -66
- package/dist-npm/entities/entity-store.d.ts.map +0 -1
- package/dist-npm/entities/entity-store.js +0 -116
- package/dist-npm/entities/entity-store.js.map +0 -1
- package/dist-npm/entities/entity-types.d.ts +0 -40
- package/dist-npm/entities/entity-types.d.ts.map +0 -1
- package/dist-npm/entities/entity-types.js +0 -56
- package/dist-npm/entities/entity-types.js.map +0 -1
- package/dist-npm/entities/if-entity.d.ts +0 -314
- package/dist-npm/entities/if-entity.d.ts.map +0 -1
- package/dist-npm/entities/if-entity.js +0 -621
- package/dist-npm/entities/if-entity.js.map +0 -1
- package/dist-npm/entities/index.d.ts +0 -5
- package/dist-npm/entities/index.d.ts.map +0 -1
- package/dist-npm/entities/index.js +0 -13
- package/dist-npm/entities/index.js.map +0 -1
- package/dist-npm/events/types.d.ts +0 -45
- package/dist-npm/events/types.d.ts.map +0 -1
- package/dist-npm/events/types.js +0 -9
- package/dist-npm/events/types.js.map +0 -1
- package/dist-npm/examples/event-handler-registration.d.ts +0 -14
- package/dist-npm/examples/event-handler-registration.d.ts.map +0 -1
- package/dist-npm/examples/event-handler-registration.js +0 -158
- package/dist-npm/examples/event-handler-registration.js.map +0 -1
- package/dist-npm/extensions/base-extension.d.ts +0 -69
- package/dist-npm/extensions/base-extension.d.ts.map +0 -1
- package/dist-npm/extensions/base-extension.js +0 -83
- package/dist-npm/extensions/base-extension.js.map +0 -1
- package/dist-npm/extensions/index.d.ts +0 -11
- package/dist-npm/extensions/index.d.ts.map +0 -1
- package/dist-npm/extensions/index.js +0 -39
- package/dist-npm/extensions/index.js.map +0 -1
- package/dist-npm/extensions/loader.d.ts +0 -52
- package/dist-npm/extensions/loader.d.ts.map +0 -1
- package/dist-npm/extensions/loader.js +0 -177
- package/dist-npm/extensions/loader.js.map +0 -1
- package/dist-npm/extensions/manager.d.ts +0 -68
- package/dist-npm/extensions/manager.d.ts.map +0 -1
- package/dist-npm/extensions/manager.js +0 -164
- package/dist-npm/extensions/manager.js.map +0 -1
- package/dist-npm/extensions/registry.d.ts +0 -100
- package/dist-npm/extensions/registry.d.ts.map +0 -1
- package/dist-npm/extensions/registry.js +0 -193
- package/dist-npm/extensions/registry.js.map +0 -1
- package/dist-npm/extensions/types.d.ts +0 -226
- package/dist-npm/extensions/types.d.ts.map +0 -1
- package/dist-npm/extensions/types.js +0 -28
- package/dist-npm/extensions/types.js.map +0 -1
- package/dist-npm/index.d.ts +0 -40
- package/dist-npm/index.d.ts.map +0 -1
- package/dist-npm/index.js +0 -70
- package/dist-npm/index.js.map +0 -1
- package/dist-npm/interfaces/command-executor.d.ts +0 -17
- package/dist-npm/interfaces/command-executor.d.ts.map +0 -1
- package/dist-npm/interfaces/command-executor.js +0 -6
- package/dist-npm/interfaces/command-executor.js.map +0 -1
- package/dist-npm/interfaces/command-processor.d.ts +0 -17
- package/dist-npm/interfaces/command-processor.d.ts.map +0 -1
- package/dist-npm/interfaces/command-processor.js +0 -6
- package/dist-npm/interfaces/command-processor.js.map +0 -1
- package/dist-npm/interfaces/command-validator.d.ts +0 -17
- package/dist-npm/interfaces/command-validator.d.ts.map +0 -1
- package/dist-npm/interfaces/command-validator.js +0 -6
- package/dist-npm/interfaces/command-validator.js.map +0 -1
- package/dist-npm/interfaces/index.d.ts +0 -8
- package/dist-npm/interfaces/index.d.ts.map +0 -1
- package/dist-npm/interfaces/index.js +0 -24
- package/dist-npm/interfaces/index.js.map +0 -1
- package/dist-npm/interfaces/language-provider.d.ts +0 -86
- package/dist-npm/interfaces/language-provider.d.ts.map +0 -1
- package/dist-npm/interfaces/language-provider.js +0 -14
- package/dist-npm/interfaces/language-provider.js.map +0 -1
- package/dist-npm/interfaces/parser.d.ts +0 -16
- package/dist-npm/interfaces/parser.d.ts.map +0 -1
- package/dist-npm/interfaces/parser.js +0 -6
- package/dist-npm/interfaces/parser.js.map +0 -1
- package/dist-npm/scope/index.d.ts +0 -8
- package/dist-npm/scope/index.d.ts.map +0 -1
- package/dist-npm/scope/index.js +0 -24
- package/dist-npm/scope/index.js.map +0 -1
- package/dist-npm/scope/scope-evaluator.d.ts +0 -58
- package/dist-npm/scope/scope-evaluator.d.ts.map +0 -1
- package/dist-npm/scope/scope-evaluator.js +0 -207
- package/dist-npm/scope/scope-evaluator.js.map +0 -1
- package/dist-npm/scope/scope-registry.d.ts +0 -59
- package/dist-npm/scope/scope-registry.d.ts.map +0 -1
- package/dist-npm/scope/scope-registry.js +0 -182
- package/dist-npm/scope/scope-registry.js.map +0 -1
- package/dist-npm/scope/scope-rule.d.ts +0 -86
- package/dist-npm/scope/scope-rule.d.ts.map +0 -1
- package/dist-npm/scope/scope-rule.js +0 -7
- package/dist-npm/scope/scope-rule.js.map +0 -1
- package/dist-npm/services/ScopeService.d.ts +0 -8
- package/dist-npm/services/ScopeService.d.ts.map +0 -1
- package/dist-npm/services/ScopeService.js +0 -19
- package/dist-npm/services/ScopeService.js.map +0 -1
- package/dist-npm/services/index.d.ts +0 -2
- package/dist-npm/services/index.d.ts.map +0 -1
- package/dist-npm/services/index.js +0 -6
- package/dist-npm/services/index.js.map +0 -1
- package/dist-npm/test-structure.d.ts +0 -3
- package/dist-npm/test-structure.d.ts.map +0 -1
- package/dist-npm/test-structure.js +0 -26
- package/dist-npm/test-structure.js.map +0 -1
- package/dist-npm/traits/actor/actorBehavior.d.ts +0 -121
- package/dist-npm/traits/actor/actorBehavior.d.ts.map +0 -1
- package/dist-npm/traits/actor/actorBehavior.js +0 -288
- package/dist-npm/traits/actor/actorBehavior.js.map +0 -1
- package/dist-npm/traits/actor/actorTrait.d.ts +0 -158
- package/dist-npm/traits/actor/actorTrait.d.ts.map +0 -1
- package/dist-npm/traits/actor/actorTrait.js +0 -152
- package/dist-npm/traits/actor/actorTrait.js.map +0 -1
- package/dist-npm/traits/actor/index.d.ts +0 -3
- package/dist-npm/traits/actor/index.d.ts.map +0 -1
- package/dist-npm/traits/actor/index.js +0 -11
- package/dist-npm/traits/actor/index.js.map +0 -1
- package/dist-npm/traits/all-traits.d.ts +0 -95
- package/dist-npm/traits/all-traits.d.ts.map +0 -1
- package/dist-npm/traits/all-traits.js +0 -178
- package/dist-npm/traits/all-traits.js.map +0 -1
- package/dist-npm/traits/attached/attachedTrait.d.ts +0 -61
- package/dist-npm/traits/attached/attachedTrait.d.ts.map +0 -1
- package/dist-npm/traits/attached/attachedTrait.js +0 -36
- package/dist-npm/traits/attached/attachedTrait.js.map +0 -1
- package/dist-npm/traits/attached/index.d.ts +0 -2
- package/dist-npm/traits/attached/index.d.ts.map +0 -1
- package/dist-npm/traits/attached/index.js +0 -18
- package/dist-npm/traits/attached/index.js.map +0 -1
- package/dist-npm/traits/breakable/breakableBehavior.d.ts +0 -43
- package/dist-npm/traits/breakable/breakableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/breakable/breakableBehavior.js +0 -70
- package/dist-npm/traits/breakable/breakableBehavior.js.map +0 -1
- package/dist-npm/traits/breakable/breakableTrait.d.ts +0 -22
- package/dist-npm/traits/breakable/breakableTrait.d.ts.map +0 -1
- package/dist-npm/traits/breakable/breakableTrait.js +0 -25
- package/dist-npm/traits/breakable/breakableTrait.js.map +0 -1
- package/dist-npm/traits/breakable/index.d.ts +0 -3
- package/dist-npm/traits/breakable/index.d.ts.map +0 -1
- package/dist-npm/traits/breakable/index.js +0 -8
- package/dist-npm/traits/breakable/index.js.map +0 -1
- package/dist-npm/traits/button/buttonTrait.d.ts +0 -53
- package/dist-npm/traits/button/buttonTrait.d.ts.map +0 -1
- package/dist-npm/traits/button/buttonTrait.js +0 -36
- package/dist-npm/traits/button/buttonTrait.js.map +0 -1
- package/dist-npm/traits/button/index.d.ts +0 -2
- package/dist-npm/traits/button/index.d.ts.map +0 -1
- package/dist-npm/traits/button/index.js +0 -18
- package/dist-npm/traits/button/index.js.map +0 -1
- package/dist-npm/traits/climbable/climbableBehavior.d.ts +0 -37
- package/dist-npm/traits/climbable/climbableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/climbable/climbableBehavior.js +0 -70
- package/dist-npm/traits/climbable/climbableBehavior.js.map +0 -1
- package/dist-npm/traits/climbable/climbableTrait.d.ts +0 -31
- package/dist-npm/traits/climbable/climbableTrait.d.ts.map +0 -1
- package/dist-npm/traits/climbable/climbableTrait.js +0 -47
- package/dist-npm/traits/climbable/climbableTrait.js.map +0 -1
- package/dist-npm/traits/climbable/index.d.ts +0 -6
- package/dist-npm/traits/climbable/index.d.ts.map +0 -1
- package/dist-npm/traits/climbable/index.js +0 -22
- package/dist-npm/traits/climbable/index.js.map +0 -1
- package/dist-npm/traits/clothing/clothingTrait.d.ts +0 -58
- package/dist-npm/traits/clothing/clothingTrait.d.ts.map +0 -1
- package/dist-npm/traits/clothing/clothingTrait.js +0 -78
- package/dist-npm/traits/clothing/clothingTrait.js.map +0 -1
- package/dist-npm/traits/clothing/index.d.ts +0 -2
- package/dist-npm/traits/clothing/index.d.ts.map +0 -1
- package/dist-npm/traits/clothing/index.js +0 -19
- package/dist-npm/traits/clothing/index.js.map +0 -1
- package/dist-npm/traits/combatant/combatantBehavior.d.ts +0 -70
- package/dist-npm/traits/combatant/combatantBehavior.d.ts.map +0 -1
- package/dist-npm/traits/combatant/combatantBehavior.js +0 -155
- package/dist-npm/traits/combatant/combatantBehavior.js.map +0 -1
- package/dist-npm/traits/combatant/combatantTrait.d.ts +0 -98
- package/dist-npm/traits/combatant/combatantTrait.d.ts.map +0 -1
- package/dist-npm/traits/combatant/combatantTrait.js +0 -122
- package/dist-npm/traits/combatant/combatantTrait.js.map +0 -1
- package/dist-npm/traits/combatant/index.d.ts +0 -3
- package/dist-npm/traits/combatant/index.d.ts.map +0 -1
- package/dist-npm/traits/combatant/index.js +0 -8
- package/dist-npm/traits/combatant/index.js.map +0 -1
- package/dist-npm/traits/container/container-utils.d.ts +0 -39
- package/dist-npm/traits/container/container-utils.d.ts.map +0 -1
- package/dist-npm/traits/container/container-utils.js +0 -72
- package/dist-npm/traits/container/container-utils.js.map +0 -1
- package/dist-npm/traits/container/containerBehavior.d.ts +0 -94
- package/dist-npm/traits/container/containerBehavior.d.ts.map +0 -1
- package/dist-npm/traits/container/containerBehavior.js +0 -256
- package/dist-npm/traits/container/containerBehavior.js.map +0 -1
- package/dist-npm/traits/container/containerTrait.d.ts +0 -30
- package/dist-npm/traits/container/containerTrait.d.ts.map +0 -1
- package/dist-npm/traits/container/containerTrait.js +0 -45
- package/dist-npm/traits/container/containerTrait.js.map +0 -1
- package/dist-npm/traits/container/index.d.ts +0 -4
- package/dist-npm/traits/container/index.d.ts.map +0 -1
- package/dist-npm/traits/container/index.js +0 -14
- package/dist-npm/traits/container/index.js.map +0 -1
- package/dist-npm/traits/destructible/destructibleBehavior.d.ts +0 -57
- package/dist-npm/traits/destructible/destructibleBehavior.d.ts.map +0 -1
- package/dist-npm/traits/destructible/destructibleBehavior.js +0 -145
- package/dist-npm/traits/destructible/destructibleBehavior.js.map +0 -1
- package/dist-npm/traits/destructible/destructibleTrait.d.ts +0 -49
- package/dist-npm/traits/destructible/destructibleTrait.d.ts.map +0 -1
- package/dist-npm/traits/destructible/destructibleTrait.js +0 -43
- package/dist-npm/traits/destructible/destructibleTrait.js.map +0 -1
- package/dist-npm/traits/destructible/index.d.ts +0 -3
- package/dist-npm/traits/destructible/index.d.ts.map +0 -1
- package/dist-npm/traits/destructible/index.js +0 -8
- package/dist-npm/traits/destructible/index.js.map +0 -1
- package/dist-npm/traits/door/doorBehavior.d.ts +0 -42
- package/dist-npm/traits/door/doorBehavior.d.ts.map +0 -1
- package/dist-npm/traits/door/doorBehavior.js +0 -76
- package/dist-npm/traits/door/doorBehavior.js.map +0 -1
- package/dist-npm/traits/door/doorTrait.d.ts +0 -19
- package/dist-npm/traits/door/doorTrait.d.ts.map +0 -1
- package/dist-npm/traits/door/doorTrait.js +0 -33
- package/dist-npm/traits/door/doorTrait.js.map +0 -1
- package/dist-npm/traits/door/index.d.ts +0 -3
- package/dist-npm/traits/door/index.d.ts.map +0 -1
- package/dist-npm/traits/door/index.js +0 -9
- package/dist-npm/traits/door/index.js.map +0 -1
- package/dist-npm/traits/edible/edibleBehavior.d.ts +0 -63
- package/dist-npm/traits/edible/edibleBehavior.d.ts.map +0 -1
- package/dist-npm/traits/edible/edibleBehavior.js +0 -157
- package/dist-npm/traits/edible/edibleBehavior.js.map +0 -1
- package/dist-npm/traits/edible/edibleTrait.d.ts +0 -57
- package/dist-npm/traits/edible/edibleTrait.d.ts.map +0 -1
- package/dist-npm/traits/edible/edibleTrait.js +0 -51
- package/dist-npm/traits/edible/edibleTrait.js.map +0 -1
- package/dist-npm/traits/edible/index.d.ts +0 -3
- package/dist-npm/traits/edible/index.d.ts.map +0 -1
- package/dist-npm/traits/edible/index.js +0 -20
- package/dist-npm/traits/edible/index.js.map +0 -1
- package/dist-npm/traits/enterable/enterableTrait.d.ts +0 -33
- package/dist-npm/traits/enterable/enterableTrait.d.ts.map +0 -1
- package/dist-npm/traits/enterable/enterableTrait.js +0 -38
- package/dist-npm/traits/enterable/enterableTrait.js.map +0 -1
- package/dist-npm/traits/enterable/index.d.ts +0 -5
- package/dist-npm/traits/enterable/index.d.ts.map +0 -1
- package/dist-npm/traits/enterable/index.js +0 -21
- package/dist-npm/traits/enterable/index.js.map +0 -1
- package/dist-npm/traits/equipped/equippedTrait.d.ts +0 -46
- package/dist-npm/traits/equipped/equippedTrait.d.ts.map +0 -1
- package/dist-npm/traits/equipped/equippedTrait.js +0 -34
- package/dist-npm/traits/equipped/equippedTrait.js.map +0 -1
- package/dist-npm/traits/equipped/index.d.ts +0 -2
- package/dist-npm/traits/equipped/index.d.ts.map +0 -1
- package/dist-npm/traits/equipped/index.js +0 -6
- package/dist-npm/traits/equipped/index.js.map +0 -1
- package/dist-npm/traits/exit/exitBehavior.d.ts +0 -51
- package/dist-npm/traits/exit/exitBehavior.d.ts.map +0 -1
- package/dist-npm/traits/exit/exitBehavior.js +0 -231
- package/dist-npm/traits/exit/exitBehavior.js.map +0 -1
- package/dist-npm/traits/exit/exitTrait.d.ts +0 -41
- package/dist-npm/traits/exit/exitTrait.d.ts.map +0 -1
- package/dist-npm/traits/exit/exitTrait.js +0 -75
- package/dist-npm/traits/exit/exitTrait.js.map +0 -1
- package/dist-npm/traits/exit/index.d.ts +0 -3
- package/dist-npm/traits/exit/index.d.ts.map +0 -1
- package/dist-npm/traits/exit/index.js +0 -9
- package/dist-npm/traits/exit/index.js.map +0 -1
- package/dist-npm/traits/identity/identityBehavior.d.ts +0 -64
- package/dist-npm/traits/identity/identityBehavior.d.ts.map +0 -1
- package/dist-npm/traits/identity/identityBehavior.js +0 -154
- package/dist-npm/traits/identity/identityBehavior.js.map +0 -1
- package/dist-npm/traits/identity/identityTrait.d.ts +0 -70
- package/dist-npm/traits/identity/identityTrait.d.ts.map +0 -1
- package/dist-npm/traits/identity/identityTrait.js +0 -79
- package/dist-npm/traits/identity/identityTrait.js.map +0 -1
- package/dist-npm/traits/identity/index.d.ts +0 -3
- package/dist-npm/traits/identity/index.d.ts.map +0 -1
- package/dist-npm/traits/identity/index.js +0 -20
- package/dist-npm/traits/identity/index.js.map +0 -1
- package/dist-npm/traits/implementations.d.ts +0 -51
- package/dist-npm/traits/implementations.d.ts.map +0 -1
- package/dist-npm/traits/implementations.js +0 -145
- package/dist-npm/traits/implementations.js.map +0 -1
- package/dist-npm/traits/index.d.ts +0 -36
- package/dist-npm/traits/index.d.ts.map +0 -1
- package/dist-npm/traits/index.js +0 -62
- package/dist-npm/traits/index.js.map +0 -1
- package/dist-npm/traits/light-source/index.d.ts +0 -3
- package/dist-npm/traits/light-source/index.d.ts.map +0 -1
- package/dist-npm/traits/light-source/index.js +0 -9
- package/dist-npm/traits/light-source/index.js.map +0 -1
- package/dist-npm/traits/light-source/lightSourceBehavior.d.ts +0 -57
- package/dist-npm/traits/light-source/lightSourceBehavior.d.ts.map +0 -1
- package/dist-npm/traits/light-source/lightSourceBehavior.js +0 -135
- package/dist-npm/traits/light-source/lightSourceBehavior.js.map +0 -1
- package/dist-npm/traits/light-source/lightSourceTrait.d.ts +0 -28
- package/dist-npm/traits/light-source/lightSourceTrait.d.ts.map +0 -1
- package/dist-npm/traits/light-source/lightSourceTrait.js +0 -37
- package/dist-npm/traits/light-source/lightSourceTrait.js.map +0 -1
- package/dist-npm/traits/lockable/index.d.ts +0 -3
- package/dist-npm/traits/lockable/index.d.ts.map +0 -1
- package/dist-npm/traits/lockable/index.js +0 -20
- package/dist-npm/traits/lockable/index.js.map +0 -1
- package/dist-npm/traits/lockable/lockableBehavior.d.ts +0 -88
- package/dist-npm/traits/lockable/lockableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/lockable/lockableBehavior.js +0 -196
- package/dist-npm/traits/lockable/lockableBehavior.js.map +0 -1
- package/dist-npm/traits/lockable/lockableTrait.d.ts +0 -59
- package/dist-npm/traits/lockable/lockableTrait.d.ts.map +0 -1
- package/dist-npm/traits/lockable/lockableTrait.js +0 -50
- package/dist-npm/traits/lockable/lockableTrait.js.map +0 -1
- package/dist-npm/traits/moveable-scenery/index.d.ts +0 -2
- package/dist-npm/traits/moveable-scenery/index.d.ts.map +0 -1
- package/dist-npm/traits/moveable-scenery/index.js +0 -18
- package/dist-npm/traits/moveable-scenery/index.js.map +0 -1
- package/dist-npm/traits/moveable-scenery/moveableSceneryTrait.d.ts +0 -69
- package/dist-npm/traits/moveable-scenery/moveableSceneryTrait.d.ts.map +0 -1
- package/dist-npm/traits/moveable-scenery/moveableSceneryTrait.js +0 -43
- package/dist-npm/traits/moveable-scenery/moveableSceneryTrait.js.map +0 -1
- package/dist-npm/traits/npc/index.d.ts +0 -5
- package/dist-npm/traits/npc/index.d.ts.map +0 -1
- package/dist-npm/traits/npc/index.js +0 -9
- package/dist-npm/traits/npc/index.js.map +0 -1
- package/dist-npm/traits/npc/npcTrait.d.ts +0 -128
- package/dist-npm/traits/npc/npcTrait.d.ts.map +0 -1
- package/dist-npm/traits/npc/npcTrait.js +0 -180
- package/dist-npm/traits/npc/npcTrait.js.map +0 -1
- package/dist-npm/traits/openable/index.d.ts +0 -3
- package/dist-npm/traits/openable/index.d.ts.map +0 -1
- package/dist-npm/traits/openable/index.js +0 -20
- package/dist-npm/traits/openable/index.js.map +0 -1
- package/dist-npm/traits/openable/openableBehavior.d.ts +0 -64
- package/dist-npm/traits/openable/openableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/openable/openableBehavior.js +0 -109
- package/dist-npm/traits/openable/openableBehavior.js.map +0 -1
- package/dist-npm/traits/openable/openableTrait.d.ts +0 -46
- package/dist-npm/traits/openable/openableTrait.d.ts.map +0 -1
- package/dist-npm/traits/openable/openableTrait.js +0 -42
- package/dist-npm/traits/openable/openableTrait.js.map +0 -1
- package/dist-npm/traits/pullable/index.d.ts +0 -2
- package/dist-npm/traits/pullable/index.d.ts.map +0 -1
- package/dist-npm/traits/pullable/index.js +0 -18
- package/dist-npm/traits/pullable/index.js.map +0 -1
- package/dist-npm/traits/pullable/pullableTrait.d.ts +0 -81
- package/dist-npm/traits/pullable/pullableTrait.d.ts.map +0 -1
- package/dist-npm/traits/pullable/pullableTrait.js +0 -44
- package/dist-npm/traits/pullable/pullableTrait.js.map +0 -1
- package/dist-npm/traits/pushable/index.d.ts +0 -2
- package/dist-npm/traits/pushable/index.d.ts.map +0 -1
- package/dist-npm/traits/pushable/index.js +0 -18
- package/dist-npm/traits/pushable/index.js.map +0 -1
- package/dist-npm/traits/pushable/pushableTrait.d.ts +0 -81
- package/dist-npm/traits/pushable/pushableTrait.d.ts.map +0 -1
- package/dist-npm/traits/pushable/pushableTrait.js +0 -44
- package/dist-npm/traits/pushable/pushableTrait.js.map +0 -1
- package/dist-npm/traits/readable/index.d.ts +0 -3
- package/dist-npm/traits/readable/index.d.ts.map +0 -1
- package/dist-npm/traits/readable/index.js +0 -9
- package/dist-npm/traits/readable/index.js.map +0 -1
- package/dist-npm/traits/readable/readableBehavior.d.ts +0 -42
- package/dist-npm/traits/readable/readableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/readable/readableBehavior.js +0 -174
- package/dist-npm/traits/readable/readableBehavior.js.map +0 -1
- package/dist-npm/traits/readable/readableTrait.d.ts +0 -37
- package/dist-npm/traits/readable/readableTrait.d.ts.map +0 -1
- package/dist-npm/traits/readable/readableTrait.js +0 -51
- package/dist-npm/traits/readable/readableTrait.js.map +0 -1
- package/dist-npm/traits/register-all.d.ts +0 -10
- package/dist-npm/traits/register-all.d.ts.map +0 -1
- package/dist-npm/traits/register-all.js +0 -19
- package/dist-npm/traits/register-all.js.map +0 -1
- package/dist-npm/traits/room/index.d.ts +0 -9
- package/dist-npm/traits/room/index.d.ts.map +0 -1
- package/dist-npm/traits/room/index.js +0 -14
- package/dist-npm/traits/room/index.js.map +0 -1
- package/dist-npm/traits/room/roomBehavior.d.ts +0 -87
- package/dist-npm/traits/room/roomBehavior.d.ts.map +0 -1
- package/dist-npm/traits/room/roomBehavior.js +0 -232
- package/dist-npm/traits/room/roomBehavior.js.map +0 -1
- package/dist-npm/traits/room/roomTrait.d.ts +0 -101
- package/dist-npm/traits/room/roomTrait.d.ts.map +0 -1
- package/dist-npm/traits/room/roomTrait.js +0 -59
- package/dist-npm/traits/room/roomTrait.js.map +0 -1
- package/dist-npm/traits/scenery/index.d.ts +0 -3
- package/dist-npm/traits/scenery/index.d.ts.map +0 -1
- package/dist-npm/traits/scenery/index.js +0 -9
- package/dist-npm/traits/scenery/index.js.map +0 -1
- package/dist-npm/traits/scenery/sceneryBehavior.d.ts +0 -21
- package/dist-npm/traits/scenery/sceneryBehavior.d.ts.map +0 -1
- package/dist-npm/traits/scenery/sceneryBehavior.js +0 -42
- package/dist-npm/traits/scenery/sceneryBehavior.js.map +0 -1
- package/dist-npm/traits/scenery/sceneryTrait.d.ts +0 -30
- package/dist-npm/traits/scenery/sceneryTrait.d.ts.map +0 -1
- package/dist-npm/traits/scenery/sceneryTrait.js +0 -39
- package/dist-npm/traits/scenery/sceneryTrait.js.map +0 -1
- package/dist-npm/traits/supporter/index.d.ts +0 -3
- package/dist-npm/traits/supporter/index.d.ts.map +0 -1
- package/dist-npm/traits/supporter/index.js +0 -9
- package/dist-npm/traits/supporter/index.js.map +0 -1
- package/dist-npm/traits/supporter/supporterBehavior.d.ts +0 -83
- package/dist-npm/traits/supporter/supporterBehavior.d.ts.map +0 -1
- package/dist-npm/traits/supporter/supporterBehavior.js +0 -210
- package/dist-npm/traits/supporter/supporterBehavior.js.map +0 -1
- package/dist-npm/traits/supporter/supporterTrait.d.ts +0 -26
- package/dist-npm/traits/supporter/supporterTrait.d.ts.map +0 -1
- package/dist-npm/traits/supporter/supporterTrait.js +0 -30
- package/dist-npm/traits/supporter/supporterTrait.js.map +0 -1
- package/dist-npm/traits/switchable/index.d.ts +0 -3
- package/dist-npm/traits/switchable/index.d.ts.map +0 -1
- package/dist-npm/traits/switchable/index.js +0 -20
- package/dist-npm/traits/switchable/index.js.map +0 -1
- package/dist-npm/traits/switchable/switchableBehavior.d.ts +0 -73
- package/dist-npm/traits/switchable/switchableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/switchable/switchableBehavior.js +0 -191
- package/dist-npm/traits/switchable/switchableBehavior.js.map +0 -1
- package/dist-npm/traits/switchable/switchableTrait.d.ts +0 -61
- package/dist-npm/traits/switchable/switchableTrait.d.ts.map +0 -1
- package/dist-npm/traits/switchable/switchableTrait.js +0 -52
- package/dist-npm/traits/switchable/switchableTrait.js.map +0 -1
- package/dist-npm/traits/trait-types.d.ts +0 -81
- package/dist-npm/traits/trait-types.d.ts.map +0 -1
- package/dist-npm/traits/trait-types.js +0 -146
- package/dist-npm/traits/trait-types.js.map +0 -1
- package/dist-npm/traits/trait.d.ts +0 -44
- package/dist-npm/traits/trait.d.ts.map +0 -1
- package/dist-npm/traits/trait.js +0 -42
- package/dist-npm/traits/trait.js.map +0 -1
- package/dist-npm/traits/vehicle/index.d.ts +0 -6
- package/dist-npm/traits/vehicle/index.d.ts.map +0 -1
- package/dist-npm/traits/vehicle/index.js +0 -22
- package/dist-npm/traits/vehicle/index.js.map +0 -1
- package/dist-npm/traits/vehicle/vehicleBehavior.d.ts +0 -62
- package/dist-npm/traits/vehicle/vehicleBehavior.d.ts.map +0 -1
- package/dist-npm/traits/vehicle/vehicleBehavior.js +0 -145
- package/dist-npm/traits/vehicle/vehicleBehavior.js.map +0 -1
- package/dist-npm/traits/vehicle/vehicleTrait.d.ts +0 -77
- package/dist-npm/traits/vehicle/vehicleTrait.d.ts.map +0 -1
- package/dist-npm/traits/vehicle/vehicleTrait.js +0 -92
- package/dist-npm/traits/vehicle/vehicleTrait.js.map +0 -1
- package/dist-npm/traits/weapon/index.d.ts +0 -3
- package/dist-npm/traits/weapon/index.d.ts.map +0 -1
- package/dist-npm/traits/weapon/index.js +0 -8
- package/dist-npm/traits/weapon/index.js.map +0 -1
- package/dist-npm/traits/weapon/weaponBehavior.d.ts +0 -47
- package/dist-npm/traits/weapon/weaponBehavior.d.ts.map +0 -1
- package/dist-npm/traits/weapon/weaponBehavior.js +0 -106
- package/dist-npm/traits/weapon/weaponBehavior.js.map +0 -1
- package/dist-npm/traits/weapon/weaponTrait.d.ts +0 -67
- package/dist-npm/traits/weapon/weaponTrait.d.ts.map +0 -1
- package/dist-npm/traits/weapon/weaponTrait.js +0 -60
- package/dist-npm/traits/weapon/weaponTrait.js.map +0 -1
- package/dist-npm/traits/wearable/index.d.ts +0 -3
- package/dist-npm/traits/wearable/index.d.ts.map +0 -1
- package/dist-npm/traits/wearable/index.js +0 -20
- package/dist-npm/traits/wearable/index.js.map +0 -1
- package/dist-npm/traits/wearable/wearableBehavior.d.ts +0 -64
- package/dist-npm/traits/wearable/wearableBehavior.d.ts.map +0 -1
- package/dist-npm/traits/wearable/wearableBehavior.js +0 -142
- package/dist-npm/traits/wearable/wearableBehavior.js.map +0 -1
- package/dist-npm/traits/wearable/wearableTrait.d.ts +0 -54
- package/dist-npm/traits/wearable/wearableTrait.d.ts.map +0 -1
- package/dist-npm/traits/wearable/wearableTrait.js +0 -53
- package/dist-npm/traits/wearable/wearableTrait.js.map +0 -1
- package/dist-npm/utils/event-utils.d.ts +0 -30
- package/dist-npm/utils/event-utils.d.ts.map +0 -1
- package/dist-npm/utils/event-utils.js +0 -33
- package/dist-npm/utils/event-utils.js.map +0 -1
- package/dist-npm/world/AuthorModel.d.ts +0 -151
- package/dist-npm/world/AuthorModel.d.ts.map +0 -1
- package/dist-npm/world/AuthorModel.js +0 -416
- package/dist-npm/world/AuthorModel.js.map +0 -1
- package/dist-npm/world/SharedDataStore.d.ts +0 -24
- package/dist-npm/world/SharedDataStore.d.ts.map +0 -1
- package/dist-npm/world/SharedDataStore.js +0 -50
- package/dist-npm/world/SharedDataStore.js.map +0 -1
- package/dist-npm/world/SpatialIndex.d.ts +0 -16
- package/dist-npm/world/SpatialIndex.d.ts.map +0 -1
- package/dist-npm/world/SpatialIndex.js +0 -117
- package/dist-npm/world/SpatialIndex.js.map +0 -1
- package/dist-npm/world/VisibilityBehavior.d.ts +0 -83
- package/dist-npm/world/VisibilityBehavior.d.ts.map +0 -1
- package/dist-npm/world/VisibilityBehavior.js +0 -484
- package/dist-npm/world/VisibilityBehavior.js.map +0 -1
- package/dist-npm/world/WorldModel.d.ts +0 -301
- package/dist-npm/world/WorldModel.d.ts.map +0 -1
- package/dist-npm/world/WorldModel.js +0 -1085
- package/dist-npm/world/WorldModel.js.map +0 -1
- package/dist-npm/world/capabilities.d.ts +0 -36
- package/dist-npm/world/capabilities.d.ts.map +0 -1
- package/dist-npm/world/capabilities.js +0 -18
- package/dist-npm/world/capabilities.js.map +0 -1
- package/dist-npm/world/index.d.ts +0 -7
- package/dist-npm/world/index.d.ts.map +0 -1
- package/dist-npm/world/index.js +0 -21
- package/dist-npm/world/index.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Register all built-in traits with the trait registry.
|
|
3
|
-
* This should be called during application initialization.
|
|
4
|
-
*
|
|
5
|
-
* Note: All traits are now available through the TRAIT_IMPLEMENTATIONS map
|
|
6
|
-
* in implementations.ts. The registry pattern is optional and may be
|
|
7
|
-
* removed in the future.
|
|
8
|
-
*/
|
|
9
|
-
export declare function registerAllTraits(): void;
|
|
10
|
-
//# sourceMappingURL=register-all.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-all.d.ts","sourceRoot":"","sources":["../../src/traits/register-all.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// packages/world-model/src/traits/register-all.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.registerAllTraits = registerAllTraits;
|
|
5
|
-
/**
|
|
6
|
-
* Register all built-in traits with the trait registry.
|
|
7
|
-
* This should be called during application initialization.
|
|
8
|
-
*
|
|
9
|
-
* Note: All traits are now available through the TRAIT_IMPLEMENTATIONS map
|
|
10
|
-
* in implementations.ts. The registry pattern is optional and may be
|
|
11
|
-
* removed in the future.
|
|
12
|
-
*/
|
|
13
|
-
function registerAllTraits() {
|
|
14
|
-
// All traits are now available through the TRAIT_IMPLEMENTATIONS map
|
|
15
|
-
// Registration is optional and handled through the implementations map
|
|
16
|
-
// TODO: Consider removing this file and the registry pattern entirely
|
|
17
|
-
// as we're using the implementations map for trait lookup
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=register-all.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-all.js","sourceRoot":"","sources":["../../src/traits/register-all.ts"],"names":[],"mappings":";AAAA,kDAAkD;;AAUlD,8CAMC;AAdD;;;;;;;GAOG;AACH,SAAgB,iBAAiB;IAC/B,qEAAqE;IACrE,uEAAuE;IAEvE,sEAAsE;IACtE,0DAA0D;AAC5D,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Room trait module
|
|
3
|
-
*
|
|
4
|
-
* Exports both the trait and behavior for rooms.
|
|
5
|
-
* Rooms are special entities that represent locations in the game world.
|
|
6
|
-
*/
|
|
7
|
-
export { RoomTrait } from './roomTrait';
|
|
8
|
-
export { RoomBehavior } from './roomBehavior';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/traits/room/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Room trait module
|
|
4
|
-
*
|
|
5
|
-
* Exports both the trait and behavior for rooms.
|
|
6
|
-
* Rooms are special entities that represent locations in the game world.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RoomBehavior = exports.RoomTrait = void 0;
|
|
10
|
-
var roomTrait_1 = require("./roomTrait");
|
|
11
|
-
Object.defineProperty(exports, "RoomTrait", { enumerable: true, get: function () { return roomTrait_1.RoomTrait; } });
|
|
12
|
-
var roomBehavior_1 = require("./roomBehavior");
|
|
13
|
-
Object.defineProperty(exports, "RoomBehavior", { enumerable: true, get: function () { return roomBehavior_1.RoomBehavior; } });
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/traits/room/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Behavior } from '../../behaviors/behavior';
|
|
2
|
-
import { IFEntity } from '../../entities/if-entity';
|
|
3
|
-
import { IExitInfo } from './roomTrait';
|
|
4
|
-
import { ISemanticEvent } from '@sharpee/core';
|
|
5
|
-
import { DirectionType } from '../../constants/directions';
|
|
6
|
-
/**
|
|
7
|
-
* Behavior for room entities.
|
|
8
|
-
*
|
|
9
|
-
* Handles the logic for rooms including exits, lighting, and visits.
|
|
10
|
-
* All methods are pure and only operate on the given room entity.
|
|
11
|
-
*/
|
|
12
|
-
export declare class RoomBehavior extends Behavior {
|
|
13
|
-
static requiredTraits: "room"[];
|
|
14
|
-
/**
|
|
15
|
-
* Get the exit in a given direction
|
|
16
|
-
*/
|
|
17
|
-
static getExit(room: IFEntity, direction: DirectionType): IExitInfo | null;
|
|
18
|
-
/**
|
|
19
|
-
* Check if an exit exists in a direction
|
|
20
|
-
*/
|
|
21
|
-
static hasExit(room: IFEntity, direction: DirectionType): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Check if an exit is blocked
|
|
24
|
-
*/
|
|
25
|
-
static isExitBlocked(room: IFEntity, direction: DirectionType): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Get blocked exit message
|
|
28
|
-
*/
|
|
29
|
-
static getBlockedMessage(room: IFEntity, direction: DirectionType): string | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Add or update an exit in this room
|
|
32
|
-
*/
|
|
33
|
-
static setExit(room: IFEntity, direction: DirectionType, destination: string, via?: string): void;
|
|
34
|
-
/**
|
|
35
|
-
* Block an exit with a message
|
|
36
|
-
*/
|
|
37
|
-
static blockExit(room: IFEntity, direction: DirectionType, message: string): ISemanticEvent[];
|
|
38
|
-
/**
|
|
39
|
-
* Unblock an exit
|
|
40
|
-
*/
|
|
41
|
-
static unblockExit(room: IFEntity, direction: DirectionType): ISemanticEvent[];
|
|
42
|
-
/**
|
|
43
|
-
* Remove an exit from this room
|
|
44
|
-
*/
|
|
45
|
-
static removeExit(room: IFEntity, direction: DirectionType): void;
|
|
46
|
-
/**
|
|
47
|
-
* Mark room as visited
|
|
48
|
-
*/
|
|
49
|
-
static markVisited(room: IFEntity, actor: IFEntity): ISemanticEvent[];
|
|
50
|
-
/**
|
|
51
|
-
* Check if room has been visited
|
|
52
|
-
*/
|
|
53
|
-
static hasBeenVisited(room: IFEntity): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Get all exits from the room
|
|
56
|
-
*/
|
|
57
|
-
static getAllExits(room: IFEntity): Map<DirectionType, IExitInfo>;
|
|
58
|
-
/**
|
|
59
|
-
* Get available (non-blocked) exits
|
|
60
|
-
*/
|
|
61
|
-
static getAvailableExits(room: IFEntity): Map<DirectionType, IExitInfo>;
|
|
62
|
-
/**
|
|
63
|
-
* Check if room is outdoors
|
|
64
|
-
*/
|
|
65
|
-
static isOutdoors(room: IFEntity): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Check if room is underground
|
|
68
|
-
*/
|
|
69
|
-
static isUnderground(room: IFEntity): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Get room region
|
|
72
|
-
*/
|
|
73
|
-
static getRegion(room: IFEntity): string | undefined;
|
|
74
|
-
/**
|
|
75
|
-
* Check if room has a specific tag
|
|
76
|
-
*/
|
|
77
|
-
static hasTag(room: IFEntity, tag: string): boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Add a tag to the room
|
|
80
|
-
*/
|
|
81
|
-
static addTag(room: IFEntity, tag: string): void;
|
|
82
|
-
/**
|
|
83
|
-
* Remove a tag from the room
|
|
84
|
-
*/
|
|
85
|
-
static removeTag(room: IFEntity, tag: string): void;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=roomBehavior.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roomBehavior.d.ts","sourceRoot":"","sources":["../../../src/traits/room/roomBehavior.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAa,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,cAAc,EAAY,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAa,aAAa,EAAwB,MAAM,4BAA4B,CAAC;AAG5F;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACxC,MAAM,CAAC,cAAc,WAAoB;IAEzC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;IAS1E;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO;IAIjE;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO;IAKvE;;OAEG;IACH,MAAM,CAAC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,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAKnD;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAQhD;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;CAQpD"}
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// packages/world-model/src/traits/room/roomBehavior.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.RoomBehavior = void 0;
|
|
5
|
-
const behavior_1 = require("../../behaviors/behavior");
|
|
6
|
-
const trait_types_1 = require("../trait-types");
|
|
7
|
-
const if_events_1 = require("../../constants/if-events");
|
|
8
|
-
/**
|
|
9
|
-
* Behavior for room entities.
|
|
10
|
-
*
|
|
11
|
-
* Handles the logic for rooms including exits, lighting, and visits.
|
|
12
|
-
* All methods are pure and only operate on the given room entity.
|
|
13
|
-
*/
|
|
14
|
-
class RoomBehavior extends behavior_1.Behavior {
|
|
15
|
-
static requiredTraits = [trait_types_1.TraitType.ROOM];
|
|
16
|
-
/**
|
|
17
|
-
* Get the exit in a given direction
|
|
18
|
-
*/
|
|
19
|
-
static getExit(room, direction) {
|
|
20
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
21
|
-
if (!roomTrait.exits) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const exitInfo = roomTrait.exits[direction];
|
|
25
|
-
return exitInfo || null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Check if an exit exists in a direction
|
|
29
|
-
*/
|
|
30
|
-
static hasExit(room, direction) {
|
|
31
|
-
return this.getExit(room, direction) !== undefined;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Check if an exit is blocked
|
|
35
|
-
*/
|
|
36
|
-
static isExitBlocked(room, direction) {
|
|
37
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
38
|
-
return roomTrait.blockedExits?.hasOwnProperty(direction) ?? false;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get blocked exit message
|
|
42
|
-
*/
|
|
43
|
-
static getBlockedMessage(room, direction) {
|
|
44
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
45
|
-
return roomTrait.blockedExits?.[direction];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Add or update an exit in this room
|
|
49
|
-
*/
|
|
50
|
-
static setExit(room, direction, destination, via) {
|
|
51
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
52
|
-
// Initialize exits if needed
|
|
53
|
-
if (!roomTrait.exits) {
|
|
54
|
-
roomTrait.exits = {};
|
|
55
|
-
}
|
|
56
|
-
roomTrait.exits[direction] = {
|
|
57
|
-
destination,
|
|
58
|
-
via
|
|
59
|
-
};
|
|
60
|
-
// Remove any blocked message for this direction
|
|
61
|
-
if (roomTrait.blockedExits) {
|
|
62
|
-
delete roomTrait.blockedExits[direction];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Block an exit with a message
|
|
67
|
-
*/
|
|
68
|
-
static blockExit(room, direction, message) {
|
|
69
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
70
|
-
if (!roomTrait.blockedExits) {
|
|
71
|
-
roomTrait.blockedExits = {};
|
|
72
|
-
}
|
|
73
|
-
roomTrait.blockedExits[direction] = message;
|
|
74
|
-
return [{
|
|
75
|
-
id: `${Date.now()}-${Math.random()}`,
|
|
76
|
-
timestamp: Date.now(),
|
|
77
|
-
type: if_events_1.IFEvents.MOVEMENT_BLOCKED,
|
|
78
|
-
entities: {
|
|
79
|
-
location: room.id
|
|
80
|
-
},
|
|
81
|
-
data: {
|
|
82
|
-
direction: direction,
|
|
83
|
-
message
|
|
84
|
-
}
|
|
85
|
-
}];
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Unblock an exit
|
|
89
|
-
*/
|
|
90
|
-
static unblockExit(room, direction) {
|
|
91
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
92
|
-
if (!roomTrait.blockedExits) {
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
95
|
-
if (!roomTrait.blockedExits[direction]) {
|
|
96
|
-
return [];
|
|
97
|
-
}
|
|
98
|
-
delete roomTrait.blockedExits[direction];
|
|
99
|
-
return [{
|
|
100
|
-
id: `${Date.now()}-${Math.random()}`,
|
|
101
|
-
timestamp: Date.now(),
|
|
102
|
-
type: if_events_1.IFEvents.NEW_EXIT_REVEALED,
|
|
103
|
-
entities: {
|
|
104
|
-
location: room.id
|
|
105
|
-
},
|
|
106
|
-
data: {
|
|
107
|
-
direction: direction,
|
|
108
|
-
unblocked: true
|
|
109
|
-
}
|
|
110
|
-
}];
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Remove an exit from this room
|
|
114
|
-
*/
|
|
115
|
-
static removeExit(room, direction) {
|
|
116
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
117
|
-
// Remove the exit if exits exist
|
|
118
|
-
if (roomTrait.exits) {
|
|
119
|
-
delete roomTrait.exits[direction];
|
|
120
|
-
}
|
|
121
|
-
// Remove any blocked message
|
|
122
|
-
if (roomTrait.blockedExits) {
|
|
123
|
-
delete roomTrait.blockedExits[direction];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Mark room as visited
|
|
128
|
-
*/
|
|
129
|
-
static markVisited(room, actor) {
|
|
130
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
131
|
-
if (roomTrait.visited) {
|
|
132
|
-
return [];
|
|
133
|
-
}
|
|
134
|
-
roomTrait.visited = true;
|
|
135
|
-
return [{
|
|
136
|
-
id: `${Date.now()}-${Math.random()}`,
|
|
137
|
-
timestamp: Date.now(),
|
|
138
|
-
type: if_events_1.IFEvents.ROOM_FIRST_ENTERED,
|
|
139
|
-
entities: {
|
|
140
|
-
location: room.id,
|
|
141
|
-
actor: actor.id
|
|
142
|
-
},
|
|
143
|
-
data: {
|
|
144
|
-
hasInitialDescription: !!roomTrait.initialDescription
|
|
145
|
-
}
|
|
146
|
-
}];
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Check if room has been visited
|
|
150
|
-
*/
|
|
151
|
-
static hasBeenVisited(room) {
|
|
152
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
153
|
-
return roomTrait.visited;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Get all exits from the room
|
|
157
|
-
*/
|
|
158
|
-
static getAllExits(room) {
|
|
159
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
160
|
-
if (!roomTrait.exits) {
|
|
161
|
-
return new Map();
|
|
162
|
-
}
|
|
163
|
-
return new Map(Object.entries(roomTrait.exits));
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Get available (non-blocked) exits
|
|
167
|
-
*/
|
|
168
|
-
static getAvailableExits(room) {
|
|
169
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
170
|
-
const available = new Map();
|
|
171
|
-
if (!roomTrait.exits) {
|
|
172
|
-
return available;
|
|
173
|
-
}
|
|
174
|
-
for (const [direction, exitInfo] of Object.entries(roomTrait.exits)) {
|
|
175
|
-
if (!this.isExitBlocked(room, direction)) {
|
|
176
|
-
available.set(direction, exitInfo);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return available;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Check if room is outdoors
|
|
183
|
-
*/
|
|
184
|
-
static isOutdoors(room) {
|
|
185
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
186
|
-
return roomTrait.isOutdoors || false;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Check if room is underground
|
|
190
|
-
*/
|
|
191
|
-
static isUnderground(room) {
|
|
192
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
193
|
-
return roomTrait.isUnderground || false;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Get room region
|
|
197
|
-
*/
|
|
198
|
-
static getRegion(room) {
|
|
199
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
200
|
-
return roomTrait.region;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Check if room has a specific tag
|
|
204
|
-
*/
|
|
205
|
-
static hasTag(room, tag) {
|
|
206
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
207
|
-
return roomTrait.tags.includes(tag.toLowerCase());
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Add a tag to the room
|
|
211
|
-
*/
|
|
212
|
-
static addTag(room, tag) {
|
|
213
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
214
|
-
const normalizedTag = tag.toLowerCase();
|
|
215
|
-
if (!roomTrait.tags.includes(normalizedTag)) {
|
|
216
|
-
roomTrait.tags.push(normalizedTag);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Remove a tag from the room
|
|
221
|
-
*/
|
|
222
|
-
static removeTag(room, tag) {
|
|
223
|
-
const roomTrait = RoomBehavior.require(room, trait_types_1.TraitType.ROOM);
|
|
224
|
-
const normalizedTag = tag.toLowerCase();
|
|
225
|
-
const index = roomTrait.tags.indexOf(normalizedTag);
|
|
226
|
-
if (index >= 0) {
|
|
227
|
-
roomTrait.tags.splice(index, 1);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
exports.RoomBehavior = RoomBehavior;
|
|
232
|
-
//# sourceMappingURL=roomBehavior.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roomBehavior.js","sourceRoot":"","sources":["../../../src/traits/room/roomBehavior.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAEvD,uDAAoD;AAEpD,gDAA2C;AAG3C,yDAAqD;AAIrD;;;;;GAKG;AACH,MAAa,YAAa,SAAQ,mBAAQ;IACxC,MAAM,CAAC,cAAc,GAAG,CAAC,uBAAS,CAAC,IAAI,CAAC,CAAC;IAEzC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAc,EAAE,SAAwB;QACrD,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAY,IAAI,EAAE,uBAAS,CAAC,IAAI,CAAC,CAAC;QACxE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5C,OAAO,QAAQ,IAAI,IAAI,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAc,EAAE,SAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,SAAS,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAc,EAAE,SAAwB;QAC3D,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAY,IAAI,EAAE,uBAAS,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC,YAAY,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAc,EAAE,SAAwB;QAC/D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AE,GAAW;QACvC,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAY,IAAI,EAAE,uBAAS,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAc,EAAE,GAAW;QACvC,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAY,IAAI,EAAE,uBAAS,CAAC,IAAI,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAC5C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,IAAc,EAAE,GAAW;QAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAY,IAAI,EAAE,uBAAS,CAAC,IAAI,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACf,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;;AA5PH,oCA6PC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ITrait } from '../trait';
|
|
2
|
-
import { DirectionType } from '../../constants/directions';
|
|
3
|
-
/**
|
|
4
|
-
* Map position hint for an exit (ADR-113).
|
|
5
|
-
* Overrides direction-based positioning in the auto-mapper.
|
|
6
|
-
*/
|
|
7
|
-
export interface IExitMapHint {
|
|
8
|
-
/** Grid offset X (-1 = west, +1 = east) */
|
|
9
|
-
dx?: number;
|
|
10
|
-
/** Grid offset Y (-1 = north, +1 = south) */
|
|
11
|
-
dy?: number;
|
|
12
|
-
/** Grid offset Z (-1 = down, +1 = up) */
|
|
13
|
-
dz?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface IExitInfo {
|
|
16
|
-
/** The destination room ID (must be an entity ID, not a name) */
|
|
17
|
-
destination: string;
|
|
18
|
-
/** Optional door/portal entity ID that must be traversed (must be an entity ID, not a name) */
|
|
19
|
-
via?: string;
|
|
20
|
-
/** Optional map positioning hint (ADR-113) */
|
|
21
|
-
mapHint?: IExitMapHint;
|
|
22
|
-
}
|
|
23
|
-
export interface IRoomData {
|
|
24
|
-
/** Whether this room has been visited by the player */
|
|
25
|
-
visited?: boolean;
|
|
26
|
-
/** Exits from this room */
|
|
27
|
-
exits?: Partial<Record<DirectionType, IExitInfo>>;
|
|
28
|
-
/** Custom messages for blocked exits */
|
|
29
|
-
blockedExits?: Partial<Record<DirectionType, string>>;
|
|
30
|
-
/** Whether this is an outdoor location */
|
|
31
|
-
outdoor?: boolean;
|
|
32
|
-
/** Whether this room is dark (requires light source to see) */
|
|
33
|
-
isDark?: boolean;
|
|
34
|
-
/** Whether this room is affected by time of day (for outdoor locations) */
|
|
35
|
-
isOutdoors?: boolean;
|
|
36
|
-
/** Whether this room is underground (never has natural light) */
|
|
37
|
-
isUnderground?: boolean;
|
|
38
|
-
/** Initial description (shown on first visit) */
|
|
39
|
-
initialDescription?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Message ID for localized initial description (ADR-107).
|
|
42
|
-
* If set, takes precedence over literal `initialDescription`.
|
|
43
|
-
*/
|
|
44
|
-
initialDescriptionId?: string;
|
|
45
|
-
/** Ambient sound description */
|
|
46
|
-
ambientSound?: string;
|
|
47
|
-
/** Ambient smell description */
|
|
48
|
-
ambientSmell?: string;
|
|
49
|
-
/** Region or area this room belongs to */
|
|
50
|
-
region?: string;
|
|
51
|
-
/** Tags for categorizing rooms */
|
|
52
|
-
tags?: string[];
|
|
53
|
-
/** Capacity constraints for the room (optional) */
|
|
54
|
-
capacity?: {
|
|
55
|
-
/** Maximum total weight the room can hold (in kg) */
|
|
56
|
-
maxWeight?: number;
|
|
57
|
-
/** Maximum total volume the room can hold (in liters) */
|
|
58
|
-
maxVolume?: number;
|
|
59
|
-
/** Maximum number of items the room can hold */
|
|
60
|
-
maxItems?: number;
|
|
61
|
-
};
|
|
62
|
-
/** Only these entity types can be placed in the room */
|
|
63
|
-
allowedTypes?: string[];
|
|
64
|
-
/** These entity types cannot be placed in the room */
|
|
65
|
-
excludedTypes?: string[];
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Room trait marks an entity as a location/room in the game world.
|
|
69
|
-
* Rooms are special entities that represent locations and can contain other entities.
|
|
70
|
-
*
|
|
71
|
-
* Rooms inherently have container functionality - they can hold items, actors, and other entities.
|
|
72
|
-
* The actual containment relationships are stored in the SpatialIndex, not in the trait itself.
|
|
73
|
-
*/
|
|
74
|
-
export declare class RoomTrait implements ITrait, IRoomData {
|
|
75
|
-
static readonly type: "room";
|
|
76
|
-
readonly type: "room";
|
|
77
|
-
visited: boolean;
|
|
78
|
-
exits: Partial<Record<DirectionType, IExitInfo>>;
|
|
79
|
-
blockedExits?: Partial<Record<DirectionType, string>>;
|
|
80
|
-
outdoor: boolean;
|
|
81
|
-
isDark: boolean;
|
|
82
|
-
isOutdoors: boolean;
|
|
83
|
-
isUnderground: boolean;
|
|
84
|
-
initialDescription?: string;
|
|
85
|
-
initialDescriptionId?: string;
|
|
86
|
-
ambientSound?: string;
|
|
87
|
-
ambientSmell?: string;
|
|
88
|
-
region?: string;
|
|
89
|
-
tags: string[];
|
|
90
|
-
capacity?: {
|
|
91
|
-
maxWeight?: number;
|
|
92
|
-
maxVolume?: number;
|
|
93
|
-
maxItems?: number;
|
|
94
|
-
};
|
|
95
|
-
allowedTypes?: string[];
|
|
96
|
-
excludedTypes?: string[];
|
|
97
|
-
readonly isTransparent: boolean;
|
|
98
|
-
readonly enterable: boolean;
|
|
99
|
-
constructor(data?: IRoomData);
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=roomTrait.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roomTrait.d.ts","sourceRoot":"","sources":["../../../src/traits/room/roomTrait.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;IAElD,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtD,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,iEAAiE;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,iDAAiD;IACj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ACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IAGf,QAAQ,CAAC,EAAE;QACT,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAGzB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAQ;IACvC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAQ;gBAEvB,IAAI,GAAE,SAAc;CAqBjC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// packages/world-model/src/traits/room/roomTrait.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.RoomTrait = void 0;
|
|
5
|
-
const trait_types_1 = require("../trait-types");
|
|
6
|
-
/**
|
|
7
|
-
* Room trait marks an entity as a location/room in the game world.
|
|
8
|
-
* Rooms are special entities that represent locations and can contain other entities.
|
|
9
|
-
*
|
|
10
|
-
* Rooms inherently have container functionality - they can hold items, actors, and other entities.
|
|
11
|
-
* The actual containment relationships are stored in the SpatialIndex, not in the trait itself.
|
|
12
|
-
*/
|
|
13
|
-
class RoomTrait {
|
|
14
|
-
static type = trait_types_1.TraitType.ROOM;
|
|
15
|
-
type = trait_types_1.TraitType.ROOM;
|
|
16
|
-
// RoomData properties
|
|
17
|
-
visited;
|
|
18
|
-
exits;
|
|
19
|
-
blockedExits;
|
|
20
|
-
outdoor;
|
|
21
|
-
isDark;
|
|
22
|
-
isOutdoors;
|
|
23
|
-
isUnderground;
|
|
24
|
-
initialDescription;
|
|
25
|
-
initialDescriptionId;
|
|
26
|
-
ambientSound;
|
|
27
|
-
ambientSmell;
|
|
28
|
-
region;
|
|
29
|
-
tags;
|
|
30
|
-
// Container functionality
|
|
31
|
-
capacity;
|
|
32
|
-
allowedTypes;
|
|
33
|
-
excludedTypes;
|
|
34
|
-
// Rooms are always transparent (contents visible) and enterable
|
|
35
|
-
isTransparent = true;
|
|
36
|
-
enterable = true;
|
|
37
|
-
constructor(data = {}) {
|
|
38
|
-
// Set defaults and merge with provided data
|
|
39
|
-
this.visited = data.visited ?? false;
|
|
40
|
-
this.exits = data.exits ?? {};
|
|
41
|
-
this.blockedExits = data.blockedExits;
|
|
42
|
-
this.outdoor = data.outdoor ?? false;
|
|
43
|
-
this.isDark = data.isDark ?? false; // Default to lit
|
|
44
|
-
this.isOutdoors = data.isOutdoors ?? false;
|
|
45
|
-
this.isUnderground = data.isUnderground ?? false;
|
|
46
|
-
this.initialDescription = data.initialDescription;
|
|
47
|
-
this.initialDescriptionId = data.initialDescriptionId;
|
|
48
|
-
this.ambientSound = data.ambientSound;
|
|
49
|
-
this.ambientSmell = data.ambientSmell;
|
|
50
|
-
this.region = data.region;
|
|
51
|
-
this.tags = data.tags ?? [];
|
|
52
|
-
// Container properties
|
|
53
|
-
this.capacity = data.capacity;
|
|
54
|
-
this.allowedTypes = data.allowedTypes;
|
|
55
|
-
this.excludedTypes = data.excludedTypes;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.RoomTrait = RoomTrait;
|
|
59
|
-
//# sourceMappingURL=roomTrait.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roomTrait.js","sourceRoot":"","sources":["../../../src/traits/room/roomTrait.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAGpD,gDAA2C;AAyF3C;;;;;;GAMG;AACH,MAAa,SAAS;IACpB,MAAM,CAAU,IAAI,GAAG,uBAAS,CAAC,IAAI,CAAC;IAC7B,IAAI,GAAG,uBAAS,CAAC,IAAI,CAAC;IAE/B,sBAAsB;IACtB,OAAO,CAAU;IACjB,KAAK,CAA4C;IACjD,YAAY,CAA0C;IACtD,OAAO,CAAU;IACjB,MAAM,CAA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;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;IAC1C,CAAC;;AApDH,8BAqDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/traits/scenery/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// packages/world-model/src/traits/scenery/index.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SceneryBehavior = exports.SceneryTrait = void 0;
|
|
5
|
-
var sceneryTrait_1 = require("./sceneryTrait");
|
|
6
|
-
Object.defineProperty(exports, "SceneryTrait", { enumerable: true, get: function () { return sceneryTrait_1.SceneryTrait; } });
|
|
7
|
-
var sceneryBehavior_1 = require("./sceneryBehavior");
|
|
8
|
-
Object.defineProperty(exports, "SceneryBehavior", { enumerable: true, get: function () { return sceneryBehavior_1.SceneryBehavior; } });
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/traits/scenery/index.ts"],"names":[],"mappings":";AAAA,mDAAmD;;;AAEnD,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { IFEntity } from '../../entities/if-entity';
|
|
2
|
-
/**
|
|
3
|
-
* Behavior for scenery entities.
|
|
4
|
-
* Handles logic related to fixed-in-place objects.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SceneryBehavior {
|
|
7
|
-
static readonly requiredTraits: "scenery"[];
|
|
8
|
-
/**
|
|
9
|
-
* Get the reason why this item can't be taken
|
|
10
|
-
*/
|
|
11
|
-
static getUntakeableReason(entity: IFEntity): string;
|
|
12
|
-
/**
|
|
13
|
-
* Get the custom can't-take message if any
|
|
14
|
-
*/
|
|
15
|
-
static getCantTakeMessage(entity: IFEntity): string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Check if this scenery should be mentioned in room descriptions
|
|
18
|
-
*/
|
|
19
|
-
static isMentioned(entity: IFEntity): boolean;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=sceneryBehavior.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sceneryBehavior.d.ts","sourceRoot":"","sources":["../../../src/traits/scenery/sceneryBehavior.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIpD;;;GAGG;AACH,qBAAa,eAAe;IAC1B,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAuB;IAErD;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAapD;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS;IAK/D;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO;CAI9C"}
|