patches not firing
This commit is contained in:
@@ -250,21 +250,18 @@ namespace AbsorbentSoil
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
MelonLogger.Msg($"Plant.Initialize fired. Plant={__instance?.name}, Pot={__instance?.Pot?.name}");
|
||||||
|
|
||||||
if (__instance == null || __instance.Pot == null)
|
if (__instance == null || __instance.Pot == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Pot pot = __instance.Pot;
|
Pot actualPot = __instance.Pot;
|
||||||
if (!SoilHelper.CanReapplyRetainedAdditives(pot))
|
var additiveIds = AdditiveMemory.Get(actualPot);
|
||||||
return;
|
|
||||||
|
|
||||||
IReadOnlyList<string> additiveIds = AdditiveMemory.Get(pot);
|
MelonLogger.Msg($"Plant.Initialize pot key={PotKeyHelper.GetPotKey(actualPot)}, remembered additives={additiveIds.Count}");
|
||||||
if (additiveIds.Count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach (string additiveId in additiveIds)
|
foreach (string additiveId in additiveIds)
|
||||||
Pot_ApplyAdditive_Patch.ReapplyWithoutRecapture(pot, additiveId);
|
Pot_ApplyAdditive_Patch.ReapplyWithoutRecapture(actualPot, additiveId);
|
||||||
|
|
||||||
MelonLogger.Msg($"Reapplied {additiveIds.Count} retained additive(s) to new plant in pot '{PotKeyHelper.GetPotKey(pot)}'.");
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("AbsorbentSoil")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("AbsorbentSoil")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7eba0a03f019a3817f694cbae7ecb1d5f3104e45")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4905fd318f31ad1d1c8d7fce691eadbcf8c853cc")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("AbsorbentSoil")]
|
[assembly: System.Reflection.AssemblyProductAttribute("AbsorbentSoil")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("AbsorbentSoil")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("AbsorbentSoil")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
27eaa669f94faac9705255117bf2c7e16542b7864e4480e4b988fcdf9942abbc
|
38d76ad129f11b745ab5d2651f1dac91aaf4d8e791814be07237199ab605665a
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user