Exemplo n.º 1
0
        private void Awake()
        {
            context               = this;
            dropRange             = Config.Bind <float>("General", "DropRange", 5f, "The maximum range to pull dropped fuel");
            fireplaceRange        = Config.Bind <float>("General", "FireplaceRange", 5f, "The maximum range to pull fuel from containers for fireplaces");
            smelterOreRange       = Config.Bind <float>("General", "SmelterOreRange", 5f, "The maximum range to pull fuel from containers for smelters");
            smelterFuelRange      = Config.Bind <float>("General", "SmelterFuelRange", 5f, "The maximum range to pull ore from containers for smelters");
            fuelDisallowTypes     = Config.Bind <string>("General", "FuelDisallowTypes", "RoundLog,FineWood", "Types of item to disallow as fuel (i.e. anything that is consumed), comma-separated.");
            oreDisallowTypes      = Config.Bind <string>("General", "OreDisallowTypes", "RoundLog,FineWood", "Types of item to disallow as ore (i.e. anything that is transformed), comma-separated).");
            toggleString          = Config.Bind <string>("General", "ToggleString", "Auto Fuel: {0}", "Text to show on toggle. {0} is replaced with true/false");
            toggleKey             = Config.Bind <string>("General", "ToggleKey", "", "Key to toggle behaviour. Leave blank to disable the toggle key. Use https://docs.unity3d.com/Manual/ConventionalGameInput.html");
            refuelStandingTorches = Config.Bind <bool>("General", "RefuelStandingTorches", true, "Refuel standing torches");
            refuelWallTorches     = Config.Bind <bool>("General", "RefuelWallTorches", true, "Refuel wall torches");
            refuelFirePits        = Config.Bind <bool>("General", "RefuelFirePits", true, "Refuel fire pits");
            isOn       = Config.Bind <bool>("General", "IsOn", true, "Behaviour is currently on or not");
            modEnabled = Config.Bind <bool>("General", "Enabled", true, "Enable this mod");
            nexusID    = Config.Bind <int>("General", "NexusID", 159, "Nexus mod ID for updates");

            if (!modEnabled.Value)
            {
                return;
            }

            Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), null);
        }
Exemplo n.º 2
0
        private void Awake()
        {
            context           = this;
            dropRange         = Config.Bind <float>("General", "DropRange", 5f, "The maximum range to pull dropped fuel");
            containerRange    = Config.Bind <float>("General", "ContainerRange", 5f, "The maximum range to pull fuel from containers");
            fuelDisallowTypes = Config.Bind <string>("General", "FuelDisallowTypes", "RoundLog,FineWood", "Types of item to disallow as fuel (i.e. anything that is consumed), comma-separated.");
            oreDisallowTypes  = Config.Bind <string>("General", "OreDisallowTypes", "RoundLog,FineWood", "Types of item to disallow as ore (i.e. anything that is transformed), comma-separated).");
            toggleString      = Config.Bind <string>("General", "ToggleString", "Auto Fuel: {0}", "Text to show on toggle. {0} is replaced with true/false");
            toggleKey         = Config.Bind <string>("General", "ToggleKey", "", "Key to toggle behaviour. Leave blank to disable the toggle key.");
            isOn       = Config.Bind <bool>("General", "IsOn", true, "Behaviour is currently on or not");
            modEnabled = Config.Bind <bool>("General", "Enabled", true, "Enable this mod");
            nexusID    = Config.Bind <int>("General", "NexusID", 159, "Nexus mod ID for updates");

            if (!modEnabled.Value)
            {
                return;
            }

            Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), null);
        }