Created
April 10, 2017 16:19
-
-
Save pennyworth12345/828c8f157030d7b98cee7cde5ca230fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colourBlindModes = [ | |
"Normal", | |
"Protanopia", | |
"Protanomaly", | |
"Deuteranopia", | |
"Deuteranomaly", | |
"Tritanopia", | |
"Tritanomaly", | |
"Achromatopsia", | |
"Achromatomaly" | |
]; | |
currentMode = 0; | |
nextModeActionID = player addAction ["Next Mode", { | |
currentMode = currentMode + 1; | |
if (currentMode isEqualTo count colourBlindModes - 1) then { | |
currentMode = 0; | |
}; | |
STHud_ColourBlindMode = (colourBlindModes select currentMode); | |
[STHud_ColourBlindMode] call STHud_Colour_Blind_Cache; | |
hint str STHud_ColourBlindMode; | |
}]; | |
previousModeID = player addAction ["Previous Mode", { | |
currentMode = currentMode - 1; | |
if (currentMode isEqualTo -1) then { | |
currentMode = count colourBlindModes - 1; | |
}; | |
STHud_ColourBlindMode = (colourBlindModes select currentMode); | |
[STHud_ColourBlindMode] call STHud_Colour_Blind_Cache; | |
hint str STHud_ColourBlindMode; | |
}]; | |
removeAddActionsID = player addAction ["Remove addActions", { | |
player removeAction nextModeActionID; | |
player removeAction previousModeID; | |
player removeAction removeAddActionsID; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment