示例#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.");
 }