Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public static void Postfix(SaltPlant __instance)
 {
     __instance.Subscribe((int)GameHashes.PlanterStorage, OnReplanted);
 }
Пример #4
0
 public static void PreFix(SaltPlant __instance)
 {
     Debug.Log("Salt Wilt Recover called. Resource Consumption Resumed.");
 }