Commands#
| Command | Who | What |
|---|---|---|
/heisteditor |
command.heisteditor |
Opens the editor |
/heistreset [heist] |
Config.Restricted |
Ends every running heist as failed and clears cooldowns, or only the named heist |
The editor command name and the permission group come from Config.Command and Config.Restricted.
Server exports#
| Export signature | What it does |
|---|---|
RegisterHeist(def) |
Registers a heist definition. Returns true, or false and a reason. |
GetDefinition(id) |
A copy of the definition in play, or nil |
GetPoint(heistId, siteId, name) |
A point of a site |
GetSites(heistId) |
The sites of a heist |
GetRun(heistId, siteId) |
The active run at a site, if any |
PayHeld(ticket, quiet) |
Pays a reward held by run.hold |
FailHeld(ticket, opts) |
Fails a held reward |
ContractClosed(locationId) |
Used by glitch-criminaltablet: 'closed' while the site is on cooldown |
StartProblem(locationId, crewId, isHot, sources) |
Used by glitch-criminaltablet: the reason a contract cannot start yet, or nil |
JobBlocks() |
Used by glitch-criminaltablet: returns an empty table |
Client exports#
| Export signature | What it does |
|---|---|
GetPoint(heistId, siteId, name) |
A point of a site |
GetSites(heistId) |
The sites of a heist |
RunState(heistId, siteId) |
The published run state for a site |
RegisterPreset(name, fn) |
Adds a progress preset a definition can name |
Server events#
Each handler gets one table with heist, site, key and src or result.
| Event | When |
|---|---|
glitch-heistEditor:ready |
The engine has started and heist resources should register |
glitch-heistEditor:runStarted |
A run starts |
glitch-heistEditor:runJoined |
A player joins a run |
glitch-heistEditor:runEnded |
A run ends, with result |
Callbacks#
The engine and the editor use ghe:defs, ghe:stepStart, ghe:stepInput, ghe:stepDone and glitch-heistEditor:editor. Other resources should not call them.
Stuck on a step?Ask in the Discord →