adds more loadout equipment, adds working ckey whitelist system, and more

This commit is contained in:
deathride58
2018-01-16 16:23:22 -05:00
parent b55a497ffc
commit b74518a24a
10 changed files with 159 additions and 20 deletions
@@ -1,4 +1,4 @@
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
@@ -13,7 +13,11 @@
var/permitted = TRUE
if(G.restricted_roles && G.restricted_roles.len && !(M.job in G.restricted_roles))
permitted = FALSE
if(G.ckeywhitelist && !(M.ckey in G.ckeywhitelist))
if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist))
permitted = FALSE
if(!equipbackpackstuff && G.category == slot_in_backpack)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
permitted = FALSE
if(equipbackpackstuff && G.category != slot_in_backpack)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
permitted = FALSE
if(!permitted)
continue