3 Commits
Author SHA1 Message Date
esilva 31140b5df4 API fix. Copied something without looking twice and broke it. Fixed
Docstring fixes
2026-06-30 23:52:14 +01:00
esilva 3857f5983f added the API for the outgauge flag fields 2026-06-30 23:47:02 +01:00
esilva 88f50218a4 Function doc fix 2026-06-30 23:42:59 +01:00
+28 -1
View File
@@ -233,7 +233,7 @@ func (sdk *BeamNGSDK) HasRightIndicatorLight() bool {
return sdk.Data.DashLights&DL_SIGNAL_R != 0
}
// AnyIndicator returns:
// HasAnyIndicatorLight returns:
// true if its available
// false if its unavailable
func (sdk *BeamNGSDK) HasAnyIndicatorLight() bool {
@@ -262,3 +262,30 @@ func (sdk *BeamNGSDK) HasABSLight() bool {
}
// DashLights - functions to check if a given dash light is provided [END]
// Flags - functions to check if a given flag is ON [START]
// HasTurbo returns:
// true if the car has a turbo
// false if it doesn't
func (sdk *BeamNGSDK) HasTurbo() bool {
return sdk.Data.Flags&OG_TURBO != 0
}
// PrefersKm returns:
// true if true
// false if false
// wow
func (sdk *BeamNGSDK) PrefersKm() bool {
return sdk.Data.Flags&OG_KM != 0
}
// PrefersBAR returns:
// true if true
// false if false
// wow
func (sdk *BeamNGSDK) PrefersBAR() bool {
return sdk.Data.Flags&OG_BAR != 0
}
// Flags - functions to check if a given flag is ON [END]