public static bool Prefix(SaltPlant __instance) { __instance.gameObject.GetComponent <ElementConsumer>()?.EnableConsumption(false); ElementConverter converter = __instance.gameObject.GetComponent <ElementConverter>(); if (converter != null) { converter.SetWorkSpeedMultiplier(0f); } return(false); }
public static bool Prefix(SaltPlant __instance) { __instance.gameObject.GetComponent <ElementConsumer>()?.EnableConsumption(true); ElementConverter converter = __instance.gameObject.GetComponent <ElementConverter>(); if (converter != null) { if (__instance.GetComponent <ReceptacleMonitor>()?.Replanted ?? false) { converter.SetWorkSpeedMultiplier(1f); } else { converter.SetWorkSpeedMultiplier(0.25f); } } return(false); }
public static void Postfix(SaltPlant __instance) { __instance.Subscribe((int)GameHashes.PlanterStorage, OnReplanted); }
public static void PreFix(SaltPlant __instance) { Debug.Log("Salt Wilt Recover called. Resource Consumption Resumed."); }