diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-15 17:27:33 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-15 17:27:33 +0100 |
commit | 11da2520ff2d0c610d9324ef1688fca54bfd12b7 (patch) | |
tree | dfba7c837783edf723c482aac2457e7332088ef2 /scripts/gugus/gear.lua | |
parent | f1d1ed5ddda21ffe735e49a400405fc02079564d (diff) |
[Gugus scripts] reorganization.
Diffstat (limited to 'scripts/gugus/gear.lua')
-rw-r--r-- | scripts/gugus/gear.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/gugus/gear.lua b/scripts/gugus/gear.lua new file mode 100644 index 0000000..463449a --- /dev/null +++ b/scripts/gugus/gear.lua @@ -0,0 +1,32 @@ +function custom_gearEvent(gear) + -- manage gear when ´E´ + if gear == 69 then + local ignition = 1 + if GetContextInfo("simulation") == "rFactor2.exe" then + ignition = GetCarInfo("ignition") + end + local g = GetCarInfo("gear") + + --print ( string.format("gear %d/ignition %d" , g, ignition)) + + toggleAllLed(0) + if ignition == 2 then + SetLeftDigits(" ---- ") + SetRightDigits(" ---- ") + else + SetLeftDigits(" ") + SetRightDigits(" ") + end + + if ignition == 0 then + SetGearDigit(" ") + elseif ignition == 1 then + SetGearDigit(GetCurrentGear()) + end + + SLISendReport(1) + return 1 + end + + return 2 +end |