diff --git a/code/__DEFINES/_ss220.dm b/code/__DEFINES/_ss220.dm index 0cf3257d7da9..157be2bea08b 100644 --- a/code/__DEFINES/_ss220.dm +++ b/code/__DEFINES/_ss220.dm @@ -1,5 +1,14 @@ #define MODPACK_CHAT_BADGES +#define SEC_LEVEL_GREEN 0 +#define SEC_LEVEL_BLUE 1 +#define SEC_LEVEL_VIOLET 2 +#define SEC_LEVEL_ORANGE 3 +#define SEC_LEVEL_RED 4 +#define SEC_LEVEL_GAMMA 5 +#define SEC_LEVEL_EPSILON 6 +#define SEC_LEVEL_DELTA 7 + // TODO: someday preferences will use TGUI and you will probably be able to move it to modular_ss220\_defines220\code\preferences_defines.dm /// Interacts with the toggles220 bitflag #define PREFTOGGLE_TOGGLE220 220 diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 3397cd677170..2f95a33c6e64 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -4,12 +4,10 @@ //Security levels #define SEC_LEVEL_GREEN 0 #define SEC_LEVEL_BLUE 1 -#define SEC_LEVEL_VIOLET 2 -#define SEC_LEVEL_ORANGE 3 -#define SEC_LEVEL_RED 4 -#define SEC_LEVEL_GAMMA 5 -#define SEC_LEVEL_EPSILON 6 -#define SEC_LEVEL_DELTA 7 +#define SEC_LEVEL_RED 2 +#define SEC_LEVEL_GAMMA 3 +#define SEC_LEVEL_EPSILON 4 +#define SEC_LEVEL_DELTA 5 //Click cooldowns, in tenths of a second #define CLICK_CD_MELEE 8 diff --git a/modular_ss220/modular_ss220.dme b/modular_ss220/modular_ss220.dme index fbb18418eb6d..b706d43c3dfe 100644 --- a/modular_ss220/modular_ss220.dme +++ b/modular_ss220/modular_ss220.dme @@ -108,3 +108,8 @@ ---------------------------------------------------------------------*/ // #include "crit_rework/_crit_rework.dme" + +// --- TESTING --- // +#ifdef UNIT_TESTS +#include "unit_tests/_unit_tests.dme" +#endif diff --git a/modular_ss220/unit_tests/_unit_tests.dm b/modular_ss220/unit_tests/_unit_tests.dm new file mode 100644 index 000000000000..8f2f60e3a195 --- /dev/null +++ b/modular_ss220/unit_tests/_unit_tests.dm @@ -0,0 +1,4 @@ +/datum/modpack/unit_tests + name = "Тестирование" + desc = "Здесь тестируется все, что стоит протестировать" + author = "Maxiemar" diff --git a/modular_ss220/unit_tests/_unit_tests.dme b/modular_ss220/unit_tests/_unit_tests.dme new file mode 100644 index 000000000000..914dcab04345 --- /dev/null +++ b/modular_ss220/unit_tests/_unit_tests.dme @@ -0,0 +1,3 @@ +#include "_unit_tests.dm" + +#include "code/security_levels.dm" diff --git a/modular_ss220/unit_tests/code/security_levels.dm b/modular_ss220/unit_tests/code/security_levels.dm new file mode 100644 index 000000000000..fe23d671bcc2 --- /dev/null +++ b/modular_ss220/unit_tests/code/security_levels.dm @@ -0,0 +1,19 @@ +/datum/unit_test/security_levels + +/datum/unit_test/security_levels/Run() + security_levels_order() + +/datum/unit_test/security_levels/proc/security_levels_order() + var/list/expected = list( + new /datum/security_level/green, + new /datum/security_level/blue, + new /datum/security_level/violet, + new /datum/security_level/orange, + new /datum/security_level/red, + new /datum/security_level/gamma, + new /datum/security_level/epsilon, + new /datum/security_level/delta + ) + var/list/actual = SSsecurity_level.available_levels + if(!compare_list(expected, actual)) + Fail("Security levels order is invalid.\nExpected: [expected]\nActual: [actual]")