Class Climate
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class Climate
- Inheritance
-
Climate
- Inherited Members
- Extension Methods
Fields
Sealevel
This value is update once the config is loaded and the Sealevel is known
public static int Sealevel
Field Value
TemperatureScaleConversion
Temperature conversion factor used to get real temperatures from the climate's temperature int Used to convert from real temperature range float [-50 , 40] to int [0 , 255]
public static float TemperatureScaleConversion
Field Value
Methods
DescaleTemperature(float)
Convert from real temperature range float [-50 , 40] to int [0 , 255]
public static int DescaleTemperature(float temperature)
Parameters
temperature
float
Returns
GetAdjustedTemperature(int, int)
Convert from int [0 , 255] range to real temperature range int [-20 , 40] The distToSealevel/1.5f is also hardcoded in shaderincluds/colormap.vsh
public static int GetAdjustedTemperature(int unscaledTemp, int distToSealevel)
Parameters
Returns
GetFertility(int, float, float)
public static int GetFertility(int rain, float scaledTemp, float posYRel)
Parameters
Returns
GetFertilityFromUnscaledTemp(int, int, float)
public static int GetFertilityFromUnscaledTemp(int rain, int unscaledTemp, float posYRel)
Parameters
Returns
GetRainFall(int, int)
public static int GetRainFall(int rainfall, int y)
Parameters
Returns
GetScaledAdjustedTemperature(int, int)
Convert from int [0 , 255] range to real temperature range float [-20 , 40] The distToSealevel/1.5f is also hardcoded in shaderincluds/colormap.vsh
public static int GetScaledAdjustedTemperature(int unscaledTemp, int distToSealevel)
Parameters
Returns
GetScaledAdjustedTemperatureFloat(int, int)
Convert from int [0 , 255] range to real temperature range float [-20 , 40] The distToSealevel/1.5f is also hardcoded in shaderincluds/colormap.vsh
public static float GetScaledAdjustedTemperatureFloat(int unscaledTemp, int distToSealevel)
Parameters
Returns
GetScaledAdjustedTemperatureFloatClient(int, int)
Convert from int [0 , 255] range to real temperature range float [-50 , 40] The distToSealevel/1.5f is also hardcoded in shaderincluds/colormap.vsh
This exists since the client had a different value for min
public static float GetScaledAdjustedTemperatureFloatClient(int unscaledTemp, int distToSealevel)