Skip to content

Tagging And Warehouse Flow

After scanning, the item must move through physical handling steps:

scanner
-> tagging bench
-> warehouse zone

This keeps the game from becoming a pure terminal UI. The player's decisions are expressed spatially by where they carry and place the item.

Tagging Bench

AAndromedaTaggingBench inherits from AAndromedaItemStation.

It customizes acceptance:

return Super::CanAcceptItem(CandidateItem) && CandidateItem->HasBeenScanned();

That means an unscanned item cannot be placed on the tagging bench. This enforces the loop:

scan first
package second
store/process third

The tagging bench can be used only if:

there is a placed item
the item has been scanned
the item is not already packaged

When used, it calls:

PlacedItem->AssignRequiredPackage();

For now, success/failure is logged and shown through an on-screen debug message. The gameplay rule is real even though the feedback is still lightweight.

Package Assignment

Package assignment does not spawn a package actor yet. It sets item state:

bPackageAssigned = true;

The Data Asset defines what package is required:

category: Normal / Quarantine / Freezer / Radiation
minimum size: XS / S / M / L / XL / XXL
handling note

Later, this can grow into actual package selection, package mesh spawning, labels, printed tags, and warehouse stacking. The current slice only needs the state transition.

Warehouse Zones

AAndromedaWarehouseZone also inherits from AAndromedaItemStation.

It accepts only packaged items:

return Super::CanAcceptItem(CandidateItem) && CandidateItem->IsPackageAssigned();

It cannot be "used" after an item is placed:

bool AAndromedaWarehouseZone::CanUsePlacedItem(APawn* InteractingPawn) const
{
    return false;
}

Instead, placement itself finalizes the action.

Processing Action

Each warehouse zone has an editor-configured processing action:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Andromeda|Warehouse")
EAndromedaSalvageProcessingAction ProcessingAction;

For example:

BP_SellWarehouseZone        -> ProcessingAction = Sell
BP_QuarantineWarehouseZone  -> ProcessingAction = Quarantine

When an item is placed, the zone calls:

Item->ProcessSalvage(ProcessingAction);

This means the zone decides which action is attempted. The item data decides whether that action is allowed and what result it produces.

Result UI

Warehouse zones create WBP_ShiftResult after processing:

ShiftResultWidget->SetProcessingResult(ProcessingResult);
ShiftResultWidget->AddToViewport();

They switch input to UI-only and suppress world prompts, just like the scanner UI.

The result widget's close button restores game input.

Why Credits Happen Here

Credits are awarded only when the item reaches the correct final physical zone. This is important for the design:

Scanning reveals evidence.
Tagging prepares the item.
Warehouse placement commits the decision.

That gives the player room to inspect, reconsider, and physically move the item before final consequence.