API ReferenceGE Extensionscareermodulesdelivery Delivery Cargo Cards
Builds card UI data for the cargo screen - grouping, sorting, filtering of cargo items by type, destination, container, and task.
Builds card UI data for the cargo screen - grouping, sorting, filtering of cargo items by type, destination, container, and task.
| Field | Value |
|---|
| Path | extensions/career/modules/delivery/cargoCards.lua |
| Global | career_modules_delivery_cargoCards |
| Type | Career Module (Delivery) |
| Function | Signature | Description |
|---|
resetFilterCounters | () | Resets filter tag counters for facility/player card counts |
getFilterSets | (cardsById) | Returns filter sets with locked info and card counts |
addFilterPlayerData | (filterSets, playerGroupSets, playerCargoContainers) | Adds noContainers flag to filters based on player storage |
getCardGroupSetsByKey | (cardsById, usePlayerCards, playerCargoContainers) | Builds group sets: by cargo type, destination, container, task |
addSortingValuesToGroups | (cardsById, groupSets) | Assigns sort values to groups based on their card contents |
getCardSortingSetsByKey | (cardsById) | Builds sorting sets: by cardId, rewardMoney, weight, distance, availability |
getConfirmButtonFromPlayerCards | (cardsById) | Returns item count of player cards with pending transient moves |
| Value | Label | Type | Description |
|---|
parcel | Parcel Delivery | cargo | Small and large parcels |
vehicle | Car Jockey | cargo | Vehicle delivery |
trailer | Trailer Delivery | cargo | Trailer towing |
material | Materials Delivery | cargo | Fluids and dry bulk |
all | All Cargo | cargo | Combined view |
loaner | Loaner Vehicles | other | Loaned delivery vehicles |
- ungrouped - No grouping
- cargoType - By parcel, fluid, dryBulk, vehicle, trailer
- destinations - By destination facility (sorted by distance)
- containers - By player cargo container (player view only)
- tasklist - By task label (player view only)
- loaner - By loaner vehicle/trailer type
local cargoCards = career_modules_delivery_cargoCards
cargoCards.resetFilterCounters()
local groupSets = cargoCards.getCardGroupSetsByKey(cardsById, false)
local sortSets = cargoCards.getCardSortingSetsByKey(cardsById)
cargoCards.addSortingValuesToGroups(cardsById, groupSets)
career_modules_delivery_cargoScreen - Main cargo screen
career_modules_delivery_parcelManager - Cargo data
| Export | Description |
|---|
M.addFilterPlayerData | Value: addFilterPlayerData |
M.addSortingValuesToGroups | Value: addSortingValuesToGroups |
M.getCardGroupSetsByKey | Value: getCardGroupSetsByKey |
M.getCardSortingSetsByKey | Value: getCardSortingSetsByKey |
M.getConfirmButtonFromPlayerCards | Value: getConfirmButtonFromPlayerCards |
M.getFilterSets | Value: getFilterSets |
M.resetFilterCounters | Value: resetFilterCounters |