Class JsonWeather
Represents a weather type configuration from JSON
public class JsonWeather
- Inheritance
-
JsonWeather
- Inherited Members
Properties
AverageTemperature
Gets the average temperature for this weather type
[JsonIgnore]
public double AverageTemperature { get; }
Property Value
ColdChance
public int ColdChance { get; set; }
Property Value
ColdIntensity
public int ColdIntensity { get; set; }
Property Value
Description
public string Description { get; set; }
Property Value
HasRain
Checks if this weather type supports rain
[JsonIgnore]
public bool HasRain { get; }
Property Value
HasSnow
Checks if this weather type supports snow
[JsonIgnore]
public bool HasSnow { get; }
Property Value
HasStorms
Checks if this weather type supports storms
[JsonIgnore]
public bool HasStorms { get; }
Property Value
HeatChance
public int HeatChance { get; set; }
Property Value
HeatIntensity
public int HeatIntensity { get; set; }
Property Value
Id
public int Id { get; set; }
Property Value
IsColdClimate
Checks if this is a cold climate
[JsonIgnore]
public bool IsColdClimate { get; }
Property Value
IsExtreme
Checks if this weather type has extreme conditions
[JsonIgnore]
public bool IsExtreme { get; }
Property Value
IsHotClimate
Checks if this is a hot climate
[JsonIgnore]
public bool IsHotClimate { get; }
Property Value
LightMax
public int? LightMax { get; set; }
Property Value
- int?
LightMin
public int? LightMin { get; set; }
Property Value
- int?
MaxTemp
public int MaxTemp { get; set; }
Property Value
MinTemp
public int MinTemp { get; set; }
Property Value
Name
public string Name { get; set; }
Property Value
RainChance
public int RainChance { get; set; }
Property Value
RainIntensity
public JsonIntensityRange RainIntensity { get; set; }
Property Value
RainTempDrop
public int RainTempDrop { get; set; }
Property Value
SnowChance
public int SnowChance { get; set; }
Property Value
SnowIntensity
public JsonIntensityRange SnowIntensity { get; set; }
Property Value
SnowThreshold
public int SnowThreshold { get; set; }
Property Value
StormChance
public int StormChance { get; set; }
Property Value
StormIntensity
public JsonIntensityRange StormIntensity { get; set; }
Property Value
StormTempDrop
public int StormTempDrop { get; set; }
Property Value
TemperatureRange
Gets the temperature range for this weather type
[JsonIgnore]
public int TemperatureRange { get; }
Property Value
Methods
DetermineJsonWeatherCondition(int, Random?)
Determines the current weather condition based on chances
public JsonWeatherCondition DetermineJsonWeatherCondition(int currentTemp, Random? random = null)
Parameters
Returns
- JsonWeatherCondition
Current weather condition
GetDamageIntensity(JsonWeatherCondition, Random?)
Gets the damage intensity for the current weather condition
public int GetDamageIntensity(JsonWeatherCondition condition, Random? random = null)
Parameters
conditionJsonWeatherConditionCurrent weather condition
randomRandomRandom instance (optional)
Returns
- int
Damage intensity value
GetTemperatureDrop(JsonWeatherCondition)
Gets the appropriate temperature drop for the current weather
public int GetTemperatureDrop(JsonWeatherCondition condition)
Parameters
conditionJsonWeatherConditionCurrent weather condition
Returns
- int
Temperature drop amount
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.