API ReferenceGE Extensionscareermodulesdelivery Delivery Progress
Tracks delivery statistics, manages the drop-off flow (gathering data, confirming, applying rewards), and controls facility unlock/visibility.
Tracks delivery statistics, manages the drop-off flow (gathering data, confirming, applying rewards), and controls facility unlock/visibility.
| Field | Value |
|---|
| Path | extensions/career/modules/delivery/progress.lua |
| Global | career_modules_delivery_progress |
| Type | Career Module (Delivery) |
| Function | Signature | Description |
|---|
setProgress | (data) | Loads progress data from save |
getProgress | () | Returns current progress data |
onCargoDelivered | (cargoItems) | Updates delivery stats for parcels/materials, tracks per-facility |
onVehicleTasksFinished | (offers) | Updates delivery stats for vehicle/trailer deliveries |
aggregateBefore | () | Snapshots branch levels before reward application |
aggregateAfter | () | Compares post-reward levels and returns unlock changes |
requestDropOffData | (facId, psPath) | Gathers all drop-off-able cargo at a location (async) |
openDropOffScreenGatheringComplete | () | Finishes gathering; shows UI or auto-confirms |
confirmDropOffData | (confirmedDropOffs, facId, psPath) | Commits drop-offs, applies rewards, shows results |
confirmDropOffCheckComplete | () | Checks if all async operations are done, then finalizes |
unloadCargoPopupClosed | () | Handles post-delivery popups and tutorials |
unloadMaterialsManualStart | (cargoId, destination) | Deprecated stub |
isFacilityUnlocked | (facId) | Returns unlock status and reason for a facility |
isFacilityVisible | (facId, isCargoDeliveryTutorialActive) | Returns visibility based on conditions |
getFacilityCountForCargoCount | (direction) | Counts facilities with delivered cargo in a direction |
getMoneyMultiplerForSkill | (skill, tier) | Returns reward multiplier via branch system |
activateSound | (soundLabel, active) | Plays/stops reward animation sounds (money, progressBar) |
| Hook | Description |
|---|
onBranchTierReached | Unlocks vehicleDelivery branch at delivery tier > 1 |
requestDropOffData(facId, psPath)
├─ getNearbyVehicleCargoContainers (async)
│ └─ Gather deliverable cargo + vehicle tasks
├─ openDropOffScreenGatheringComplete()
│ ├─ If materials: show UI for custom amounts
│ └─ If no materials: auto-confirm
└─ confirmDropOffData(confirmedDropOffs)
├─ Move cargo to destination
├─ Calculate rewards (with breakdowns)
├─ Finish vehicle tasks (async part conditions)
├─ Update container weights
└─ confirmDropOffCheckComplete()
├─ Sum all rewards
├─ addAttributes() with reward sum
├─ Trigger UI: SetDeliveryDropOffRewardResult
└─ Save if autosave enabled
-- Request drop-off at a parking spot
career_modules_delivery_progress.requestDropOffData("belasco_auto", "ps_dropoff_01")
-- Check facility unlock
local unlocked, reason = career_modules_delivery_progress.isFacilityUnlocked("jerry_riggs")
career_modules_delivery_parcelManager - Cargo data and rewards
career_modules_delivery_vehicleTasks - Vehicle task completion
career_modules_delivery_general - Delivery mode state
career_modules_playerAttributes - Reward application
| Function | Description |
|---|
M.aggregateAfter() | No description available |
M.aggregateBefore() | No description available |
M.confirmDropOffCheckComplete() | No description available |
M.confirmDropOffData(confirmedDropOffs, facId, psPath) | No description available |
M.getFacilityCountForCargoCount(direction) | No description available |
M.getMoneyMultiplerForSkill(skill, tier) | No description available |
M.getProgress() | No description available |
M.isFacilityUnlocked(facId) | No description available |
M.isFacilityVisible(facId, isCargoDeliveryTutorialActive) | No description available |
M.onCargoDelivered(cargoItems) | No description available |
M.onVehicleTasksFinished(offers) | No description available |
M.openDropOffScreenGatheringComplete() | still waiting for vehicles to be finished |
M.requestDropOffData(facId, psPath) | No description available |
M.setProgress(data) | No description available |
M.unloadCargoPopupClosed() | No description available |
M.unloadMaterialsManualStart(cargoId, destination) | No description available |
| Export | Description |
|---|
M.activateSound | Value: activateSound |
M.onBranchTierReached | Value: onBranchTierReached |