public static void Postfix(ThingFilter __instance, StorageSettingsPreset preset)
 {
     if (preset == StorageSettingsPreset.DefaultStockpile)
     {
         __instance.SetAllow(ST_ThingCategoryDefOf.SurvivalTools, true);
     }
 }
Beispiel #2
0
 public static void Postfix(ref ThingFilter __instance, StorageSettingsPreset preset)
 {
     if (preset == StorageSettingsPreset.DefaultStockpile)
     {
         __instance.SetAllow(ThingCategoryDef.Named("RoadEquipment"), allow: true);
     }
 }
Beispiel #3
0
 public Zone_Stockpile(StorageSettingsPreset preset, ZoneManager zoneManager)
     : base(preset.PresetName(), zoneManager)
 {
     settings = new StorageSettings(this);
     settings.SetFromPreset(preset);
     slotGroup = new SlotGroup(this);
 }
Beispiel #4
0
 public static void Postfix(StorageSettingsPreset preset, ThingFilter __instance)
 {
     if (null == CountCompletedDefOf.CountCompleted)
     {
         return;
     }
     __instance.SetAllow(CountCompletedDefOf.CountCompleted, preset != StorageSettingsPreset.DumpingStockpile);
 }
 public static string PresetName(this StorageSettingsPreset preset)
 {
     return(preset switch
     {
         StorageSettingsPreset.DumpingStockpile => "DumpingStockpile".Translate(),
         StorageSettingsPreset.DefaultStockpile => "Stockpile".Translate(),
         _ => "Zone".Translate(),
     });
Beispiel #6
0
 public static string PresetName(this StorageSettingsPreset preset)
 {
     if (preset == StorageSettingsPreset.DumpingStockpile)
     {
         return("DumpingStockpile".Translate());
     }
     if (preset == StorageSettingsPreset.DefaultStockpile)
     {
         return("Stockpile".Translate());
     }
     return("Zone".Translate());
 }
Beispiel #7
0
        public static string PresetName(this StorageSettingsPreset preset)
        {
            switch (preset)
            {
            case StorageSettingsPreset.DumpingStockpile:
                return("DumpingStockpile".Translate());

            case StorageSettingsPreset.DefaultStockpile:
                return("Stockpile".Translate());

            default:
                return("Zone".Translate());
            }
        }
Beispiel #8
0
        public static string PresetName(this StorageSettingsPreset preset)
        {
            string result;

            if (preset == StorageSettingsPreset.DumpingStockpile)
            {
                result = "DumpingStockpile".Translate();
            }
            else if (preset == StorageSettingsPreset.DefaultStockpile)
            {
                result = "Stockpile".Translate();
            }
            else
            {
                result = "Zone".Translate();
            }
            return(result);
        }
 public void SetFromPreset(StorageSettingsPreset preset)
 {
     if (preset == StorageSettingsPreset.DefaultStockpile)
     {
         this.SetAllow(ThingCategoryDefOf.Foods, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Manufactured, true, null, null);
         this.SetAllow(ThingCategoryDefOf.ResourcesRaw, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Items, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Buildings, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Weapons, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Apparel, true, null, null);
         this.SetAllow(ThingCategoryDefOf.BodyParts, true, null, null);
     }
     if (preset == StorageSettingsPreset.DumpingStockpile)
     {
         this.SetAllow(ThingCategoryDefOf.Corpses, true, null, null);
         this.SetAllow(ThingCategoryDefOf.Chunks, true, null, null);
     }
     if (this.settingsChangedCallback != null)
     {
         this.settingsChangedCallback();
     }
 }
Beispiel #10
0
 public void SetFromPreset(StorageSettingsPreset preset)
 {
     if (preset == StorageSettingsPreset.DefaultStockpile)
     {
         SetAllow(ThingCategoryDefOf.Foods, allow: true);
         SetAllow(ThingCategoryDefOf.Manufactured, allow: true);
         SetAllow(ThingCategoryDefOf.ResourcesRaw, allow: true);
         SetAllow(ThingCategoryDefOf.Items, allow: true);
         SetAllow(ThingCategoryDefOf.Buildings, allow: true);
         SetAllow(ThingCategoryDefOf.Weapons, allow: true);
         SetAllow(ThingCategoryDefOf.Apparel, allow: true);
         SetAllow(ThingCategoryDefOf.BodyParts, allow: true);
     }
     if (preset == StorageSettingsPreset.DumpingStockpile)
     {
         SetAllow(ThingCategoryDefOf.Corpses, allow: true);
         SetAllow(ThingCategoryDefOf.Chunks, allow: true);
     }
     if (settingsChangedCallback != null)
     {
         settingsChangedCallback();
     }
     displayRootCategoryInt = null;
 }
 public void SetFromPreset(StorageSettingsPreset preset)
 {
     this.filter.SetFromPreset(preset);
     this.TryNotifyChanged();
 }