Rewrote switch statement

Per @Glowbal's comment
This commit is contained in:
SAM 2015-05-09 10:53:09 +02:00
parent 7201a23d41
commit bba216ebd2

View File

@ -20,24 +20,22 @@
PARAMS_1(_index);
private ["_return"];
_return = 0;
// change to if () exitWith {};?
switch (_index) do
_return = switch (_index) do
{
case 0: {_return = 1500;};
case 1: {_return = 2000;};
case 2: {_return = 2500;};
case 3: {_return = 3000;};
case 4: {_return = 3500;};
case 5: {_return = 4000;};
case 6: {_return = 5000;};
case 7: {_return = 6000;};
case 8: {_return = 7000;};
case 9: {_return = 8000;};
case 10: {_return = 9000;};
case 11: {_return = 10000;};
default {hint "something broke!";}; // should replace with something a bit more graceful
case 0: {1500};
case 1: {2000};
case 2: {2500};
case 3: {3000};
case 4: {3500};
case 5: {4000};
case 6: {5000};
case 7: {6000};
case 8: {7000};
case 9: {8000};
case 10: {9000};
case 11: {10000};
default {1000};
};
_return;