From 0fbcaf7a450c2a7c4aac952bd452a94cd85929ac Mon Sep 17 00:00:00 2001 From: KasparoVv <12377767+KasparoVy@users.noreply.github.com> Date: Sat, 17 Oct 2020 06:07:08 -0400 Subject: [PATCH] Fixes Only One Accessory Equipped at Spawn & in Character Preview (#7727) Ported from https://github.com/Aurorastation/Aurora.3/pull/10205, credit to fernerr Now you can see all the accessories (within standard equipping logic) you've selected in the character preview. Addditionally, these accessories will now all be equipped when you spawn instead of filling your backpack unless it's actually necessary. --- code/game/jobs/job_controller.dm | 5 +++-- code/modules/mob/new_player/preferences_setup.dm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 84ffad7d2b..30a27d19ad 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -391,14 +391,15 @@ var/global/datum/controller/occupations/job_master I.implant_loadout(H) continue - // Try desperately (and sorta poorly) to equip the item + // Try desperately (and sorta poorly) to equip the item. Now with increased desperation! if(G.slot && !(G.slot in custom_equip_slots)) var/metadata = H.client.prefs.gear[G.display_name] if(G.slot == slot_wear_mask || G.slot == slot_wear_suit || G.slot == slot_head) custom_equip_leftovers += thing else if(H.equip_to_slot_or_del(G.spawn_item(H, metadata), G.slot)) to_chat(H, "Equipping you with \the [thing]!") - custom_equip_slots.Add(G.slot) + if(G.slot != slot_tie) + custom_equip_slots.Add(G.slot) else custom_equip_leftovers.Add(thing) else diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index e9a2355d2a..803b2002c7 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -220,7 +220,7 @@ break if((equip_preview_mob & EQUIP_PREVIEW_LOADOUT) && !(previewJob && (equip_preview_mob & EQUIP_PREVIEW_JOB) && (previewJob.type == /datum/job/ai || previewJob.type == /datum/job/cyborg))) - var/list/equipped_slots = list() //If more than one item takes the same slot only spawn the first + var/list/equipped_slots = list() for(var/thing in gear) var/datum/gear/G = gear_datums[thing] if(G) @@ -243,7 +243,8 @@ if(G.slot && !(G.slot in equipped_slots)) var/metadata = gear[G.display_name] if(mannequin.equip_to_slot_or_del(G.spawn_item(mannequin, metadata), G.slot)) - equipped_slots += G.slot + if(G.slot != slot_tie) + equipped_slots += G.slot if((equip_preview_mob & EQUIP_PREVIEW_JOB) && previewJob) mannequin.job = previewJob.title