Commands#
| Command | Who | What |
|---|---|---|
/miningadmin |
command.miningadmin (group.admin) |
Opens the location editor |
miningstatus |
Server console | Prints every vein (ore, grade, units, reservation, recovery time) and every running contract |
From the /miningadmin menu you can move the foreman, the truck bay (it uses your heading) and the wash station to where you stand, add a vein where you stand with the ore types it can roll, remove the nearest vein within 8 m, and show labels over every placed point. A vein a crew has reserved cannot be removed. Every action checks the ACE again on the server.
Testing mode in the same menu is per admin. It skips progress bars. Orders the tester starts need 1 unit to cut, wash and deliver, pay only for that unit and give no XP. It ends when the tester leaves, and every toggle goes to the job log.
Client exports#
The resource registers no client exports.
Server exports#
| Export | Returns | What |
|---|---|---|
useServiceKit |
ox_inventory item export for mining_service_kit. Restores condition on the player's most worn pick. Called by ox_inventory, not by other scripts |
Events#
The resource fires no public events for other resources.
The rc-interactions flow fires local client events glitch-miningJob:rc:<name> from its EVENT nodes: tablet, handover, settle, settleforfeit, waypoint, board, status, shop, claims, sell, cancel and truck. The job only acts on them during a conversation it started, and each one runs the same server-checked action as the tablet. The variables the flow branches on are listed above Config.Interactions in config/main.lua.
For glitch-pauseMenu, the client answers glitch-pauseMenu:legend:request and sends glitch-pauseMenu:legend:name with the blip name.
State#
| Key | What it holds |
|---|---|
GlobalState.miningLocations |
The current foreman, truck bay, wash station and sites, including changes made with /miningadmin |
GlobalState.miningVeins |
Per vein id: r (units left), m (units when full), res (reserving contract id or false) and rec (recovery unix time or false) |
GlobalState['mining:rcProject'] |
The id of the foreman dialogue flow, or nil when the dialogue is off |
Player(src).state.miningTest |
Mirrors testing mode so the client can skip progress bars. The server keeps its own copy, so setting the bag changes nothing there |
Callbacks#
The resource's lib.callbacks and net events serve its own tablet, dialogue and work actions. They check the player, contract, distance and timing, are rate limited, and are not an API for other resources.