Studios
Govhouse-3.jpg

Commands & Exports

SoonGovQbox
PAGE 06 OF 06  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

Command Access Description
/govadmin command.govadmin (restricted to group.admin) Opens the State Finances admin panel.

Server exports#

Export Description
GetLever(id) Current value of a lever.
GetLeverDef(id) A copy of the lever definition.
GetMember(src) The parliament member record for a player.
Route(kind) The government (federal or nsw in the default config) a ledger kind is booked to.
SetLever(id, value, note) Sets a lever as the server. Returns ok, message.
GetWebConfig() Website link status, server name and departments. glitch-bridge reads it on connect.
ArmouryLog(row) Writes a row to the armoury log.
cadTags(src) The CAD tags this player sees and applies.
cadTagAllowed(src, tag) Returns whether the player may use a tag.
HasCert(citizenid, cert) Whether a character holds a qualification.
GetCerts(citizenid) All qualifications a character holds.
GetPoliceReference() The police curriculum loaded from server/source-police.json.

Client exports#

Export Description
OpenStateFinances(gov) Opens the State Finances terminal for a government.

Shared state#

Other resources can read these from GlobalState:

Key Contents
glitch-gov:levers { [id] = value } for every lever.
glitch-gov:routes Cash flow rules.
glitch-gov:meta Industry and paycheck lever maps, bankruptFloor, bankruptPay and custodyCostPerMonth.
glitch-gov:locations The places set in /govadmin.
glitch-gov:armoury The effective armoury catalogue, read by qbx_police.
glitch-gov:workshop The effective workshop settings, read by qbx_police.

Events#

Event Side Description
glitch-gov:state:dirty Client Sent to open terminals when lever values or members change.
glitch-gov:state:ready Server Raised when the state is loaded. Other parts of the resource listen to it.
glitch-gov:admin:open Client Opens the admin panel after /govadmin passes its checks.
glitch-gov:remote:req Server only Used by the website link. Clients cannot reach it.

Callbacks#

The terminal uses glitch-gov:fin:state, glitch-gov:fin:set, glitch-gov:fin:save, glitch-gov:fin:members and glitch-gov:fin:portfolio. The admin panel uses callbacks under glitch-gov:admin: for data, levers, jobs, members, locations, routes, settings, accounts, the armoury and the workshop. They are internal to the resource and check the caller's rank or permission on the server.