Log inGet started
World

Slag Saint

Branchmain
Branchesmain
Commit5e87281b36

README.md

Screens — the presentation slice

Every screen SLAG SAINT ever puts in front of a player, and the routing between them. BattleBoot attaches this to ui_root; nothing else has to know it is here.

Rules.state.modescreen
titleslag_title
introslag_intro — the place card + SKIP, over staging's opening
fight / staggerslag_hud
victoryslag_victory
defeatslag_defeat
any, over a live fightslag_pause
over anythingslag_howto
over everythingslag_subs — the spoken line

The trees live in ui/screens.module (the cards) and ui/hud.module (the fight instrumentation and the subtitle band); the palette, type ramp, motion and inline SVG live in ui/art.module. Every builder is a pure function of a small view table, so this component drives them and a probe can render any of them with invented numbers.

What it reads and what it owns

It reads Rules.state and the event bus. It writes two things, both its own:

  • Rules.state.ui — { paused, howto, subtitle }.
  • ui:action — { action }, one of start / retry / title / skip, raised when the player chooses. Whoever owns the consequence takes it; staging owns Rules.setMode. ui:pause — { paused } — is raised when the menu opens or closes over a live fight.

Unclaimed actions. A choice goes on the bus first. If nothing has answered it 0.55s later — because that slice is still being written — this component applies the smallest move that keeps the menus reachable, so no screen is ever a dead end. It stops doing that as soon as a Director exists.

Voice

Every vo event is queued and printed, whether or not the sound slice managed to generate the clip. Lines hold for their reading time; a new line cuts a long-read one short rather than stacking. All ten of the script's lines have been played through this path and read on screen.

The nameplate

@builtin::avatars.humanoid hangs a NameLabel child on every body, which floats {PlayerName} over the Emberward's head. This game has one character and she is not labelled, so a slow sweep deactivates every PlayerNameLabel in the world — deactivated, not despawned, and re-armed on a new body.

Handles

local S = entity.find("ui_root").component.get("Screens")
S:status()        -- what is on the glass, and what the HUD is reading
S:preview("victory")  -- pin one card for a capture; "" returns to routing
S:rebuild()       -- re-register every card from the current module source
S:sayScript()     -- speak all ten scripted lines, in order

preview and rebuild change nothing outside this component, so both are safe to use while the rest of the game is running.