Appearance
twine / ModuleMetadata
Interface: ModuleMetadata โ
Defined in: twine/src/core/module.interface.ts:126
Metadata attached to a class by the Module decorator.
Properties โ
activeByDefault? โ
optionalactiveByDefault?:boolean
Defined in: twine/src/core/module.interface.ts:151
Initial flag value, set on load. Default false.
area? โ
optionalarea?:boolean
Defined in: twine/src/core/module.interface.ts:148
Makes this module an area: its tick and whole import subtree only run while its active flag is 1.
A dormant area costs one check per tick. Flip it with <name>/activate / <name>/deactivate or a trigger.
dimension? โ
optionaldimension?:Dimension
Defined in: twine/src/core/module.interface.ts:164
The dimension this area lives in. Its lifecycle, ticks and triggers all run in it.
Saves adding .in(...) to every handler, where one missed call silently checks the wrong dimension. Child areas inherit it.
env? โ
optionalenv?:BuildEnv[]
Defined in: twine/src/core/module.interface.ts:167
Build environments this module is included in, e.g. ["dev"]. Omit for all.
imports? โ
optionalimports?:ModuleRef[]
Defined in: twine/src/core/module.interface.ts:139
Child modules to include. Removing one leaves it out of the build.
Deduplicated by identity: a shared class is built once, but two Door(...) calls are two doors.
name โ
name:
string
Defined in: twine/src/core/module.interface.ts:131
Stable module id, used for its scores and its function folder. The folder sits under its parent's (floating/sword/) when exactly one non-root module imports it.
tickEvery? โ
optionaltickEvery?:number
Defined in: twine/src/core/module.interface.ts:173
Runs this module's onTick every tickEvery ticks instead of every tick. Still inside area gating.
tickPhase? โ
optionaltickPhase?:number
Defined in: twine/src/core/module.interface.ts:179
Tick offset (0..tickEvery-1) for the throttled onTick. Omit to have modules sharing a tickEvery spread across ticks automatically.
trigger? โ
optionaltrigger?:AreaTrigger
Defined in: twine/src/core/module.interface.ts:156
How this area switches itself on (see AreaTrigger). Omit to activate manually.