src/systems
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 (wassrc/world-rules.tsbefore R2n).
Functions
canPlaceHarborAt()
canPlaceHarborAt(
world,coordinates,facing):boolean
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:43
Checks whether a harbor may face water from the requested world tile.
Parameters
world
World
coordinates
facing
number
Returns
boolean
canStackAt()
canStackAt(
world,coordinates,height,config?):boolean
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:32
Checks whether a world tile can support the requested elevation.
Parameters
world
World
coordinates
string | HexCoordinates
height
number
config?
GameboardRuleConfig = {}
Returns
boolean
setTileBiome()
setTileBiome(
world,coordinates,biome):void
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:69
Mutates the game-owned biome of one tile entity in a Koota world, keeping
the aggregate HexTileState and the decomposed TileBiome trait in step.
Pass undefined to remove the biome (and the TileBiome trait). The biome
is independent of terrain, so setTileTerrain never changes it.
Parameters
world
World
coordinates
string | HexCoordinates
biome
string | undefined
Returns
void
setTileElevation()
setTileElevation(
world,coordinates,elevation):void
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:145
Mutates the elevation state for one tile entity in a Koota world.
Parameters
world
World
coordinates
string | HexCoordinates
elevation
number
Returns
void
setTileFields()
setTileFields(
world,coordinates,fields,options?):void
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:100
Mutates the numeric field channels of one tile entity in a Koota world,
keeping the aggregate HexTileState and the decomposed TileFields trait in
step. New values merge into the tile's existing fields; pass
{ replace: true } to replace the whole store. Every value must be a finite
number, and nothing changes when validation fails.
Parameters
world
World
coordinates
string | HexCoordinates
fields
Readonly<Record<string, number>>
options?
replace?
boolean
Returns
void
setTileTerrain()
setTileTerrain(
world,coordinates,terrain):void
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:50
Mutates the terrain state for one tile entity in a Koota world.
Parameters
world
World
coordinates
string | HexCoordinates
terrain
Returns
void
validateGameboardRules()
validateGameboardRules(
world,config?):GameboardRuleViolation[]
Defined in: packages/declarative-hex-worlds/src/systems/world-rules-system.ts:24
Validates the current Koota world by projecting it into a validation plan.
Parameters
world
World
config?
GameboardRuleConfig = {}
Returns
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
setTilePinned
Re-exports setTilePinned
snapshotGameboardSystemEvent
Re-exports snapshotGameboardSystemEvent
snapshotGameboardSystemEvents
Re-exports snapshotGameboardSystemEvents
