patches not firing
This commit is contained in:
@@ -250,21 +250,18 @@ namespace AbsorbentSoil
|
||||
{
|
||||
try
|
||||
{
|
||||
MelonLogger.Msg($"Plant.Initialize fired. Plant={__instance?.name}, Pot={__instance?.Pot?.name}");
|
||||
|
||||
if (__instance == null || __instance.Pot == null)
|
||||
return;
|
||||
|
||||
Pot pot = __instance.Pot;
|
||||
if (!SoilHelper.CanReapplyRetainedAdditives(pot))
|
||||
return;
|
||||
Pot actualPot = __instance.Pot;
|
||||
var additiveIds = AdditiveMemory.Get(actualPot);
|
||||
|
||||
IReadOnlyList<string> additiveIds = AdditiveMemory.Get(pot);
|
||||
if (additiveIds.Count == 0)
|
||||
return;
|
||||
MelonLogger.Msg($"Plant.Initialize pot key={PotKeyHelper.GetPotKey(actualPot)}, remembered additives={additiveIds.Count}");
|
||||
|
||||
foreach (string additiveId in additiveIds)
|
||||
Pot_ApplyAdditive_Patch.ReapplyWithoutRecapture(pot, additiveId);
|
||||
|
||||
MelonLogger.Msg($"Reapplied {additiveIds.Count} retained additive(s) to new plant in pot '{PotKeyHelper.GetPotKey(pot)}'.");
|
||||
Pot_ApplyAdditive_Patch.ReapplyWithoutRecapture(actualPot, additiveId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("AbsorbentSoil")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[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.AssemblyTitleAttribute("AbsorbentSoil")]
|
||||
[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