GaugeReading
public readonly struct GaugeReadingNamespace Chassis.Api
Added in 1.2.0
One value of a gauge source, and whether this peer knows it.
A value is not valid when this peer cannot know it: the throttle of a car an NPC drives on a client, the odometer before the host’s first update, a mod source that threw. Gauges hold their last position while a value is not valid.
Fields
Section titled “Fields”public readonly float ValueAdded in 1.2.0
The value, in the unit of its source; 0 when not valid.
public readonly bool ValidAdded in 1.2.0
True when this peer knows the value.
Properties
Section titled “Properties”Invalid
Section titled “Invalid”public static GaugeReading Invalid { get; }Added in 1.2.0
A reading this peer does not know.
Constructors
Section titled “Constructors”GaugeReading
Section titled “GaugeReading”public GaugeReading(float value, bool valid)Added in 1.2.0
A reading with a value.
Methods
Section titled “Methods”ToString
Section titled “ToString”public override string ToString()Added in 1.2.0
The value with two decimals, or ”-” when not valid.