Skip to content

Commit

Permalink
Update outfit.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
LenSkozzy authored Sep 4, 2023
1 parent 19c50b8 commit 384f1f3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions code/datums/outfits/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,14 @@ var/global/list/outfits_decls_by_type_
/decl/hierarchy/outfit/proc/equip(mob/living/carbon/human/H, var/rank, var/assignment, var/equip_adjustments)
equip_base(H, equip_adjustments)

rank = id_pda_assignment || rank
assignment = id_pda_assignment || assignment || rank
var/obj/item/card/id/W = equip_id(H, rank, assignment, equip_adjustments)
if(W)
rank = W.rank
assignment = W.assignment
equip_pda(H, rank, assignment, equip_adjustments)

for(var/path in backpack_contents)
var/number = backpack_contents[path]
for(var/i=0,i<number,i++)
H.equip_to_slot_or_store_or_drop(new path(H), slot_in_backpack_str)

if(!(OUTFIT_ADJUSTMENT_SKIP_POST_EQUIP & equip_adjustments))
post_equip(H)
H.update_icon()
if(W) // We set ID info last to ensure the ID photo is as correct as possible.
H.set_id_info(W)

return 1

/decl/hierarchy/outfit/proc/equip_base(mob/living/carbon/human/H, var/equip_adjustments)
Expand Down Expand Up @@ -191,10 +181,13 @@ var/global/list/outfits_decls_by_type_
W.rank = rank
if(assignment)
W.assignment = assignment
H.update_icon()
H.set_id_info(W)
equip_pda(H, rank, assignment, equip_adjustments)
if(H.equip_to_slot_or_store_or_drop(W, id_slot))
return W


/decl/hierarchy/outfit/proc/equip_pda(var/mob/living/carbon/human/H, var/rank, var/assignment, var/equip_adjustments)
if(!pda_slot || !pda_type)
return
Expand Down

0 comments on commit 384f1f3

Please sign in to comment.