Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
Added option for slowing lights now, sorry took so long.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDaGree committed Nov 24, 2018
1 parent a7589e8 commit a36ba51
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
84 changes: 42 additions & 42 deletions client/patterns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][1]) then
done[1] = true
Expand All @@ -153,7 +153,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][2]) then
done[2] = true
Expand All @@ -177,7 +177,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][3]) then
done[3] = true
Expand All @@ -201,7 +201,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][4]) then
done[4] = true
Expand All @@ -225,7 +225,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][5]) then
done[5] = true
Expand All @@ -249,7 +249,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][6]) then
done[6] = true
Expand All @@ -273,7 +273,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][7]) then
done[7] = true
Expand All @@ -297,7 +297,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][8]) then
done[8] = true
Expand All @@ -321,7 +321,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][9]) then
done[9] = true
Expand All @@ -345,7 +345,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageOne[pattern][10]) then
done[10] = true
Expand All @@ -369,7 +369,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][1]) then
done[1] = true
Expand All @@ -393,7 +393,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][2]) then
done[2] = true
Expand All @@ -417,7 +417,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][3]) then
done[3] = true
Expand All @@ -441,7 +441,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][4]) then
done[4] = true
Expand All @@ -465,7 +465,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][5]) then
done[5] = true
Expand All @@ -489,7 +489,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][6]) then
done[6] = true
Expand All @@ -513,7 +513,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][7]) then
done[7] = true
Expand All @@ -537,7 +537,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][8]) then
done[8] = true
Expand All @@ -561,7 +561,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][9]) then
done[9] = true
Expand All @@ -585,7 +585,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageTwo[pattern][10]) then
done[10] = true
Expand All @@ -609,7 +609,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][1]) then
done[1] = true
Expand All @@ -633,7 +633,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][2]) then
done[2] = true
Expand All @@ -657,7 +657,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][3]) then
done[3] = true
Expand All @@ -681,7 +681,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][4]) then
done[4] = true
Expand All @@ -705,7 +705,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][5]) then
done[5] = true
Expand All @@ -729,7 +729,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][6]) then
done[6] = true
Expand All @@ -753,7 +753,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][7]) then
done[7] = true
Expand All @@ -777,7 +777,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][8]) then
done[8] = true
Expand All @@ -801,7 +801,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][9]) then
done[9] = true
Expand All @@ -825,7 +825,7 @@ function runCHPPattern(k, pattern, stage)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(chp_StageThree[pattern][10]) then
done[10] = true
Expand Down Expand Up @@ -870,7 +870,7 @@ function runTrafPattern(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(traf_Patterns[pattern][7]) then
done[1] = true
Expand All @@ -894,7 +894,7 @@ function runTrafPattern(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(traf_Patterns[pattern][8]) then
done[2] = true
Expand All @@ -918,7 +918,7 @@ function runTrafPattern(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(traf_Patterns[pattern][9]) then
done[3] = true
Expand Down Expand Up @@ -966,7 +966,7 @@ function runLedPatternSecondary(k, pattern)
end
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_SecondaryPatterns[pattern][7]) then
done[1] = true
Expand Down Expand Up @@ -994,7 +994,7 @@ function runLedPatternSecondary(k, pattern)
end
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_SecondaryPatterns[pattern][8]) then
done[2] = true
Expand All @@ -1021,7 +1021,7 @@ function runLedPatternSecondary(k, pattern)
end
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_SecondaryPatterns[pattern][9]) then
done[3] = true
Expand Down Expand Up @@ -1065,7 +1065,7 @@ function runLedPatternWarning(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(leds_WarningPatterns[pattern][5]) then
done[1] = true
Expand All @@ -1089,7 +1089,7 @@ function runLedPatternWarning(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(leds_WarningPatterns[pattern][6]) then
done[2] = true
Expand Down Expand Up @@ -1134,7 +1134,7 @@ function runLedPatternPrimary(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_PrimaryPatterns[pattern][1]) then
done[1] = true
Expand All @@ -1158,7 +1158,7 @@ function runLedPatternPrimary(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_PrimaryPatterns[pattern][2]) then
done[2] = true
Expand All @@ -1182,7 +1182,7 @@ function runLedPatternPrimary(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_PrimaryPatterns[pattern][3]) then
done[3] = true
Expand All @@ -1206,7 +1206,7 @@ function runLedPatternPrimary(k, pattern)
break
end

Wait(0)
Wait(lightDelay)

if spot == string.len(led_PrimaryPatterns[pattern][4]) then
done[4] = true
Expand Down
2 changes: 2 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ printDebugInformation = true

vehicleSyncDistance = 150
envirementLightBrightness = 0.006
lightDelay = 20 -- Time in MS


panelType = "original"
panelOffsetX = 0.0
Expand Down

0 comments on commit a36ba51

Please sign in to comment.