예제 #1
0
        public static void PostfixDesiredPowerOutput(CompPowerPlantWater __instance, ref float __result)
        {
            // Season
            __result *= WatermillUtility.SeasonalPowerOutputFactorFor(__instance.parent.GetMapSeason());

            // Outdoor Temperature
            __result *= WatermillUtility.GetTemperatureToPowerOutputFactorCurveFor(__instance.parent).Evaluate(__instance.parent.MapHeld.mapTemperature.OutdoorTemp);

            // Turbulent Waters
            if (__instance.parent.MapHeld.GameConditionManager.ConditionIsActive(BWG_GameConditionDefOf.TurbulentWaters))
            {
                __result *= GameCondition_TurbulentWaters.WatermillPowerGenFactor;
            }
        }
예제 #2
0
        public static void PostfixCompInspectStringExtra(CompPowerPlantWater __instance, ref string __result)
        {
            // Season
            Season season = __instance.parent.GetMapSeason();
            float  seasonalPowerProductionFactor = WatermillUtility.SeasonalPowerOutputFactorFor(season);

            __result += "\n" + season.LabelCap() + ": x" + seasonalPowerProductionFactor.ToStringPercent();

            // Outdoor Temperature
            float tempPowerProductionFactor = WatermillUtility.GetTemperatureToPowerOutputFactorCurveFor(__instance.parent).Evaluate(__instance.parent.MapHeld.mapTemperature.OutdoorTemp);

            if (tempPowerProductionFactor != 1f)
            {
                __result += "\n" + "BadTemperature".Translate().CapitalizeFirst() + ": x" + tempPowerProductionFactor.ToStringPercent();
            }
        }