Files
Polaris/code/modules/admin/secrets/admin_secrets/prison_warp.dm
TheFurryFeline 96e9358564 Orange Is The New Orange Part 2
Refactors prison jumpsuit slightly to not be a child of the orange jumpsuit, which in turn gets its own sprite. Left/right hand uniforms don't seem to be applying in-game when carrying the suits but that's not too bad of an issue. Uniform on the mob shows properly and works with sleeves rolled and uniform rolled down.
2019-09-07 12:30:41 -04:00

39 lines
1.2 KiB
Plaintext

/datum/admin_secret_item/admin_secret/prison_warp
name = "Prison Warp"
/datum/admin_secret_item/admin_secret/prison_warp/can_execute(var/mob/user)
if(!ticker) return 0
return ..()
/datum/admin_secret_item/admin_secret/prison_warp/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/mob/living/carbon/human/H in mob_list)
var/turf/T = get_turf(H)
var/security = 0
if((T && T in using_map.admin_levels) || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
continue
H.Paralyse(5)
if(H.wear_id)
var/obj/item/weapon/card/id/id = H.get_idcard()
for(var/A in id.access)
if(A == access_security)
security++
if(!security)
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in H)
if(istype(W, /obj/item/organ/external))
continue
//don't strip organs
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
else
//teleport security person
H.loc = pick(prisonsecuritywarp)
prisonwarped += H