/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
Bleeding-Edge
code/modules/spells/helpers.dm
44 строки
1 KB
adacovsk
Zombie buttons (#32608)
17 май 2022, 22:58
Не верифицирован
17 май 2022, 22:58
58a58c9
Код
Авторство
О чём код?
/* User_type * USER_TYPE_WIZARD : a classical wizard spell (found in simple spellbook) * USER_TYPE_CULT * USER_TYPE_GENETIC * USER_TYPE_XENOMORPH * USER_TYPE_MALFAI * USER_TYPE_VAMPIRE * USER_TYPE_SPELLBOOK : found in spellbooks * USER_TYPE_ARTIFACT : used by artifacts * USER_TYPE_NOUSER : generic/abstract spells * USER_TYPE_OTHER : misc (not debug) */ /proc/getAllSpellsByType(var/type) var/list/spell/spellList = list() for (var/type_S in typesof(/spell)) var/spell/S = type_S if (initial(S.user_type) == type) spellList += S return spellList /proc/getAllWizSpells() return getAllSpellsByType(USER_TYPE_WIZARD) /proc/getAllCultSpells() return getAllSpellsByType(USER_TYPE_CULT) /proc/getAllGeneticSpells() return getAllSpellsByType(USER_TYPE_GENETIC) /proc/getAllMalfSpells() return getAllSpellsByType(USER_TYPE_MALFAI) /proc/getAllPulseDemonSpells() return getAllSpellsByType(USER_TYPE_PULSEDEMON) /proc/getAllXenoSpells() return getAllSpellsByType(USER_TYPE_XENOMORPH) /proc/getAllZombieSpells() return getAllSpellsByType(USER_TYPE_ZOMBIE) /proc/getAllVampSpells() return getAllSpellsByType(USER_TYPE_VAMPIRE) /mob/proc/has_spell_with_flag(var/spell_flag) for(var/spell/S in spell_list) if(S.spell_aspect_flags & spell_flag) return S return 0