PickUpAndHaul
PickUpAndHaul copied to clipboard
IHoldMultipleThings suggestions
To keep things centralized, some suggestions for interfaces here:
class StorageOption {
IEnumerable<ThingDefCount> Storage { get; set; }
int Priority { get; set; }
}
...
IEnumerable<StorageOption> GetStorageOptions(
IEnumerable<Thing> thingsToConsiderForHauling,
IntVec3 storeCell,
Map map)
...
IEnumerable<StorageOption> GetStorageOptions(
IEnumerable<ThingDef> thingsToConsiderForHauling,
IntVec3 storeCell,
Map map)
...
Basically you ask "I'd like to store X & Y & Z - what options for storage are valid for you?". The return result would be alternative options for storage. Even extended to allow priorities on each option. Selection of any option from the return would then be up to P&H (with "just the first" or "highest priority" being as valid an option as any other - if storage mods don't like this, they are free to only return what they prefer).
Such a signature should allow storage(s) which follow a pattern of
- A or B or C
- A and B
- "Anything"
- '15 A and 3.5657 B' or '3.14159 X and 360 Y'
That's a good suggestion, thanks for the help on the design. The extension to allow priorities on each option would come in handy for Stockpile Ranking
Correction - Needs to be
class StorageOption {
IEnumerable<ThingDefCount> Storage { get; set; }
int Priority { get; set; }
}