-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-.
diff --git a/docs/README.md b/docs/README.md
index 198fb56..c9d40f3 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,32 +1,14 @@
-Structuring your Thunderstore package
-https://github.com/ebkr/r2modmanPlus/wiki/Structuring-your-Thunderstore-package
+# Eternal Fire
-Manifest V1 (Thunderstore) + author field
-https://github.com/ebkr/r2modmanPlus/wiki/Installing-mods-locally#manifest-v1-thunderstore--author-field
+## Summary
-
-Move me to [gitrepo]/doc
-
-# Summary
-This is a port of ModTemplate to JVL
-PR: https://github.com/Atokal/AtosArrows/pull/3
-Assets belong to Atokal and are used with permission because of:
-- Asset use permission You are allowed to use the assets in this file without permission or crediting me. https://www.nexusmods.com/valheim/mods/969 (June 12, 2021)
-
-Original Mod: https://www.nexusmods.com/valheim/mods/969
-
-**Code is a complete rewrite.**
+Keeps fires burning.
## License
-Original source has no license.
-JVL Version is released under: **GNU Affero General Public License v3.0**
-
-## ModTemplate
-Adds several new arrows into the game. Expands arrow progression for fighting tougher enemies!
+**GNU Affero General Public License v3.0**
-New Items:
-- Stone Arrow
-- Blunted Arrow
+## Details
+Keeps fires lit and burning without needing to fuel them.
### Dependencies
- BepInExPack Valheim
@@ -37,17 +19,33 @@ New Items:
1. Extract the archive into <Steam Location>\steamapps\common\Valheim\BepInEx\plugins
### Configuration
-- No need to configure.
+
+| Config | Category | Data Type | Desc |
+| --- | --- | --- | --- |
+| Campfire | Fireplaces | bool | Enable Campfire |
+| Bonfire | Fireplaces | bool | Enable Bonfire |
+| Sconce | Fireplaces | bool | Enable Sconce |
+| StandingWoodTorch | Fireplaces | bool | Enable Standing Wood Torch |
+| StandingIronTorch | Fireplaces | bool | Enable Standing Iron Torch |
+| StandingGreenBurningIronTorch | Fireplaces | bool | Enable Standing Green Burning Iron Torch |
+| StandingBlueBurningIronTorch | Fireplaces | bool | Enable Standing Blue Burning Iron Torch |
+| StandingBrazier | Fireplaces | bool | Enable Standing Brazier |
+| HangingBrazier | Fireplaces | bool | Enable Hanging Brazier |
+| Hearth | Fireplaces | bool | Enable Hearth |
+| HotTub | Fireplaces | bool | Enable Hot Tub |
+| JackOTurnip | Fireplaces | bool | Enable Jack O' Turnip |
+| StoneOven | Cooking Stations | bool | Enable Stone Oven |
+| Smelter | Smelters | bool | Enable Smelter |
+| BlastFurnace | Smelters | bool | Enable Blast Furnace |
+| EitrRefinery | Smelters | bool | Enable Eitr Refinery |
+| CustomPrefabs | Custom | string | A comma-separated list of prefab names |
### Issues/Questions/Bugs
- Use the repo issues tab above.
### Support Me @ https://www.buymeacoffee.com/digitalroot
-
-### Thanks to
-- Atokal
-
+
-Digitalroot can be found in the Odin Plus Team Discord
-
+Digitalroot can be found in the Valhalla Legends Discord
+
diff --git a/src/Digitalroot.Valheim.EternalFire.sln b/src/Digitalroot.Valheim.EternalFire.sln
new file mode 100644
index 0000000..8f0834f
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire.sln
@@ -0,0 +1,52 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33122.133
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Digitalroot.Valheim.EternalFire", "Digitalroot.Valheim.EternalFire\Digitalroot.Valheim.EternalFire.csproj", "{73CF24C1-0509-43B3-A72B-90720901BF76}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{53F5499F-33B0-438A-B383-08CA50F1537E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "worklfows", "worklfows", "{1A2C7529-FAA6-4705-9AD2-363DD17D6268}"
+ ProjectSection(SolutionItems) = preProject
+ ..\.github\workflows\discord.yml = ..\.github\workflows\discord.yml
+ ..\.github\workflows\nuget.autoupdate.yml = ..\.github\workflows\nuget.autoupdate.yml
+ ..\.github\workflows\release.yml = ..\.github\workflows\release.yml
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{1EE29341-01DD-4652-AA4D-611DE75CB106}"
+ ProjectSection(SolutionItems) = preProject
+ ..\docs\README.md = ..\docs\README.md
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F1DB36F5-73E7-4ED2-94FF-F19B28284A0D}"
+ ProjectSection(SolutionItems) = preProject
+ ..\.gitattributes = ..\.gitattributes
+ ..\.gitignore = ..\.gitignore
+ ..\LICENSE = ..\LICENSE
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ DebugNoDeploy|Any CPU = DebugNoDeploy|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.DebugNoDeploy|Any CPU.ActiveCfg = DebugNoDeploy|Any CPU
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.DebugNoDeploy|Any CPU.Build.0 = DebugNoDeploy|Any CPU
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73CF24C1-0509-43B3-A72B-90720901BF76}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {1A2C7529-FAA6-4705-9AD2-363DD17D6268} = {53F5499F-33B0-438A-B383-08CA50F1537E}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F8F84D08-DEB1-44D1-819E-5195C3DC4FA7}
+ EndGlobalSection
+EndGlobal
diff --git a/src/Digitalroot.Valheim.EternalFire/.nx/description.bbcode.txt b/src/Digitalroot.Valheim.EternalFire/.nx/description.bbcode.txt
new file mode 100644
index 0000000..6e23073
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/.nx/description.bbcode.txt
@@ -0,0 +1,38 @@
+[size=3]Valheim mod to mute Misophonia triggering sounds.
+[/size][b][size=4]
+License
+[/size][/b][size=3][url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.MisophoniaFriendly/blob/main/LICENSE]GNU Affero General Public License v3.0[/url][/size][size=3]
+[/size][size=3]Closed-source license is available for commercial use.[/size]
+
+[b][size=4]Source[/size][/b]
+[size=3][url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.MisophoniaFriendly]GitHub[/url][/size]
+
+[b][size=4]Digitalroot's Max Dungeon Rooms[/size][/b]
+[size=3]Mutes Misophonia triggering sounds. [/size]
+[list]
+[*][size=3]Puke[/size]
+[*][size=3]Eat[/size]
+[/list]
+[b][size=4]Installation (manual)[/size][/b]
+[list=1]
+[*][size=3]Download the latest release archive (zip) file.[/size]
+[*][size=3]Extract the archive into \steamapps\common\Valheim\BepInEx\plugins[/size]
+[/list]
+[b][size=4]Configuration[/size][/b][size=3]
+[/size][list]
+[*][size=3]No need to configure.[/size]
+[/list]
+[b][size=4]Issues/Bugs[/size][/b]
+[size=3]Open an issue or bug on the [url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.MisophoniaFriendly/issues]issue board[/url].[/size]
+
+[b][size=4]Questions[/size][/b]
+[size=3]Ask a question on the [url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.MisophoniaFriendly/discussions]discussions board[/url].[/size]
+
+[b][size=4]Support Me[/size][/b] @ [url=https://www.buymeacoffee.com/digitalroot]https://www.buymeacoffee.com/digitalroot[/url]
+
+
+[center][size=3][b][color=#00ffff]Digitalroot can be found in the following Discords[/color][/b][/size]
+[url=https://discord.gg/Xh3UHcDC][img]https://digitalroot.net/img/jvldisc.png[/img][/url]
+[url=https://discord.gg/randyknappmods][img]https://digitalroot.net/img/epiclootdisc.png[/img][/url]
+[url=https://discord.gg/mbkPcvu9ax][img]https://digitalroot.net/img/odinplusdisc.png[/img][/url]
+[/center]
diff --git a/src/Digitalroot.Valheim.EternalFire/.ts/icon.png b/src/Digitalroot.Valheim.EternalFire/.ts/icon.png
new file mode 100644
index 0000000..eb14a92
Binary files /dev/null and b/src/Digitalroot.Valheim.EternalFire/.ts/icon.png differ
diff --git a/src/Digitalroot.Valheim.EternalFire/.ts/manifest.json b/src/Digitalroot.Valheim.EternalFire/.ts/manifest.json
new file mode 100644
index 0000000..4b90e73
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/.ts/manifest.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://raw.githubusercontent.com/Digitalroot-Valheim/Digitalroot.Valheim.Common.Interfaces/main/src/json/tsio-manifest.json",
+ "name": "Eternal_Fire",
+ "author": "Digitalroot",
+ "description": "Keeps fires lit and burning without needing to fuel them.",
+ "version_number": "%VERSION_NUMBER%",
+ "dependencies": [
+ "denikson-BepInExPack_Valheim-5.4.2105",
+ "ValheimModding-Jotunn-2.11.5"
+ ],
+ "website_url": "https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.EternalFire"
+}
diff --git a/src/Digitalroot.Valheim.EternalFire/AssemblyInfo.cs b/src/Digitalroot.Valheim.EternalFire/AssemblyInfo.cs
new file mode 100644
index 0000000..81ac32f
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+using Digitalroot.Valheim.EternalFire;
+using Digitalroot.Valheim.Common;
+
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle(Main.Namespace)]
+[assembly: AssemblyDescription(Main.Name)]
+[assembly: AssemblyConfiguration(AssemblyInfo.Configuration)]
+[assembly: AssemblyCompany(AssemblyInfo.Company)]
+[assembly: AssemblyProduct(AssemblyInfo.Product)]
+[assembly: AssemblyCopyright(AssemblyInfo.Copyright)]
+[assembly: AssemblyTrademark(AssemblyInfo.Trademark)]
+[assembly: AssemblyCulture(AssemblyInfo.Culture)]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3ccc4dc1-5b17-47c1-b996-ca03b8639a61")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion(Main.Version)]
+[assembly: AssemblyFileVersion(Main.Version)]
diff --git a/src/Digitalroot.Valheim.EternalFire/Digitalroot.Valheim.EternalFire.csproj b/src/Digitalroot.Valheim.EternalFire/Digitalroot.Valheim.EternalFire.csproj
new file mode 100644
index 0000000..387a6d3
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/Digitalroot.Valheim.EternalFire.csproj
@@ -0,0 +1,81 @@
+
+
+
+ Digitalroot.Valheim.EternalFire
+ net48
+ 10
+ Digitalroot.Valheim.EternalFire
+ False
+ True
+ embedded
+ false
+ false
+ true
+ AGPL-3.0-or-later
+ Copyright © Digitalroot Technologies 2021 - 2024
+ https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.EternalFire
+ https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.EternalFire
+ git
+ Digitalroot
+ Digitalroot Technologies
+ Digitalroot Valheim Digitalroot.Valheim.EternalFire
+ Digitalroot.Valheim.EternalFire for Valheim
+ en-US
+ true
+ README.md
+
+ https://nuget.bepinex.dev/v3/index.json;
+ https://digitalroot-valheim-nuget.s3.us-west-2.amazonaws.com/index.json
+
+ 0.0.1
+ Debug;Release;DebugNoDeploy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime
+
+
+ all
+
+
+ all
+ runtime
+ compile; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+ all
+ runtime
+ compile; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+
+
+
+
diff --git a/src/Digitalroot.Valheim.EternalFire/FodyWeavers.xml b/src/Digitalroot.Valheim.EternalFire/FodyWeavers.xml
new file mode 100644
index 0000000..4717580
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/Digitalroot.Valheim.EternalFire/Main.cs b/src/Digitalroot.Valheim.EternalFire/Main.cs
new file mode 100644
index 0000000..ec8231f
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/Main.cs
@@ -0,0 +1,194 @@
+using BepInEx;
+using BepInEx.Configuration;
+using Digitalroot.Valheim.Common;
+using HarmonyLib;
+using JetBrains.Annotations;
+using Jotunn.Utils;
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+
+namespace Digitalroot.Valheim.EternalFire
+{
+ [BepInPlugin(Guid, Name, Version)]
+ [BepInDependency(Jotunn.Main.ModGuid, "2.11.5")]
+ [NetworkCompatibility(CompatibilityLevel.EveryoneMustHaveMod, VersionStrictness.Minor)]
+ [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
+ public partial class Main : BaseUnityPlugin, ITraceableLogging
+ {
+ private Harmony _harmony;
+ public static Main Instance;
+
+ // [UsedImplicitly] public static ConfigEntry NexusId;
+ private readonly Harmony harmony = new Harmony(Guid);
+ public static ConfigEntry NexusId { get; private set; }
+ private static ConfigEntry config_fire_pit;
+ private static ConfigEntry config_bonfire;
+ private static ConfigEntry config_hearth;
+ private static ConfigEntry config_piece_walltorch;
+ private static ConfigEntry config_piece_groundtorch;
+ private static ConfigEntry config_piece_groundtorch_wood;
+ private static ConfigEntry config_piece_groundtorch_green;
+ private static ConfigEntry config_piece_groundtorch_blue;
+ private static ConfigEntry config_piece_brazierfloor01;
+ private static ConfigEntry config_piece_brazierceiling01;
+ private static ConfigEntry config_piece_jackoturnip;
+ private static ConfigEntry config_piece_oven;
+ private static ConfigEntry config_smelter;
+ private static ConfigEntry config_blastfurnace;
+ private static ConfigEntry config_eitrrefinery;
+ private static ConfigEntry config_piece_bathtub;
+ private static ConfigEntry config_custom_instance;
+
+ public Main()
+ {
+ Instance = this;
+ #if DEBUG
+ EnableTrace = true;
+ Log.RegisterSource(Instance);
+ #else
+ EnableTrace = false;
+ #endif
+ Log.Trace(Instance, $"{Namespace}.{MethodBase.GetCurrentMethod()?.DeclaringType?.Name}.{MethodBase.GetCurrentMethod()?.Name}");
+ }
+
+ [UsedImplicitly]
+ private void Awake()
+ {
+ try
+ {
+ Log.Trace(Instance, $"{Namespace}.{MethodBase.GetCurrentMethod()?.DeclaringType?.Name}.{MethodBase.GetCurrentMethod()?.Name}");
+ NexusId = Config.Bind("General", "NexusID", 0000, new ConfigDescription("Nexus mod ID for updates", null, new ConfigurationManagerAttributes { Browsable = false, ReadOnly = true }));
+ config_fire_pit = Config.Bind("Fireplaces", "CampFire", true, "Enable Campfire");
+ config_bonfire = Config.Bind("Fireplaces", "Bonfire", true, "Enable Bonfire");
+ config_piece_walltorch = Config.Bind("Fireplaces", "Sconce", true, "Enable Sconce");
+ config_piece_groundtorch = Config.Bind("Fireplaces", "StandingIronTorch", true, "Enable Standing Iron Torch");
+ config_piece_groundtorch_wood = Config.Bind("Fireplaces", "StandingWoodTorch", true, "Enable Standing Wood Torch");
+ config_piece_groundtorch_green = Config.Bind("Fireplaces", "StandingGreenBurningIronTorch", true, "Enable Standing Green Burning Iron Torch");
+ config_piece_groundtorch_blue = Config.Bind("Fireplaces", "StandingBlueBurningIronTorch", true, "Enable Standing Blue Burning Iron Torch");
+ config_piece_brazierfloor01 = Config.Bind("Fireplaces", "StandingBrazier", true, "Enable Standing Brazier");
+ config_piece_brazierceiling01 = Config.Bind("Fireplaces", "HangingBrazier", true, "Enable Hanging Brazier");
+ config_piece_jackoturnip = Config.Bind("Fireplaces", "JackOTurnip", true, "Enable Jack-o-turnip");
+ config_hearth = Config.Bind("Fireplaces", "Hearth", true, "Enable Hearth");
+ config_piece_bathtub = Config.Bind("Fireplaces", "HotTub", true, "Enable Hot tub");
+ config_piece_oven = Config.Bind("CookingStations", "StoneOven", true, "Enable Stone oven");
+ config_smelter = Config.Bind("Smelters", "Smelter", false, "Enable Smelter");
+ config_blastfurnace = Config.Bind("Smelters", "BlastFurnace", false, "Enable Blast furnace");
+ config_eitrrefinery = Config.Bind("Smelters", "EitrRefinery", false, "Enable Eitr refinery");
+ config_custom_instance = Config.Bind("Custom", "CustomPrefabs", "", "A comma-separated list of prefab names");
+
+ _harmony = Harmony.CreateAndPatchAll(typeof(Main).Assembly, Guid);
+ }
+ catch (Exception e)
+ {
+ Log.Error(Instance, e);
+ }
+ }
+
+ [UsedImplicitly]
+ private void OnDestroy()
+ {
+ try
+ {
+ Log.Trace(Instance, $"{Namespace}.{MethodBase.GetCurrentMethod()?.DeclaringType?.Name}.{MethodBase.GetCurrentMethod()?.Name}");
+ _harmony?.UnpatchSelf();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Instance, e);
+ }
+ }
+
+ public static async void Refuel(ZNetView znview)
+ {
+ await Task.Delay(33);
+ znview.InvokeRPC("AddFuel");
+ }
+
+ public static bool ConfigCheck(string instanceName)
+ {
+ bool EternalFuel = false;
+ switch (instanceName)
+ {
+ case "fire_pit(Clone)":
+ EternalFuel = config_fire_pit.Value;
+ break;
+
+ case "bonfire(Clone)":
+ EternalFuel = config_bonfire.Value;
+ break;
+
+ case "hearth(Clone)":
+ EternalFuel = config_hearth.Value;
+ break;
+
+ case "piece_walltorch(Clone)":
+ EternalFuel = config_piece_walltorch.Value;
+ break;
+
+ case "piece_groundtorch(Clone)":
+ EternalFuel = config_piece_groundtorch.Value;
+ break;
+
+ case "piece_groundtorch_wood(Clone)":
+ EternalFuel = config_piece_groundtorch_wood.Value;
+ break;
+
+ case "piece_groundtorch_green(Clone)":
+ EternalFuel = config_piece_groundtorch_green.Value;
+ break;
+
+ case "piece_groundtorch_blue(Clone)":
+ EternalFuel = config_piece_groundtorch_blue.Value;
+ break;
+
+ case "piece_brazierfloor01(Clone)":
+ EternalFuel = config_piece_brazierfloor01.Value;
+ break;
+
+ case "piece_brazierceiling01(Clone)":
+ EternalFuel = config_piece_brazierceiling01.Value;
+ break;
+
+ case "piece_jackoturnip(Clone)":
+ EternalFuel = config_piece_jackoturnip.Value;
+ break;
+
+ case "piece_oven(Clone)":
+ EternalFuel = config_piece_oven.Value;
+ break;
+
+ case "smelter(Clone)":
+ EternalFuel = config_smelter.Value;
+ break;
+
+ case "blastfurnace(Clone)":
+ EternalFuel = config_blastfurnace.Value;
+ break;
+
+ case "eitrrefinery(Clone)":
+ EternalFuel = config_eitrrefinery.Value;
+ break;
+
+ case "piece_bathtub(Clone)":
+ EternalFuel = config_piece_bathtub.Value;
+ break;
+ }
+
+ if (config_custom_instance.Value.Split(',').Contains(instanceName.Remove(instanceName.Length - 7))) EternalFuel = true;
+ return EternalFuel;
+ }
+
+ #region Implementation of ITraceableLogging
+
+ ///
+ public string Source => Namespace;
+
+ ///
+ public bool EnableTrace { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Digitalroot.Valheim.EternalFire/MetaData.cs b/src/Digitalroot.Valheim.EternalFire/MetaData.cs
new file mode 100644
index 0000000..dbdd9a1
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/MetaData.cs
@@ -0,0 +1,13 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace Digitalroot.Valheim.EternalFire
+{
+ [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
+ public partial class Main
+ {
+ public const string Version = "0.0.1";
+ public const string Name = "Eternal Fire";
+ public const string Guid = "digitalroot.mods.eternalFire";
+ public const string Namespace = "Digitalroot.Valheim" + nameof(Digitalroot.Valheim.EternalFire);
+ }
+}
diff --git a/src/Digitalroot.Valheim.EternalFire/Patch.cs b/src/Digitalroot.Valheim.EternalFire/Patch.cs
new file mode 100644
index 0000000..14eccd3
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/Patch.cs
@@ -0,0 +1,70 @@
+using HarmonyLib;
+using JetBrains.Annotations;
+
+namespace Digitalroot.Valheim.EternalFire
+{
+ [UsedImplicitly]
+ public class Patch
+ {
+ [HarmonyPatch]
+ public class PatchFireplaceUpdateFireplace
+ {
+ [HarmonyPrefix, HarmonyPatch(typeof(Fireplace), nameof(Fireplace.UpdateFireplace))]
+ static void Prefix(ref Fireplace __instance, ref ZNetView ___m_nview)
+ {
+ if (Main.ConfigCheck(__instance.name)) ___m_nview.GetZDO().Set("fuel", __instance.m_maxFuel);
+ }
+ }
+
+ #region CookingStation
+
+ [HarmonyPatch]
+ public class PatchCookingStationSetFuel
+ {
+ [HarmonyPrefix, HarmonyPatch(typeof(CookingStation), nameof(CookingStation.SetFuel))]
+ static void Prefix(ref CookingStation __instance, ref float fuel)
+ {
+ if (Main.ConfigCheck(__instance.name)) fuel = __instance.m_maxFuel;
+ }
+ }
+
+ [HarmonyPatch]
+ public class PatchCookingStationAwake
+ {
+ [HarmonyPostfix, HarmonyPatch(typeof(CookingStation), nameof(CookingStation.Awake))]
+ static void Postfix(ref CookingStation __instance, ref ZNetView ___m_nview)
+ {
+ if (!___m_nview.isActiveAndEnabled || Player.m_localPlayer == null || Player.m_localPlayer.IsTeleporting()) return;
+ if (Main.ConfigCheck(__instance.name)) Main.Refuel(___m_nview);
+ }
+ }
+
+ #endregion
+
+ #region Smelter
+
+ [HarmonyPatch]
+ public class PatchSmelterSetFuel
+ {
+ [HarmonyPrefix, HarmonyPatch(typeof(Smelter), nameof(Smelter.SetFuel))]
+ static void Prefix(ref Smelter __instance, ref float fuel)
+ {
+ if (Main.ConfigCheck(__instance.name)) fuel = __instance.m_maxFuel;
+ }
+ }
+
+ [HarmonyPatch]
+ public class PatchSmelterAwake
+ {
+ [HarmonyPostfix, HarmonyPatch(typeof(Smelter), nameof(Smelter.Awake))]
+ static void Postfix(ref Smelter __instance, ref ZNetView ___m_nview)
+ {
+ if (!___m_nview.isActiveAndEnabled || Player.m_localPlayer == null || Player.m_localPlayer.IsTeleporting()) return;
+
+ if (Main.ConfigCheck(__instance.name)) Main.Refuel(___m_nview);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Digitalroot.Valheim.EternalFire/TemplateOutputs.txt b/src/Digitalroot.Valheim.EternalFire/TemplateOutputs.txt
new file mode 100644
index 0000000..b8ef946
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/TemplateOutputs.txt
@@ -0,0 +1,18 @@
+rootnamespace=$rootnamespace$
+clrversion=4.0.30319.42000
+guid[1-10]=4725d2f5-fbb1-4caa-bec4-72022495c1a6
+itemname=TemplateOutputs
+machinename=FIRESTORM
+projectname=Digitalroot.Valheim.EternalFire
+registeredorganization=
+defaultnamespace=$defaultnamespace$
+safeitemname=TemplateOutputs
+safeitemrootname=TemplateOutputs
+safeprojectname=Digitalroot.Valheim.EternalFire
+targetframeworkversion=4.7.2
+time=12/12/2022 6:38:13 PM
+specifiedsolutionname=
+userdomain=FIRESTORM
+username=nkd
+webnamespace=$webnamespace$
+year=2022
\ No newline at end of file
diff --git a/src/Digitalroot.Valheim.EternalFire/packages.lock.json b/src/Digitalroot.Valheim.EternalFire/packages.lock.json
new file mode 100644
index 0000000..ed5d88c
--- /dev/null
+++ b/src/Digitalroot.Valheim.EternalFire/packages.lock.json
@@ -0,0 +1,144 @@
+{
+ "version": 1,
+ "dependencies": {
+ ".NETFramework,Version=v4.8": {
+ "BepInEx.Core": {
+ "type": "Direct",
+ "requested": "[5.4.21, 5.4.21]",
+ "resolved": "5.4.21",
+ "contentHash": "NMUPlbHTTfJ+qIQCI90uIvjuUQ4wnwt4cpRsK3ItBh1DhsWFzAHXNiZjBxZkPysljEKQ2iu89sxMTga4bxBXVQ==",
+ "dependencies": {
+ "BepInEx.BaseLib": "5.4.20",
+ "HarmonyX": "2.7.0"
+ }
+ },
+ "Digitalroot.Valheim.Build.Targets": {
+ "type": "Direct",
+ "requested": "[1.0.21, )",
+ "resolved": "1.0.21",
+ "contentHash": "8mErk3UFjy80d9IlTjXNsofT7YfKLz897YE10ieB/SHNbBorzwVCPYRGsmuaNH8HyqjKQH3KnK4gDwDMBEC+DQ=="
+ },
+ "Digitalroot.Valheim.Common.AssemblyInfo": {
+ "type": "Direct",
+ "requested": "[1.0.16, )",
+ "resolved": "1.0.16",
+ "contentHash": "+QeepsgH/cRv93h1NrhKLnjARUYNplFWVrFX4MBYLV2K2MQ9hGWV/bhR4As/2IOeNVKX42x5wJqw4YFbZLky/w=="
+ },
+ "Digitalroot.Valheim.Common.Log": {
+ "type": "Direct",
+ "requested": "[1.1.46, )",
+ "resolved": "1.1.46",
+ "contentHash": "WgwWYfcJJae4pQI0oRxkLj/NvFvYILo4p2P3nQkLX0i9fPpVB+eDlgAGUEsyG76PmsM/N7eZpGeiFvbnSDEEJQ==",
+ "dependencies": {
+ "Digitalroot.Valheim.Common.Json": "1.0.34"
+ }
+ },
+ "Digitalroot.Valheim.Common.Names": {
+ "type": "Direct",
+ "requested": "[1.4.18, )",
+ "resolved": "1.4.18",
+ "contentHash": "FqjWNLeVXk6J14c7GWftZ8aIpsqPJ3uXKy+HXgS66SjED/h6j5EEirUZnDMGe7A/6GboNUA06/JDp3R8qfR2kg==",
+ "dependencies": {
+ "Digitalroot.Valheim.Common.Utils": "1.0.55"
+ }
+ },
+ "Digitalroot.Valheim.Common.References": {
+ "type": "Direct",
+ "requested": "[0.217.38, )",
+ "resolved": "0.217.38",
+ "contentHash": "y8KIE7aSMeFytv1ks7CJIoDLWUPN4vzaSkWN2r4kDhkoq65rmmxB1UsjI+VZvfs9LZ5COfZwdQlz628/2Nclgg=="
+ },
+ "Digitalroot.Valheim.Common.Utils": {
+ "type": "Direct",
+ "requested": "[1.0.55, )",
+ "resolved": "1.0.55",
+ "contentHash": "J9VWU0c+GLXvUYKlBx0zeN5t49iCEnYWC27O2/CSC6IitOe3tR3YhSCanFvAQPNuR0UOpjmbUgHegA3t6NS6AQ==",
+ "dependencies": {
+ "Digitalroot.Valheim.Common.Log": "1.1.46"
+ }
+ },
+ "Digitalroot.Valheim.References.JvL": {
+ "type": "Direct",
+ "requested": "[2.15.2, )",
+ "resolved": "2.15.2",
+ "contentHash": "+GcLrGLT7mqaniFbBthYMNgRClTbDP0VSEBN+Leo56rDm4YFHbZVUanXOzJK+dWIEtttIeDINKtAJt4iljjdiw=="
+ },
+ "ErrorProne.NET.CoreAnalyzers": {
+ "type": "Direct",
+ "requested": "[0.1.2, )",
+ "resolved": "0.1.2",
+ "contentHash": "RQdzUtFVhwLwisP2Du7Ugm7ldwAzc+QJrlZWNIwHXcgq4b5fLwZgdN1203RdYiHS8OOALophC6yWekxu3UgN2g=="
+ },
+ "Fody": {
+ "type": "Direct",
+ "requested": "[6.6.0, 6.6.0]",
+ "resolved": "6.6.0",
+ "contentHash": "NWWM8KiR9DGiAi47q9px9oI27xYBiM5KXxSnI4R5mz2/rG8LIcXJfw5zDLLH1xOgzqRNJgc8KTPQPoiQCidYUw=="
+ },
+ "ILMerge.Fody": {
+ "type": "Direct",
+ "requested": "[1.22.0, 1.22.0]",
+ "resolved": "1.22.0",
+ "contentHash": "VCWQM8q7wZwHMgksBsFfbImRUmlgn7E6EKkrnUV86/keqBvMTjhlA7mBYtz6Dace8XsJYufYJvRP25uur5W5WA==",
+ "dependencies": {
+ "Fody": "6.3.0"
+ }
+ },
+ "BepInEx.BaseLib": {
+ "type": "Transitive",
+ "resolved": "5.4.20",
+ "contentHash": "0bXgYxbCEN2Ixp3kiFEhyw+RASeFQeg/ww+lbMt7if6XMeVS60eg6epNsMA8Jbx57dmNOzNevkKKw8mP8SUMqw=="
+ },
+ "Digitalroot.References.Unity": {
+ "type": "Transitive",
+ "resolved": "2022.3.12",
+ "contentHash": "QgMwg+WAnbvmjxSuL+PKjr+35B0FhO0Thw9ddoSBrfBkYsMSCYAqJ0APsN2AQfXn3zVdJgP7Rw2S41DJfuBxRQ=="
+ },
+ "Digitalroot.Valheim.Common.Json": {
+ "type": "Transitive",
+ "resolved": "1.0.34",
+ "contentHash": "L7xiFHkundjUriPdJeqpy+V65EjaJpIrQu925VV1E1JbvL16jcVDY32Hj5HoREUEe1Tn8VJSYJBU6SJTqha2kw==",
+ "dependencies": {
+ "Digitalroot.References.Unity": "2022.3.12",
+ "Digitalroot.Valheim.Common.References": "0.217.30",
+ "fastJSON": "2.4.0.4"
+ }
+ },
+ "fastJSON": {
+ "type": "Transitive",
+ "resolved": "2.4.0.4",
+ "contentHash": "lbxY+miTOvCNbNfOk8HcbmBD9F6wv2dRKZlMjtJBm6rjA5vFKXBYtR6eoIe96HnCHOE1nCJbMsaZDKGNPg5mIA=="
+ },
+ "HarmonyX": {
+ "type": "Transitive",
+ "resolved": "2.7.0",
+ "contentHash": "lec/SkduQspMa3Pi/nM/NSvA84Za8HCCWA8ybdToKiTqnBZa+JC5g6rxoFQCg/1vNuYcvjy77edePZzIEsRmvw==",
+ "dependencies": {
+ "MonoMod.RuntimeDetour": "21.12.13.1"
+ }
+ },
+ "Mono.Cecil": {
+ "type": "Transitive",
+ "resolved": "0.11.4",
+ "contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
+ },
+ "MonoMod.RuntimeDetour": {
+ "type": "Transitive",
+ "resolved": "21.12.13.1",
+ "contentHash": "65mB+bHjT6UCGCgO+/pYhpuGPf96rQ1Whwkut/x7cqVIW0DTndDFyWc/3bngzhnY/Y6IYtBMlXsU2ATq+CxpHg==",
+ "dependencies": {
+ "Mono.Cecil": "0.11.4",
+ "MonoMod.Utils": "21.12.13.1"
+ }
+ },
+ "MonoMod.Utils": {
+ "type": "Transitive",
+ "resolved": "21.12.13.1",
+ "contentHash": "/H+0RMWqx/D1/fSuY5jhY6GFvqhdYdlnI7J3IfL8P6y4nJkoZDxqts6+RxWWOz4pbnJdWnxSjS8XG+Lq6rUi7w==",
+ "dependencies": {
+ "Mono.Cecil": "0.11.4"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file