mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #576 from KasparoVy/overenswaggered
Fixes Only One Accessory Equipped at Spawn & in Character Preview
This commit is contained in:
@@ -387,7 +387,7 @@ var/global/datum/controller/occupations/job_master
|
||||
if(job)
|
||||
|
||||
//Equip custom gear loadout.
|
||||
var/list/custom_equip_slots = list() //If more than one item takes the same slot, all after the first one spawn in storage.
|
||||
var/list/custom_equip_slots = list()
|
||||
var/list/custom_equip_leftovers = list()
|
||||
if(H.client.prefs.gear && H.client.prefs.gear.len && !(job.mob_type & JOB_SILICON))
|
||||
for(var/thing in H.client.prefs.gear)
|
||||
@@ -420,14 +420,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, "<span class='notice'>Equipping you with \the [thing]!</span>")
|
||||
custom_equip_slots.Add(G.slot)
|
||||
if(G.slot != slot_tie)
|
||||
custom_equip_slots.Add(G.slot)
|
||||
else
|
||||
custom_equip_leftovers.Add(thing)
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user