Converts jobs and admin equipment to use outfits (#5827)

Converts the jobs and admin equipment to use outfit datums.
This commit is contained in:
Werner
2019-02-19 23:58:05 +02:00
committed by Erki
parent 1bc27306a0
commit b823b4eb05
38 changed files with 1802 additions and 1447 deletions
+13 -9
View File
@@ -319,7 +319,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/Initialize(mapload)
. = ..()
PDAs += src
if(!(src in PDAs))
PDAs += src
if (!mapload)
try_sort_pda_list()
if(default_cartridge)
@@ -1227,12 +1228,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "<span class='notice'>\The [src] rejects the ID.</span>"
return
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
ownrank = idcard.rank
name = "PDA-[owner] ([ownjob])"
user << "<span class='notice'>Card scanned.</span>"
try_sort_pda_list()
update_userinfo(idcard,user)
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
@@ -1256,6 +1252,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
return
/obj/item/device/pda/proc/update_userinfo(var/obj/item/weapon/card/id/idcard, var/mob/living/user)
owner = idcard.registered_name
ownjob = idcard.assignment
ownrank = idcard.rank
name = "PDA-[owner] ([ownjob])"
if(user)
to_chat(user, "<span class='notice'>Card scanned.</span>")
try_sort_pda_list()
/obj/item/device/pda/attack(mob/living/C as mob, mob/living/user as mob)
if (istype(C, /mob/living/carbon))
switch(scanmode)
@@ -1398,8 +1403,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/Destroy()
PDAs -= src
if (src.id && prob(90)) //IDs are kept in 90% of the cases
src.id.forceMove(get_turf(src.loc))
QDEL_NULL(id)
QDEL_NULL(pen)
if (LAZYLEN(linked_consoles))
for(var/A in linked_consoles)
+1 -1
View File
@@ -144,7 +144,7 @@
var/choice = input("Do you wish to become a Vox? This is not reversible.") as null|anything in list("No","Yes")
if(choice == "Yes")
user.set_species("Vox")
user.species.equip_survival_gear(user)
user.species.before_equip(user)
var/newname = sanitizeSafe(input(user,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if(!newname || newname == "")