Events¶
The framework registers four custom Lua events through LuaEventManager.AddEvent, so you
can react to builds, disassembly, and room assignment without patching framework
internals. Subscribe with the global Events table, exactly like a vanilla event.
See also
Task-oriented guide with examples: How-to → React to framework events.
Subscribing¶
Events.OnRCSFStructureBuilt.Add(function(info)
-- info.structureId, info.plan, info.character, info.placed
end)
Each event delivers one descriptor table (so the payload can grow without breaking a
positional signature). The shapes are also declared as @class types in Contracts.lua.
The events¶
Event |
Payload (one table arg) |
|---|---|
|
|
|
|
|
|
|
|
RCSF.Events¶
The module table also exposes the names and the fire* helpers the framework calls
internally:
RCSF.Events.NAMES→string[]of the four event names.fireStructureBuilt(structureId, plan, character, placed)fireStructureDisassembled(structureId, character, removed)fireRoomAssigned(assignment)/fireRoomUnassigned(assignment)
You normally don’t call these - the framework does. They’re documented so you know exactly when and with what each event fires.