Merge pull request #12401 from Heroman3003/fiiiiix

Fixes weird char setup crash
This commit is contained in:
Casey
2022-03-08 10:58:28 +00:00
committed by CHOMPStation2
parent e3a4b3fb3f
commit 816a0ab80e
@@ -251,13 +251,19 @@ Talon jumpsuit
// undersuits
/datum/gear/uniform/undersuit
display_name = "undersuit selection"
path = /obj/item/clothing/under/undersuit
path = /obj/item/clothing/under/undersuit/
/datum/gear/uniform/undersuit/New()
..()
var/list/suits = list()
var/list/blacklisted_types = list(/obj/item/clothing/under/undersuit/sec, /obj/item/clothing/under/undersuit/sec/hos, /obj/item/clothing/under/undersuit/hazard, /obj/item/clothing/under/undersuit/command, /obj/item/clothing/under/undersuit/centcom)
for(var/obj/item/clothing/under/undersuit/undersuit_type as anything in typesof(/obj/item/clothing/under/undersuit) - blacklisted_types)
var/list/blacklisted_types = list(/obj/item/clothing/under/undersuit/sec,
/obj/item/clothing/under/undersuit/sec/hos,
/obj/item/clothing/under/undersuit/hazard,
/obj/item/clothing/under/undersuit/command,
/obj/item/clothing/under/undersuit/centcom)
for(var/obj/item/clothing/under/undersuit/undersuit_type as anything in typesof(/obj/item/clothing/under/undersuit))
if(undersuit_type in blacklisted_types)
continue
suits[initial(undersuit_type.name)] = undersuit_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(suits))
@@ -274,4 +280,4 @@ Talon jumpsuit
/datum/gear/uniform/undersuit_com
display_name = "undersuit, command (SM/HoP)"
allowed_roles = list("Site Manager", "Head of Personnel")
path = /obj/item/clothing/under/undersuit/command
path = /obj/item/clothing/under/undersuit/command