[SOLVED] Stop Haulers from Targetting a Building_Storage Instance.

Started by Famous Shoes, March 01, 2015, 06:42:18 PM

Previous topic - Next topic

Famous Shoes

Can one temporarily stop haulers from choosing a building_storage instance that could otherwise accept what they're hauling? Preferably without modifying the instance's player-visible filter setting. I tried returning no slot cells in calls to AllSlotCells, but that triggers a divide by zero error in RW code (with rather spectacular and psychedelic results.)

Famous Shoes

What I've found to work, though it's a bit inelegant, is to inject a SpecialThingFilterDef with a custom worker that matches everything. When you want haulers to see the instance, SetAllow to true on that filter, when you want them to ignore the instance, SetAllow to false on that same filter instance. This doesn't alter the list of allowed categories that users see in the UI (and it's doesn't go psychedelic on you either.)