Browse docs
Related Shared Exports
This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.
Related Shared Exports
The mechanic script also depends heavily on sky_jobs_base and inherits its shared systems for creator placement, garages, storage, dispatch, and salary controls.
GetJobStorageCoords(jobName) — supplier delivery destinations
Server-only · Provided by sky_jobs_base. Returns all positioned storage points available to a job, including owned and explicitly shared workshop locations. Use this export in your supplier resource to find destinations for deliveries directly into workshop storage.
local storages = exports["sky_jobs_base"]:GetJobStorageCoords("mechanic")
for _, storage in ipairs(storages) do
print(storage.stationId, storage.coords.x, storage.coords.y, storage.coords.z)
end
Replace "mechanic" with the destination job name. The result is an array of storage entries, not a success / data result table:
| Field | Description |
|---|---|
stationId | Storage ID accepted by the shared AddStorageItem and AddStorageItems server exports; shared locations return the ID for the requested job |
creatorKey | Creator that owns the location |
pointUid | Identifier of the storage point |
label | Name of the workshop/location |
coords | Plain Lua table containing x, y, and z |
heading | Optional point heading |
Invalid or unknown jobs and jobs without storage return {}. Off-duty job aliases are resolved to their on-duty job. Results have no guaranteed order.
Call after the owning job resources have registered and loaded their creators. Query again when choosing a delivery destination: the export reads current creator data, so moved or deleted storage points are reflected in the next result. Stopped or unregistered creator resources are excluded. No direct database query is needed.
Send the returned points to the supplier client through your delivery script to display markers and an interaction prompt. This export only reads coordinates: it does not create an outside delivery pallet, deposit items, authorize a delivery, or pay the supplier. Your delivery script handles those actions and validates the destination, delivery, and player proximity on the server before adding items or awarding extra payment for an indoor delivery.