Betafite
One betafite crystal: an octahedral cluster of uranium glass on a chip of dark pegmatite, glowing from a core buried in its largest spire.
Betafite
One betafite crystal: an octahedral cluster of uranium glass on a chip of dark pegmatite, glowing from a core buried in its largest spire.
Put it on an empty entity and it builds the whole crystal as that entity's children — glass, core, matrix, the point light that pools its colour on the plate under it, and the drifting motes coming off it. Nothing that places a crystal has to know what one looks like.
local e = entity.spawn("crystal_3")
e.position = { Core.cellToWorld(4, 6) }
e.component.add("Betafite", { glow = 1, seed = 3 })
| Field | What it means |
|---|---|
glow | 0..1, how hard the crystal is working. 1 is one out on the plate exposing it; about 0.3 is one still in the lead case. |
seed | Any number. Turns and sizes this crystal differently from its neighbours, and the same seed always gives the same crystal. Left at 0 the crystal seeds itself off its entity's name, so component.add("Betafite", {}) on crystal_1 and on crystal_2 already gives two different crystals. |
shimmer | Whether it throws the motes. False costs no particles. |
crystal:currentGlow() reads what the crystal is actually showing after the
breath and the fixing dull, which is not the same as what glow asked for.
The crystal reads Core.state.phase and dulls itself during fixing: first
light is sweeping the plate, the exposure is over, and a crystal still burning
through it would say the wrong thing about the rules.
It owns its children and rebuilds them from the live world on every awake, so
a hot reload, a remove-and-re-add, and an edit↔play flip each leave exactly one
crystal standing.
Scoped to this part · feeds back into the world's score.