Exemplo n.º 1
0
            private static void Postfix(Action_WhiteoutGearRequirements __instance)
            {
                if (Dictionaries.NeedsPopulated())
                {
                    Dictionaries.PopulateDictionaries();
                }
                __instance.daysOfFoodRequired    = Settings.options.daysOfFoodRequired;
                __instance.numLitersPotableWater = Settings.options.litersWaterRequired;
                __instance.numLitersKerosene     = Settings.options.litersKeroseneRequired;
                __instance.sceneToStockpileItems = Dictionaries.locationNamesByWhiteoutLocation[Settings.options.stockpileLocation];

                //            Implementation.Log("Required location: " + __instance.sceneToStockpileItems);
                //            SetRequirement("GEAR_Softwood,GEAR_Hardwood", Settings.options.hardSoftWoodRequired, __instance);
                //            SetRequirement("GEAR_BearSkinBedRoll", Settings.options.bearSkillBedrollRequired, __instance, "Bearskin Bedroll");
                //            Implementation.Log("Required items now: " + __instance.requiredItemsList.value.Count);

                ClearItemRequirements(__instance);
                AddRequirement(Settings.options.item1, Settings.options.item1amount, __instance);
                AddRequirement(Settings.options.item2, Settings.options.item2amount, __instance);
                AddRequirement(Settings.options.item3, Settings.options.item3amount, __instance);
                AddRequirement(Settings.options.item4, Settings.options.item4amount, __instance);
                AddRequirement(Settings.options.item5, Settings.options.item5amount, __instance);
                AddRequirement(Settings.options.item6, Settings.options.item6amount, __instance);
                AddRequirement(Settings.options.item7, Settings.options.item7amount, __instance);
                AddRequirement(Settings.options.item8, Settings.options.item8amount, __instance);
                AddRequirement(Settings.options.item9, Settings.options.item9amount, __instance);
                AddRequirement(Settings.options.item10, Settings.options.item10amount, __instance);
                AddRequirement(Settings.options.item11, Settings.options.item11amount, __instance);
                AddRequirement(Settings.options.item12, Settings.options.item12amount, __instance);
            }
Exemplo n.º 2
0
 public override void OnApplicationStart()
 {
     base.OnApplicationStart();
     Debug.Log($"[{Info.Name}] Version {Info.Version} loaded!");
     Settings.OnLoad();
     Dictionaries.PopulateDictionaries();
 }