private static float DeltaFactor_NoNaturalLight() => OpenTheWindowsSettings.IndoorsNoNaturalLightPenalty; //indoors accelerated degradation when not under windows

        public static void LevelFromBeauty_Postfix(Need_Beauty __instance, float beauty, ref float __result)
        {
            FieldInfo baseLevelInfo = AccessTools.Field(__instance.def.GetType(), "baseLevel");
            float     baseLevel     = (float)baseLevelInfo.GetValue(__instance.def);

            __result = Mathf.Clamp01(baseLevel + beauty * ModifiedBeautyImpactFactor());
        }
예제 #2
0
 private static bool Prefix(Need_Beauty __instance, Pawn ___pawn, ref BeautyCategory __result)
 {
     if (___pawn.HasTrait(VTEDefOf.VTE_Slob) && __instance.CurLevel < 0.35f)
     {
         __result = BeautyCategory.Neutral;
         return(false);
     }
     return(true);
 }