HazardField
Everything in the Aurelian's system that acts on the ship without being a destination. Attach it to a mount entity (the scene puts it on `HazardRoot`) and it builds and drives the whole void.
HazardField
Everything in the Aurelian's system that acts on the ship without being a
destination. Attach it to a mount entity (the scene puts it on HazardRoot)
and it builds and drives the whole void.
Four modules under /source/hazards, wired here and nowhere else:
| Module | What it is |
|---|---|
hazards.shoals | Radiation shoals — visible clumped volumes on the longest crossings, biting hardest at the core |
hazards.debris | Wreck drifts of tumbling rock and dead plating, with real radii that really hit you |
hazards.flares | The dying star's timed flares: hull and charge in the open, neither in the lee of a site |
hazards.fauna | Drift lanterns — schools that graze the shoals, bolt from a fast ship, close on a slow one, and feed the sails if you hold still |
Everything is placed against Drift.siteList() rather than hardcoded
coordinates, so when the site table moves a destination, the danger between
them moves with it. Nothing here reads or writes another slice's files: the
ship comes from Drift.shipPosition(), harm goes out through
Drift.damage(), and the HUD reads the state keys the modules publish.
Fields
| Field | Default | Meaning |
|---|---|---|
damagePerSecond | 8.5 | Shoal erosion at the core of a shoal |
flareDamagePerSecond | 2.6 | What a flare costs per second caught in the open |
flareChargePerSecond | 3.0 | What the sails take from that same flare |
debrisDamage | 4.0 | The floor of an impact, before speed and chunk size |
faunaChargePerSecond | 1.9 | What the lanterns give you for holding still among them |
What it publishes on Drift.state
Drift.state.hazard = { inShoal = <name|nil>, depth = 0..1, dps = n, count = n }
Drift.state.debris = { near = n, nearest = <distance|nil>, lastHit = <seconds|nil> }
Drift.state.flare = { phase = "calm"|"warning"|"active", t, timeToNext, sheltered, intensity }
Drift.state.fauna = { near = n, nearest = <distance|nil>, mood = "calm"|"curious"|"spooked", feeding }
It also emits flare(phase) and debrisHit(amount, driftName) on the bus,
and speaks through Drift.notice.
Iterating on it
Editing any hazard module hot-reloads it into a fresh table that has lost
its mount point, and nothing re-runs awake() for that. update() watches
each module's running() and re-arms it, and each module sweeps its own
name prefix off the mount at start, so a VFS write rebuilds the void in
place instead of stacking a second copy on the first.
Scoped to this part · feeds back into the world's score.