diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 10c147a..9415dae 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: MelonInfo(typeof(FireAddons.FireAddons), "FireAddons", "3.1.1", "ttr")] +[assembly: MelonInfo(typeof(FireAddons.FireAddons), "FireAddons", "3.1.2", "ttr")] [assembly: MelonGame("Hinterland", "TheLongDark")] diff --git a/src/FireAddons.cs b/src/FireAddons.cs index 651b3c9..71426cd 100644 --- a/src/FireAddons.cs +++ b/src/FireAddons.cs @@ -439,16 +439,16 @@ internal static void CalculateCharcoal(Fire __instance) //MelonLogger.Msg(guid + " capping charcoal to 0 from " + tmp); } } - internal static void FeedFire(Panel_FeedFire __instance) + internal static void FeedFireEmbers(Panel_FeedFire __instance) { - + Fire _fire = __instance.m_FireplaceInteraction.Fire; string guid = ObjectGuid.GetGuidFromGameObject(_fire.gameObject); GearItem fuel = __instance.GetSelectedFuelSource(); // added fuel while embers - if (_fire.m_EmberTimer > 0f ) - { + if (_fire.m_EmberTimer > 0f) + { ResetEmbersOnRestart(_fire); } // try add fuel to embers unless it wasn't comming out from ember state; only for certian fuels @@ -463,8 +463,15 @@ internal static void FeedFire(Panel_FeedFire __instance) } } - // If charcoal was added, hack charcoal values - if (fuel.name.ToLower().StartsWith("gear_charcoal")) + } + internal static void FeedFireCharoal(Panel_FeedFire __instance) + { + + Fire _fire = __instance.m_FireplaceInteraction.Fire; + GearItem fuel = __instance.GetSelectedFuelSource(); + + // If charcoal was added, hack charcoal values + if (fuel.name.ToLower().StartsWith("gear_charcoal")) { _fire.m_NumGeneratedCharcoalPieces -= 1; } diff --git a/src/Patches.cs b/src/Patches.cs index 75d835c..c7fc0a1 100644 --- a/src/Patches.cs +++ b/src/Patches.cs @@ -40,7 +40,8 @@ internal class Panel_FeedFire_OnFeedFire { private static void Postfix(Panel_FeedFire __instance) { - FireAddons.FeedFire(__instance); + if (Settings.options.embersSystem) { FireAddons.FeedFireEmbers(__instance); }; + if (Settings.options.burnCharcoal) { FireAddons.FeedFireCharoal(__instance); }; } }