scTowerFloor_pillar( ) → void
scTowerFloor_stone( ) → void
scTowerFloor_cistern( ) → void
scTowerFloor_granary( ) → void
scTowerFloor_workshop( ) → void
scTowerFloor_dormitory( ) → void
scTowerFloor_shrine( ) → void
scTowerFloor_kiln( ) → void
scTowerFloor_timber( ) → void
scTowerFloor_timberH( ) → void
scTowerFloor_timberPale( ) → void
scTowerFloor_deck( ) → void
scTowerFloor_rope( ) → void
scTowerFloor_lamp( ) → void
scTowerFloor_shrinelight( ) → void
scTowerFloor_kilnglow( ) → void
scTowerFloor_forge( ) → void
scTowerFloor_beacon( ) → void
scTowerFloor_water( ) → void
scTowerFloor_lead( ) → void
scTowerFloor_iron( ) → void
scTowerFloor_dark( ) → void
scTowerFloor_sack( ) → void
MAT(name: string) → any
| arg | type | description |
|---|
| name | string | |
MESH(name: string) → any
| arg | type | description |
|---|
| name | string | |
safeDespawn(e: any) → void
qy(a: number) → void
| arg | type | description |
|---|
| a | number | |
qz(a: number) → void
| arg | type | description |
|---|
| a | number | |
qmul(a: { number }, b: { number }) → void
| arg | type | description |
|---|
| a | { number } | |
| b | { number } | |
at(theta: number, r: number, y: number) → void
A point on the tower's skin: azimuth, radius, height.
| arg | type | description |
|---|
| theta | number | |
| r | number | |
| y | number | |
piece(parent: any, name: string, meshName: string, matName: string, pos: { number }, scale: { number }, rot: { number }?) → any
One piece of the tower. `rot` is optional; a piece with none is axis-aligned.
| arg | type | description |
|---|
| parent | any | |
| name | string | |
| meshName | string | |
| matName | string | |
| pos | { number } | |
| scale | { number } | |
| rot | { number }? | |
skin(parent: any, name: string, meshName: string, matName: string, theta: number, r: number, y: number, scale: { number }, tilt: number?) → any
A radial piece: sits on the skin at `theta`, its local +X pointing outward.
Scale reads (depth outward, height, width along the wall).
| arg | type | description |
|---|
| parent | any | |
| name | string | |
| meshName | string | |
| matName | string | |
| theta | number | |
| r | number | |
| y | number | |
| scale | { number } | |
| tilt | number? | |
killAll(list: { any }) → void
| arg | type | description |
|---|
| list | { any } | |
buildPillar( ) → void
THE PILLAR — the one stone the whole run stands on.
archAngles(count: number, spread: number) → void
THE FLOORS
| arg | type | description |
|---|
| count | number | |
| spread | number | |
buildCistern(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildGranary(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildWorkshop(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildDormitory(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildShrine(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildKiln(p: any, i: number, bottom: number, top: number, parts: { any }, lamps: { any }) → void
| arg | type | description |
|---|
| p | any | |
| i | number | |
| bottom | number | |
| top | number | |
| parts | { any } | |
| lamps | { any } | |
buildFloor(f: any) → void
Raise (or re-raise) one floor's geometry.
floorIsLit(index: number, state: string) → boolean
A floor whose ceiling is under the tide is not lit from inside any more.
| arg | type | description |
|---|
| index | number | |
| state | string | |
applyProgress(rec: any, progress: number, finished: boolean, lit: boolean) → void
A floor under construction is a part-height drum with nothing on it yet:
the stack visibly grows a course at a time instead of blinking into being.
`finished` decides whether the floor's fittings are on it at all; `lit`
decides whether its fires are burning. They come apart when a floor goes
under: the shaders already stop its windows emitting, but a point light is
not a shader and would go on lighting the sea from inside a drowned kiln.
| arg | type | description |
|---|
| rec | any | |
| progress | number | |
| finished | boolean | |
| lit | boolean | |
collapseFloor(rec: any) → void
A scuttled floor is not a floor any more: everything on it goes, and what is
left is a broken stub the sea now breaks over.
hoistLoadY(base: number) → number
THE CAGE — timber scaffolding and the rope hoist, lashed outside
Where the stone on the hoist hangs: clear of the water it is being lifted
out of, and never below the deck it is being landed on.
| arg | type | description |
|---|
| base | number | |
buildScaffold(topFloor: number, deckFloor: number) → void
| arg | type | description |
|---|
| topFloor | number | |
| deckFloor | number | |
buildCrown( ) → void
THE CROWN — only when the eighteenth course stands
pushWaterline(force: boolean) → void
the tide, pushed into every shader that draws it
| arg | type | description |
|---|
| force | boolean | |
topStanding( ) → number
the slice
the highest course the cage has to reach, and the highest one a crew could
actually stand on: the cage climbs with what is being built, the worksite
deck sits on what is finished.
rideHoist( ) → void
The stone on the hoist follows the waterline every frame. Without this it
keeps the height the sea happened to be at when the cage was last rebuilt,
and a rising tide swallows it: a stone that reads as a dark slab adrift on
the open water beside the tower.
refreshFloor(f: any) → void
onFloorEvent(_f: any) → void
⚠ THE EVENTS MARK THE WORK; THE FRAME DOES IT.
Raising a course spawns a drum, its fittings and a whole rebuilt cage —
tens of entities. `floorPlaced` is emitted synchronously inside the click
that ordered the course, so doing that build here puts all of it on the UI
callback's own stack, and past a thousand milliseconds the watchdog halts
the callback and throws a script error over the game.
`M.update` already reconciles the drawn tower against `Core.state.floors`
every frame and rebuilds whatever disagrees, so nothing here has to build
anything: it only has to make sure the next frame looks. That is also what
keeps the tower right when the sim changes a floor without an event.
update(dt: number) → void
| arg | type | description |
|---|
| dt | number | |