Status: Design
Created: 2024-12-04
Items can be stored in containers. Each container has per-item priority settings that control what goes where and in what order.
Each container maintains a list of allowed items with individual settings:
Example: Textile Bin
| Item | Priority | Max Amount |
|---|---|---|
| Cloth | High | 45 |
| Wool | Medium | Unlimited |
| Leather | Low | 20 |
Default Behavior: When a container is placed, it allows everything it CAN hold, at Medium priority, with unlimited amounts. Player then customizes.
Five priority levels for each item type:
| Level | Name | Behavior |
|---|---|---|
| 1 | Critical | Fill first, pull from lower |
| 2 | High | Fill before normal |
| 3 | Medium | Default |
| 4 | Low | Fill last |
| - | Not Allowed | Cannot store this item |
Higher priority containers "pull" items from lower priority ones.
Scenario:
- Crate A has 10 wood at Medium priority
- Player sets Crate B to High priority for wood
- System creates haul task: move wood from A to B
- Result: All wood moves to Crate B
With Max Amounts:
- Crate A has 10 wood at Medium
- Crate B set to High priority, max 15 wood
- Crate B already has 10 wood
- Only 5 wood moves (hits max of 15)
- Remaining 5 stays in Crate A
Containers only show items they CAN hold in their configuration UI.
Textile Bin shows: Cloth, Wool, Leather, Thread, etc.
Food Storage shows: Berries, Meat, Meals, etc.
Player cannot add "Wood" to a Textile Bin - it's not in the list.
Not Allowed means: remove from the allowed list. The item will not be stored here even if space exists.
The storage system generates hauling tasks:
New Item Created:
- Item spawns on ground (harvested berries, crafted goods)
- System finds appropriate container (allows item, has space, best priority)
- Creates "haul to storage" task
Priority Changed:
- Player increases priority on a container
- System checks if items elsewhere should move
- Creates redistribution tasks
Max Changed:
- Player lowers max amount
- Container now over limit
- System finds alternate storage
- Creates "move excess" tasks
Unlike some games, items are never "forbidden." All items on the ground are fair game for hauling.
Rationale: Simplifies the system. If you don't want something hauled, don't have storage that accepts it.
Different containers hold different item categories:
| Container | Holds | Notes |
|---|---|---|
| Stockpile Zone | Anything | Open-air, basic |
| Crate | General goods | Enclosed, protected |
| Food Storage | Edibles | May have preservation |
| Textile Bin | Cloth, leather | |
| Material Rack | Wood, stone, metal |
Phase 1: Stockpile zones only. Simple "allowed/not allowed" per item type. No priority levels.
Phase 2 (implemented, PR #244): Priority levels, max amounts, and higher-pulls-from-lower pull behavior. A box pulls an item from strictly-lower-priority storage (plus loose piles and harvestables), never laterally or from same/higher priority, so items flow monotonically up the ladder (cycle-free without reservations); clamped by the source's own min and the destination's max. Storage priority orders stocking within the opportunistic work tier, never preempting a need or an active work order. Includes the colony-memory "known source" affordance + unknown-source toast (no magic discovery: a colonist only fetches from a source the colony has seen).
Phase 3: Multiple container types. Preservation effects.