Home
Pages

src/systems

declarative-hex-worlds

declarative-hex-worlds


declarative-hex-worlds / src/systems

src/systems

src/systems/ — per-tick systems that read traits + apply mutations to the koota world.

Each file is a single system function (or a small cohesive bundle of related system functions). Composition into the per-frame tick happens in src/frameloop.ts (post-Epic-R2r).

  • ./command-dispatch — command planning/dispatch plus command event conversion.
  • ./events — system event contracts and serializable event snapshots.
  • ./tick — movement/patrol/quest tick orchestration.
  • ./systems — high-level actions and command-plus-tick composition.
  • ./world-rules-system — runtime rule-evaluation system (was src/world-rules.ts before R2n).

Functions

canPlaceHarborAt()

canPlaceHarborAt(world, coordinates, facing): boolean

Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:38

Checks whether a harbor may face water from the requested world tile.

Parameters

world

World

coordinates

HexCoordinates

facing

number

Returns

boolean


canStackAt()

canStackAt(world, coordinates, height, config?): boolean

Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:27

Checks whether a world tile can support the requested elevation.

Parameters

world

World

coordinates

string | HexCoordinates

height

number

config?

GameboardRuleConfig = {}

Returns

boolean


setTileElevation()

setTileElevation(world, coordinates, elevation): void

Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:59

Mutates the elevation state for one tile entity in a Koota world.

Parameters

world

World

coordinates

string | HexCoordinates

elevation

number

Returns

void


setTileTerrain()

setTileTerrain(world, coordinates, terrain): void

Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:45

Mutates the terrain state for one tile entity in a Koota world.

Parameters

world

World

coordinates

string | HexCoordinates

terrain

GameboardTerrain

Returns

void


validateGameboardRules()

validateGameboardRules(world, config?): GameboardRuleViolation[]

Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:19

Validates the current Koota world by projecting it into a validation plan.

Parameters

world

World

config?

GameboardRuleConfig = {}

Returns

GameboardRuleViolation[]

References

dispatchGameboardActorTargetCommand

Re-exports dispatchGameboardActorTargetCommand


DispatchGameboardActorTargetCommandResult

Re-exports DispatchGameboardActorTargetCommandResult


dispatchGameboardInteractionCommand

Re-exports dispatchGameboardInteractionCommand


DispatchGameboardInteractionCommandOptions

Re-exports DispatchGameboardInteractionCommandOptions


DispatchGameboardInteractionCommandResult

Re-exports DispatchGameboardInteractionCommandResult


GameboardCommandBlockedEvent

Re-exports GameboardCommandBlockedEvent


GameboardCommandHandledEvent

Re-exports GameboardCommandHandledEvent


GameboardCommandHandlerRequiredEvent

Re-exports GameboardCommandHandlerRequiredEvent


GameboardCommandIgnoredEvent

Re-exports GameboardCommandIgnoredEvent


GameboardInteractionCommandRecord

Re-exports GameboardInteractionCommandRecord


GameboardMovementBlockedEvent

Re-exports GameboardMovementBlockedEvent


GameboardMovementCompletedEvent

Re-exports GameboardMovementCompletedEvent


GameboardMovementEventRecord

Re-exports GameboardMovementEventRecord


GameboardMovementRequestedEvent

Re-exports GameboardMovementRequestedEvent


GameboardMovementSteppedEvent

Re-exports GameboardMovementSteppedEvent


GameboardPatrolBlockedEvent

Re-exports GameboardPatrolBlockedEvent


GameboardPatrolCompletedEvent

Re-exports GameboardPatrolCompletedEvent


GameboardPatrolEventRecord

Re-exports GameboardPatrolEventRecord


GameboardPatrolMoveRequestedEvent

Re-exports GameboardPatrolMoveRequestedEvent


GameboardPatrolWaitingEvent

Re-exports GameboardPatrolWaitingEvent


GameboardQuestAdvancedEvent

Re-exports GameboardQuestAdvancedEvent


GameboardQuestBlockedEvent

Re-exports GameboardQuestBlockedEvent


GameboardQuestCompletedEvent

Re-exports GameboardQuestCompletedEvent


GameboardQuestEventRecord

Re-exports GameboardQuestEventRecord


gameboardSystemActions

Re-exports gameboardSystemActions


GameboardSystemEvent

Re-exports GameboardSystemEvent


GameboardSystemEventRecord

Re-exports GameboardSystemEventRecord


runGameboardActorTargetInteraction

Re-exports runGameboardActorTargetInteraction


RunGameboardActorTargetInteractionResult

Re-exports RunGameboardActorTargetInteractionResult


runGameboardInteraction

Re-exports runGameboardInteraction


RunGameboardInteractionOptions

Re-exports RunGameboardInteractionOptions


RunGameboardInteractionResult

Re-exports RunGameboardInteractionResult


runGameboardSystems

Re-exports runGameboardSystems


RunGameboardSystemsOptions

Re-exports RunGameboardSystemsOptions


RunGameboardSystemsResult

Re-exports RunGameboardSystemsResult


snapshotGameboardSystemEvent

Re-exports snapshotGameboardSystemEvent


snapshotGameboardSystemEvents

Re-exports snapshotGameboardSystemEvents