Table of Contents

Struct WeatherState

Namespace
S1API.Weather
Assembly
S1API.dll

An immutable snapshot of the game's active weather-condition weights. Each value is normally normalized between 0 and 1 by the game.

public readonly struct WeatherState : IEquatable<WeatherState>
Implements
Inherited Members
Extension Methods

Constructors

WeatherState(float, float, float, float, float, float, float, float, float)

Creates a weather snapshot from the nine native weather components.

public WeatherState(float sunny, float cloudy, float rainy, float stormy, float snowy, float foggy, float windy, float hail, float sleet)

Parameters

sunny float

The sunny-condition weight.

cloudy float

The cloudy-condition weight.

rainy float

The rainy-condition weight.

stormy float

The stormy-condition weight.

snowy float

The snowy-condition weight.

foggy float

The foggy-condition weight.

windy float

The windy-condition weight.

hail float

The hail-condition weight.

sleet float

The sleet-condition weight.

Properties

Cloudy

Gets the cloudy-condition weight.

public float Cloudy { get; }

Property Value

float

Foggy

Gets the foggy-condition weight.

public float Foggy { get; }

Property Value

float

Hail

Gets the hail-condition weight.

public float Hail { get; }

Property Value

float

Rainy

Gets the rainy-condition weight.

public float Rainy { get; }

Property Value

float

Sleet

Gets the sleet-condition weight.

public float Sleet { get; }

Property Value

float

Snowy

Gets the snowy-condition weight.

public float Snowy { get; }

Property Value

float

Stormy

Gets the stormy-condition weight.

public float Stormy { get; }

Property Value

float

Sunny

Gets the sunny-condition weight.

public float Sunny { get; }

Property Value

float

Windy

Gets the windy-condition weight.

public float Windy { get; }

Property Value

float

Methods

Equals(WeatherState)

public bool Equals(WeatherState other)

Parameters

other WeatherState

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(WeatherState, WeatherState)

Determines whether two weather snapshots have the same component values.

public static bool operator ==(WeatherState left, WeatherState right)

Parameters

left WeatherState

The first weather snapshot.

right WeatherState

The second weather snapshot.

Returns

bool

true when all condition weights are equal.

operator !=(WeatherState, WeatherState)

Determines whether two weather snapshots have different component values.

public static bool operator !=(WeatherState left, WeatherState right)

Parameters

left WeatherState

The first weather snapshot.

right WeatherState

The second weather snapshot.

Returns

bool

true when any condition weight differs.