mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
More optimizations for character joins
This commit is contained in:
@@ -260,11 +260,13 @@
|
||||
ResetPDAManifest()
|
||||
var/icon/front
|
||||
var/icon/side
|
||||
var/icon/charicon = cached_character_icon(H)
|
||||
front = icon(charicon, dir = SOUTH)
|
||||
side = icon(charicon, dir = WEST)
|
||||
if(H)
|
||||
var/icon/charicon = cached_character_icon(H)
|
||||
front = icon(charicon, dir = SOUTH)
|
||||
side = icon(charicon, dir = WEST)
|
||||
|
||||
if(!id) id = text("[]", add_zero(num2hex(rand(1, 65536)), 4))
|
||||
if(!id)
|
||||
id = text("[]", add_zero(num2hex(rand(1, 65536)), 4))
|
||||
var/datum/data/record/G = new /datum/data/record()
|
||||
G.name = "Employee Record #[id]"
|
||||
G.fields["name"] = "New Record"
|
||||
|
||||
@@ -101,7 +101,6 @@ var/list/outfits_decls_by_type_
|
||||
H.equip_to_slot_or_del(new path(H), slot_in_backpack)
|
||||
|
||||
post_equip(H)
|
||||
H.regenerate_icons()
|
||||
if(W) // We set ID info last to ensure the ID photo is as correct as possible.
|
||||
H.set_id_info(W)
|
||||
return 1
|
||||
@@ -158,15 +157,18 @@ var/list/outfits_decls_by_type_
|
||||
W.rank = rank
|
||||
if(assignment)
|
||||
W.assignment = assignment
|
||||
H.set_id_info(W)
|
||||
if(H.equip_to_slot_or_del(W, id_slot))
|
||||
return W
|
||||
|
||||
/decl/hierarchy/outfit/proc/equip_pda(mob/living/carbon/human/H, assignment)
|
||||
/decl/hierarchy/outfit/proc/equip_pda(mob/living/carbon/human/H, rank, assignment)
|
||||
if(!pda_slot || !pda_type)
|
||||
return
|
||||
var/obj/item/device/pda/pda = new pda_type(H)
|
||||
if(H.equip_to_slot_or_del(pda, pda_slot))
|
||||
pda.owner = H.real_name
|
||||
pda.ownjob = assignment
|
||||
pda.ownrank = rank
|
||||
pda.name = "PDA-[H.real_name] ([assignment])"
|
||||
return pda
|
||||
|
||||
/decl/hierarchy/outfit/dd_SortValue()
|
||||
|
||||
Reference in New Issue
Block a user