summaryrefslogtreecommitdiff
path: root/scripts/led.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/led.lua')
-rw-r--r--scripts/led.lua89
1 files changed, 44 insertions, 45 deletions
diff --git a/scripts/led.lua b/scripts/led.lua
index 3f53380..67572d1 100644
--- a/scripts/led.lua
+++ b/scripts/led.lua
@@ -1,45 +1,44 @@
--- Part of SLIMax Mgr II - Lua Script v2.2.1
--- Copyright (c)2012-2013 by Zappadoc - All Rights Reserved.
--- Use this script to patch std led behaviors (i.e lowfuel, flags, damage, rev limit, ...)
--- created by Zappadoc - 2012-11-10
-
--- Display led event
--- params:
--- idx = led index (assigned in settings)
--- state = the std state of the led; activated if > 0
--- ledFunction: the corresponding function
--- 1=LowFuel
--- 2=TC
--- 3=ABS
--- 4=Green Flag
--- 5=Yellow flag
--- 6=Red Flag
--- 7=Over Heating
--- 8=Damage
--- 9=Pit request
--- 10=Power
--- 11=Rev Limit
--- 12=HeadLights
--- 13=Blue Flag
--- 14=DRS
--- 15=Safe Prefs
-
-function ledEvent(idx, ledFunction, state)
- -- call custom script
- local result = custom_ledEvent(idx, ledFunction, state)
- -- if result = 0 bypass the script below and return 0
- -- if result = 1 bypass the script below and return 1
- if result <= 1 then return result end
- -- if result >= 2 continue
-
- -- call global custom script
- result = global_custom_ledEvent(idx, ledFunction, state)
- -- if result = 0 bypass the script below and return 0
- -- if result = 1 bypass the script below and return 1
- if result <= 1 then return result end
- -- if result >= 2 continue
-
- -- return 0 to use std behaviors
- return 0
-end
- \ No newline at end of file
+-- Part of SLIMax Mgr II - Lua Script v2.2.1
+-- Copyright (c)2012-2013 by Zappadoc - All Rights Reserved.
+-- Use this script to patch std led behaviors (i.e lowfuel, flags, damage, rev limit, ...)
+-- created by Zappadoc - 2012-11-10
+
+-- Display led event
+-- params:
+-- idx = led index (assigned in settings)
+-- state = the std state of the led; activated if > 0
+-- ledFunction: the corresponding function
+-- 1=LowFuel
+-- 2=TC
+-- 3=ABS
+-- 4=Green Flag
+-- 5=Yellow flag
+-- 6=Red Flag
+-- 7=Over Heating
+-- 8=Damage
+-- 9=Pit request
+-- 10=Power
+-- 11=Rev Limit
+-- 12=HeadLights
+-- 13=Blue Flag
+-- 14=DRS
+-- 15=Safe Prefs
+
+function ledEvent(idx, ledFunction, state)
+ -- call custom script
+ local result = custom_ledEvent(idx, ledFunction, state)
+ -- if result = 0 bypass the script below and return 0
+ -- if result = 1 bypass the script below and return 1
+ if result <= 1 then return result end
+ -- if result >= 2 continue
+
+ -- call global custom script
+ result = global_custom_ledEvent(idx, ledFunction, state)
+ -- if result = 0 bypass the script below and return 0
+ -- if result = 1 bypass the script below and return 1
+ if result <= 1 then return result end
+ -- if result >= 2 continue
+
+ -- return 0 to use std behaviors
+ return 0
+end