mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Converts jobs and admin equipment to use outfits (#5827)
Converts the jobs and admin equipment to use outfit datums.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user