예제 #1
0
        private static void Postfix(WellFed __instance)
        {
            bool newActive = __instance.HasWellFed() && __instance.m_MaxConditionBonusPercent > 0f;

            if (newActive == wellFedActive)
            {
                return;
            }

            Transform labelTransform = InterfaceManager.m_Panel_FirstAid.m_LabelConditionPercent.transform;
            float     moveDirection  = newActive ? +1 : -1;

            labelTransform.localPosition += moveDirection * wellFedOffset;

            wellFedActive = newActive;
        }
예제 #2
0
            private static bool Prefix(WellFed __instance)
            {
                if (GameManager.m_IsPaused)
                {
                    return(false);
                }

                bool  active     = __instance.HasWellFed();
                float carryBonus = HungerRevamped.Instance.GetCarryBonus();

                __instance.m_CarryCapacityBonusKG = carryBonus;

                if (!active && carryBonus >= Tuning.wellFedCarryBonusStart)
                {
                    __instance.WellFedStart(__instance.GetCauseLocalizationId(), true, false);
                }
                else if (active && carryBonus < Tuning.wellFedCarryBonusEnd)
                {
                    __instance.WellFedEnd();
                }
                return(false);
            }