Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3857f5983f | ||
|
|
88f50218a4 |
@@ -7,6 +7,8 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
|
bngsdk "github.com/ESilva15/gobngsdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -233,7 +235,7 @@ func (sdk *BeamNGSDK) HasRightIndicatorLight() bool {
|
|||||||
return sdk.Data.DashLights&DL_SIGNAL_R != 0
|
return sdk.Data.DashLights&DL_SIGNAL_R != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// AnyIndicator returns:
|
// HasAnyIndicatorLight returns:
|
||||||
// true if its available
|
// true if its available
|
||||||
// false if its unavailable
|
// false if its unavailable
|
||||||
func (sdk *BeamNGSDK) HasAnyIndicatorLight() bool {
|
func (sdk *BeamNGSDK) HasAnyIndicatorLight() bool {
|
||||||
@@ -262,3 +264,30 @@ func (sdk *BeamNGSDK) HasABSLight() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DashLights - functions to check if a given dash light is provided [END]
|
// 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&bngsdk.OG_TURBO != 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prefers km:
|
||||||
|
// true if true
|
||||||
|
// false if false
|
||||||
|
// wow
|
||||||
|
func (sdk *BeamNGSDK) PrefersKm() bool {
|
||||||
|
return sdk.Data.Flags&bngsdk.OG_KM != 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prefers BAR:
|
||||||
|
// true if true
|
||||||
|
// false if false
|
||||||
|
// wow
|
||||||
|
func (sdk *BeamNGSDK) PrefersBAR() bool {
|
||||||
|
return sdk.Data.Flags&bngsdk.OG_BAR != 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flags - functions to check if a given flag is ON [END]
|
||||||
|
|||||||
Reference in New Issue
Block a user