Browse docs

Related Shared Exports

Reference for Related Shared Exports in mechanicjob.

All exports

This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.

The mechanic script also depends heavily on sky_jobs_base and inherits its shared systems for creator placement, garages, storage, dispatch, and salary controls.

See the Sky Jobs Base Server Exports page for shared integrations like dispatch creation, external garage registration, and salary pause/resume.

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.

server.lua
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:

FieldDescription
stationIdStorage ID accepted by the shared AddStorageItem and AddStorageItems server exports; shared locations return the ID for the requested job
creatorKeyCreator that owns the location
pointUidIdentifier of the storage point
labelName of the workshop/location
coordsPlain Lua table containing x, y, and z
headingOptional 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.