debug - remembers now
This commit is contained in:
@@ -307,6 +307,31 @@ namespace AbsorbentSoil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(Plant), nameof(Plant.AdditiveApplied))]
|
||||||
|
internal static class Plant_AdditiveApplied_Patch
|
||||||
|
{
|
||||||
|
public static void Postfix(Plant __instance, AdditiveDefinition additive, bool isInitialApplication)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MelonLogger.Msg($"Plant.AdditiveApplied fired. Plant={__instance?.name}, Pot={__instance?.Pot?.name}, Additive={additive?.ID}, Initial={isInitialApplication}");
|
||||||
|
|
||||||
|
if (__instance == null || __instance.Pot == null || additive == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
string additiveId = additive.ID;
|
||||||
|
if (string.IsNullOrWhiteSpace(additiveId))
|
||||||
|
return;
|
||||||
|
|
||||||
|
AdditiveMemory.Remember(__instance.Pot, additiveId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MelonLogger.Warning($"Plant.AdditiveApplied postfix failed: {ex}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(Pot), "Destroy")]
|
[HarmonyPatch(typeof(Pot), "Destroy")]
|
||||||
internal static class Pot_Destroy_Patch
|
internal static class Pot_Destroy_Patch
|
||||||
{
|
{
|
||||||
|
|||||||
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+4905fd318f31ad1d1c8d7fce691eadbcf8c853cc")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+edfdcd0f82cb8dd28ef7c23c0a6db9346d0297d7")]
|
||||||
[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 @@
|
|||||||
38d76ad129f11b745ab5d2651f1dac91aaf4d8e791814be07237199ab605665a
|
7cd9882f4d02c82d4b4ffd99984e37f9ceb6e198918111ba41d9c687163e9fa9
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user