mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Generalised PDA naming
This commit is contained in:
@@ -286,7 +286,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/obj/item/device/pda/PDA = A
|
||||
if(PDA.owner == oldname)
|
||||
PDA.owner = newname
|
||||
PDA.name = "PDA-[newname] ([PDA.ownjob])"
|
||||
PDA.update_label()
|
||||
if(!search_id) break
|
||||
search_pda = 0
|
||||
|
||||
|
||||
@@ -366,16 +366,13 @@ var/global/datum/controller/occupations/job_master
|
||||
C.assignment = rank
|
||||
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
|
||||
H.equip_to_slot_or_del(C, slot_wear_id)
|
||||
/* if(prob(50))
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen(H), slot_r_store)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen/blue(H), slot_r_store)*/
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
|
||||
if(locate(/obj/item/device/pda,H))//I bet this could just use locate. It can --SkyMarshal
|
||||
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
|
||||
pda.owner = H.real_name
|
||||
pda.ownjob = C.assignment
|
||||
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
|
||||
pda.update_label()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
slot_flags = SLOT_ID | SLOT_BELT
|
||||
|
||||
//Main variables
|
||||
var/owner = null
|
||||
var/owner = null // String name of owner
|
||||
var/default_cartridge = 0 // Access level defined by cartridge
|
||||
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
|
||||
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
|
||||
@@ -216,6 +216,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
cartridge = new default_cartridge(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/device/pda/proc/update_label()
|
||||
name = "PDA-[owner] ([ownjob])" //Name generalisation
|
||||
|
||||
/obj/item/device/pda/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(user.stat || user.restrained() || user.paralysis || user.stunned || user.weakened)
|
||||
@@ -472,7 +475,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
id_check(U, 1)
|
||||
if("UpdateInfo")
|
||||
ownjob = id.assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
update_label()
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
var/turf/T = loc
|
||||
@@ -848,7 +851,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!owner)
|
||||
owner = idcard.registered_name
|
||||
ownjob = idcard.assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
update_label()
|
||||
user << "<span class='notice'>Card scanned.</span>"
|
||||
else
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
|
||||
@@ -672,7 +672,7 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
var/obj/item/device/pda/P = new(M)
|
||||
P.owner = M.real_name
|
||||
P.ownjob = "Assistant"
|
||||
P.name = "PDA-[M.real_name] (Assistant)"
|
||||
P.update_label()
|
||||
M.equip_to_slot_or_del(P, slot_belt)
|
||||
|
||||
|
||||
@@ -856,7 +856,7 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Reaper"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
pda.update_label()
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_belt)
|
||||
|
||||
@@ -927,7 +927,7 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Centcom Official"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
pda.update_label()
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_r_store)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user