void SmartStockpileDesignatorWorker(SyncWorker sync, ref Designator_ZoneAddStockpile obj) { if (sync.isWriting) { sync.Write(new List <ThingDef>((IEnumerable <ThingDef>)allowedThingsGetter.Invoke(obj))); sync.Write(specialThingFilterDefLabel(obj)); sync.Write(priorityLabel(obj)); sync.Write(contentsLabel(obj)); } else { var allowedThings = sync.Read <List <ThingDef> >(); var specialThingFilterDef = sync.Read <SpecialThingFilterDef>(); var priority = sync.Read <StoragePriority>(); var label = sync.Read <string>(); obj = (Designator_ZoneAddStockpile)Activator.CreateInstance(designatorType, allowedThings, specialThingFilterDef, priority, label); } }
public BufferStockpileDesignator(Designator_ZoneAddStockpile des) => stockpileDesignator = des;
public static void Override_zoneTypeToPlace(Designator_ZoneAddStockpile __instance, ref Type ___zoneTypeToPlace)//, ref Type ___zoneTypeToPlace) { ___zoneTypeToPlace = typeof(Lazy_Stockpile); }