diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index f4566e51014..fcb6554a5cc 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -213,6 +213,26 @@ GLOBAL_LIST_EMPTY(mannequins)
if(S.spawn_flags & SPECIES_IS_WHITELISTED)
GLOB.whitelisted_species += S.name
+ // Suit cyclers
+ paths = subtypesof(/datum/suit_cycler_choice/department)
+ for(var/path in paths)
+ var/datum/suit_cycler_choice/SCC = path
+ if(!initial(SCC.name))
+ continue
+ GLOB.suit_cycler_departments += new path()
+ paths = subtypesof(/datum/suit_cycler_choice/species)
+ for(var/path in paths)
+ var/datum/suit_cycler_choice/SCC = path
+ if(!initial(SCC.name))
+ continue
+ GLOB.suit_cycler_species += new path()
+ paths = subtypesof(/datum/suit_cycler_choice/department/emag)
+ for(var/path in paths)
+ var/datum/suit_cycler_choice/SCC = path
+ if(!initial(SCC.name))
+ continue
+ GLOB.suit_cycler_emagged += new path()
+
//Ores
paths = subtypesof(/ore)
for(var/oretype in paths)
diff --git a/code/game/machinery/suit_cycler_datums.dm b/code/game/machinery/suit_cycler_datums.dm
new file mode 100644
index 00000000000..a6151683323
--- /dev/null
+++ b/code/game/machinery/suit_cycler_datums.dm
@@ -0,0 +1,305 @@
+GLOBAL_LIST_EMPTY(suit_cycler_departments)
+GLOBAL_LIST_EMPTY(suit_cycler_species)
+GLOBAL_LIST_EMPTY(suit_cycler_emagged)
+
+/datum/suit_cycler_choice
+ var/name = null
+
+/datum/suit_cycler_choice/department
+ /// Name of the choice in the suit cycler menu
+ name = null
+ /// Type path of the suit to produce
+ var/suit_becomes
+ /// Type path of the helmet to produce
+ var/helmet_becomes
+
+/datum/suit_cycler_choice/department/proc/can_refit_helmet(obj/item/clothing/head/helmet/helmet)
+ return !!helmet_becomes
+
+/datum/suit_cycler_choice/department/proc/do_refit_helmet(obj/item/clothing/head/helmet/helmet)
+ var/obj/item/clothing/tmp = new helmet_becomes()
+ helmet.name = "refitted [tmp.name]"
+ helmet.desc = tmp.desc
+ helmet.icon_state = tmp.icon_state
+ helmet.item_state = tmp.item_state
+ helmet.item_state_slots = tmp.item_state_slots?.Copy()
+ helmet.sprite_sheets = tmp.sprite_sheets?.Copy()
+ helmet.sprite_sheets_obj = tmp.sprite_sheets_obj?.Copy()
+ helmet.default_worn_icon = tmp.default_worn_icon
+
+/datum/suit_cycler_choice/department/proc/can_refit_suit(obj/item/clothing/suit/space/suit)
+ return !!suit_becomes
+
+/datum/suit_cycler_choice/department/proc/do_refit_suit(obj/item/clothing/suit/space/suit)
+ var/obj/item/clothing/tmp = new suit_becomes()
+ suit.name = "refitted [tmp.name]"
+ suit.desc = tmp.desc
+ suit.icon_state = tmp.icon_state
+ suit.item_state = tmp.item_state
+ suit.item_state_slots = tmp.item_state_slots?.Copy()
+ suit.sprite_sheets = tmp.sprite_sheets?.Copy()
+ suit.sprite_sheets_obj = tmp.sprite_sheets_obj?.Copy()
+ suit.default_worn_icon = tmp.default_worn_icon
+
+// Ye olde 'noop' choice for refits
+/datum/suit_cycler_choice/department/noop
+ name = "No Change"
+/datum/suit_cycler_choice/department/noop/can_refit_helmet(obj/item/clothing/head/helmet/helmet)
+ return TRUE
+/datum/suit_cycler_choice/department/noop/do_refit_helmet(obj/item/clothing/head/helmet/helmet)
+ return
+/datum/suit_cycler_choice/department/noop/can_refit_suit(obj/item/clothing/suit/space/suit)
+ return TRUE
+/datum/suit_cycler_choice/department/noop/do_refit_suit(obj/item/clothing/suit/space/suit)
+ return
+
+
+
+/datum/suit_cycler_choice/department/eng/standard
+ name = "Engineering"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/engineering
+ suit_becomes = /obj/item/clothing/suit/space/void/engineering
+/datum/suit_cycler_choice/department/eng/hazmat
+ name = "HAZMAT"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/engineering/hazmat
+ suit_becomes = /obj/item/clothing/suit/space/void/engineering/hazmat
+/datum/suit_cycler_choice/department/eng/construction
+ name = "Construction"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/engineering/construction
+ suit_becomes = /obj/item/clothing/suit/space/void/engineering/construction
+/datum/suit_cycler_choice/department/eng/reinforced
+ name = "Reinforced"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/engineering/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/engineering/alt
+/datum/suit_cycler_choice/department/eng/salvager
+ name = "Salvager"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/engineering/salvage
+ suit_becomes = /obj/item/clothing/suit/space/void/engineering/salvage
+/datum/suit_cycler_choice/department/eng/atmospherics
+ name = "Atmospherics"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/atmos
+ suit_becomes = /obj/item/clothing/suit/space/void/atmos
+/datum/suit_cycler_choice/department/eng/heavyduty
+ name = "Heavy Duty Atmospherics"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/atmos/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/atmos/alt
+
+/datum/suit_cycler_choice/department/crg/mining
+ name = "Mining"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/mining
+ suit_becomes = /obj/item/clothing/suit/space/void/mining
+/datum/suit_cycler_choice/department/crg/frontiermining
+ name = "Frontier Miner"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/mining/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/mining/alt
+
+/datum/suit_cycler_choice/department/med/standard
+ name = "Medical"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/medical
+ suit_becomes = /obj/item/clothing/suit/space/void/medical
+/datum/suit_cycler_choice/department/med/biohazard
+ name = "Biohazard"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/medical/bio
+ suit_becomes = /obj/item/clothing/suit/space/void/medical/bio
+/datum/suit_cycler_choice/department/med/emt
+ name = "Emergency Medical Response"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/medical/emt
+ suit_becomes = /obj/item/clothing/suit/space/void/medical/emt
+/datum/suit_cycler_choice/department/med/streamlined
+ name = "Vey-Medical Streamlined"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/medical/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/medical/alt
+
+/datum/suit_cycler_choice/department/sec/standard
+ name = "Security"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/security
+ suit_becomes = /obj/item/clothing/suit/space/void/security
+/datum/suit_cycler_choice/department/sec/riot
+ name = "Crowd Control"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/security/riot
+ suit_becomes = /obj/item/clothing/suit/space/void/security/riot
+/datum/suit_cycler_choice/department/sec/eva
+ name = "Security EVA"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/security/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/security/alt
+
+/datum/suit_cycler_choice/department/exp/standard
+ name = "Exploration"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/exploration
+ suit_becomes = /obj/item/clothing/suit/space/void/exploration
+/datum/suit_cycler_choice/department/exp/medic
+ name = "Field Medic"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/expedition_medical
+ suit_becomes = /obj/item/clothing/suit/space/void/expedition_medical
+/datum/suit_cycler_choice/department/exp/old
+ name = "Old Exploration"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/exploration/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/exploration/alt
+
+/datum/suit_cycler_choice/department/pil/pilot
+ name = "Pilot"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/pilot
+ suit_becomes = /obj/item/clothing/suit/space/void/pilot
+/datum/suit_cycler_choice/department/pil/pilot_blue
+ name = "Pilot Blue"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/pilot/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/pilot/alt
+
+/datum/suit_cycler_choice/department/captain
+ name = "Manager"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/captain
+ suit_becomes = /obj/item/clothing/suit/space/void/captain
+
+/datum/suit_cycler_choice/department/prototype
+ name = "Prototype"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/security/prototype
+ suit_becomes = /obj/item/clothing/suit/space/void/security/prototype
+
+/datum/suit_cycler_choice/department/emag/merc
+ name = "^%###^%$" || "Mercenary"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/merc
+ suit_becomes = /obj/item/clothing/suit/space/void/merc
+/datum/suit_cycler_choice/department/emag/pyro
+ name = "Charring"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/merc/fire
+ suit_becomes = /obj/item/clothing/suit/space/void/merc/fire
+
+/datum/suit_cycler_choice/department/wizard
+ name = "Gem-Encrusted" || "Wizard"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/wizard
+ suit_becomes = /obj/item/clothing/suit/space/void/wizard
+
+/datum/suit_cycler_choice/department/vintage/crew
+ name = "Vintage Crew"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb
+/datum/suit_cycler_choice/department/vintage/eng
+ name = "Vintage Engineering"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/engineering
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/engineering
+/datum/suit_cycler_choice/department/vintage/marine
+ name = "Vintage Marine"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/marine
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/marine
+/datum/suit_cycler_choice/department/vintage/officer
+ name = "Vintage Officer"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/officer
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/officer
+
+/datum/suit_cycler_choice/department/vintage/research
+ name = "Vintage Research (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/research/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/research
+/datum/suit_cycler_choice/department/vintage/research/ch
+ name = "Vintage Research (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/research
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/research
+/datum/suit_cycler_choice/department/vintage/med
+ name = "Vintage Medical (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/medical/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/medical
+/datum/suit_cycler_choice/department/vintage/med/ch
+ name = "Vintage Medical (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/medical
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/medical
+
+/datum/suit_cycler_choice/department/vintage/merc
+ name = "Vintage Mercenary"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/mercenary
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/mercenary
+
+/datum/suit_cycler_choice/department/vintage/pilot
+ name = "Vintage Pilot (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/pilot
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/pilot
+/datum/suit_cycler_choice/department/vintage/pilot/ch
+ name = "Vintage Pilot (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/pilot/alt
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/pilot
+
+
+
+/datum/suit_cycler_choice/department/talon/crew
+ name = "Talon Crew"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/talon
+/datum/suit_cycler_choice/department/talon/eng
+ name = "Talon Engineering"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/engineering/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/engineering/talon
+/datum/suit_cycler_choice/department/talon/med
+ name = "Talon Medical (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/medical/alt/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/medical/talon
+/datum/suit_cycler_choice/department/talon/med/ch
+ name = "Talon Medical (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/medical/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/medical/talon
+/datum/suit_cycler_choice/department/talon/officer
+ name = "Talon Officer"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/officer/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/officer/talon
+/datum/suit_cycler_choice/department/talon/pilot
+ name = "Talon Pilot (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/pilot/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/pilot/talon
+/datum/suit_cycler_choice/department/talon/pilot/ch
+ name = "Talon Pilot (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/pilot/alt/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/pilot/talon
+/datum/suit_cycler_choice/department/talon/res
+ name = "Talon Research (Bubble Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/research/alt/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/research/talon
+/datum/suit_cycler_choice/department/talon/res/ch
+ name = "Talon Research (Closed Helm)"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/research/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/research/talon
+/datum/suit_cycler_choice/department/talon/marine
+ name = "Talon Marine"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/marine/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/marine/talon
+/datum/suit_cycler_choice/department/talon/marine/alt
+ name = "Talon Mercenary"
+ helmet_becomes = /obj/item/clothing/head/helmet/space/void/refurb/mercenary/talon
+ suit_becomes = /obj/item/clothing/suit/space/void/refurb/mercenary/talon
+
+
+
+// Uses same logic as it used to, which is that it bases an assumption of 'we should have custom sprites' on
+// the presence of the species in the sprite_sheets_obj list on the helmet and suit
+/datum/suit_cycler_choice/species/proc/can_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit)
+ for(var/obj/item/clothing/C in list(helmet, suit))
+ if(C.sprite_sheets_obj[name])
+ if(!(C.icon_state in cached_icon_states(C.sprite_sheets_obj[name])))
+ return FALSE // Species was in sprite_sheets_obj, but had no sprite for this object in particular
+
+ return TRUE
+
+/datum/suit_cycler_choice/species/proc/do_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit)
+ for(var/obj/item/clothing/C in list(helmet, suit))
+ C.refit_for_species(name)
+
+/datum/suit_cycler_choice/species/noop
+ name = "No Change"
+/datum/suit_cycler_choice/species/noop/can_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit)
+ return TRUE
+/datum/suit_cycler_choice/species/noop/do_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit)
+ return
+
+/datum/suit_cycler_choice/species/human
+ name = SPECIES_HUMAN
+/datum/suit_cycler_choice/species/skrell
+ name = SPECIES_SKRELL
+/datum/suit_cycler_choice/species/unathi
+ name = SPECIES_UNATHI
+/datum/suit_cycler_choice/species/tajaran
+ name = SPECIES_TAJ
+/datum/suit_cycler_choice/species/teshari
+ name = SPECIES_TESHARI
+/datum/suit_cycler_choice/species/akula
+ name = SPECIES_AKULA
+/datum/suit_cycler_choice/species/sergal
+ name = SPECIES_SERGAL
+/datum/suit_cycler_choice/species/vulpkanin
+ name = SPECIES_VULPKANIN
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 73741f9e47e..ad89f1e4c63 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -11,11 +11,11 @@
density = 1
var/mob/living/carbon/human/OCCUPANT = null
var/obj/item/clothing/suit/space/SUIT = null
- var/SUIT_TYPE = null
+ var/suit_type = null
var/obj/item/clothing/head/helmet/space/HELMET = null
- var/HELMET_TYPE = null
+ var/helmet_type = null
var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n
- var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
+ var/mask_type = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
var/isopen = 0
var/islocked = 0
var/isUV = 0
@@ -29,18 +29,19 @@
//The units themselves/////////////////
/obj/machinery/suit_storage_unit/standard_unit
- SUIT_TYPE = /obj/item/clothing/suit/space
- HELMET_TYPE = /obj/item/clothing/head/helmet/space
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space
+ helmet_type = /obj/item/clothing/head/helmet/space
+ mask_type = /obj/item/clothing/mask/breath
-/obj/machinery/suit_storage_unit/New()
+/obj/machinery/suit_storage_unit/Initialize()
+ . = ..()
+ if(suit_type)
+ SUIT = new suit_type(src)
+ if(helmet_type)
+ HELMET = new helmet_type(src)
+ if(mask_type)
+ MASK = new mask_type(src)
update_icon()
- if(SUIT_TYPE)
- SUIT = new SUIT_TYPE(src)
- if(HELMET_TYPE)
- HELMET = new HELMET_TYPE(src)
- if(MASK_TYPE)
- MASK = new MASK_TYPE(src)
/obj/machinery/suit_storage_unit/update_icon()
var/hashelmet = 0
@@ -168,21 +169,9 @@
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
-// var/protected = 0
-// var/mob/living/carbon/human/H = user
if(!panelopen)
return
- /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
- if(H.gloves)
- var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G,/obj/item/clothing/gloves/yellow))
- protected = 1
-
- if(!protected)
- playsound(src, "sparks", 75, 1, -1)
- to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
- return*/
else //welp, the guy is protected, we can continue
if(issuperUV)
to_chat(user, "You slide the dial back towards \"185nm\".")
@@ -194,21 +183,9 @@
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
-// var/protected = 0
-// var/mob/living/carbon/human/H = user
if(!panelopen) //Needed check due to bugs
return
- /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
- if(H.gloves)
- var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G,/obj/item/clothing/gloves/yellow))
- protected = 1
-
- if(!protected)
- playsound(src, "sparks", 75, 1, -1)
- to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
- return*/
else
to_chat(user, "You push the button. The coloured LED next to it changes.")
safetieson = !safetieson
@@ -335,30 +312,6 @@
updateUsrDialog()
return
-/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
- if(HELMET)
- HELMET.clean_blood()
- if(SUIT)
- SUIT.clean_blood()
- if(MASK)
- MASK.clean_blood()
- isUV = 0 //Cycle ends
- update_icon()
- updateUsrDialog()
-
- var/i
- for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
- spawn(50)
- if(OCCUPANT)
- if(issuperUV)
- OCCUPANT.take_organ_damage(0,40)
- to_chat(user, "Test. You gave him 40 damage")
- else
- OCCUPANT.take_organ_damage(0,8)
- to_chat(user, "Test. You gave him 8 damage")
- return*/
-
-
/obj/machinery/suit_storage_unit/proc/cycletimeleft()
if(cycletime_left >= 1)
cycletime_left--
@@ -371,8 +324,6 @@
if(!OCCUPANT)
return
-// for(var/obj/O in src)
-// O.loc = src.loc
if(OCCUPANT.client)
if(user != OCCUPANT)
@@ -426,14 +377,10 @@
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
-// usr.metabslow = 1
OCCUPANT = usr
isopen = 0 //Close the thing after the guy gets inside
update_icon()
-// for(var/obj/O in src)
-// qdel(O)
-
add_fingerprint(usr)
updateUsrDialog()
return
@@ -475,8 +422,6 @@
OCCUPANT = M
isopen = 0 //close ittt
- //for(var/obj/O in src)
- // O.loc = src.loc
add_fingerprint(user)
qdel(G)
updateUsrDialog()
@@ -535,9 +480,10 @@
//////////////////////////////REMINDER: Make it lock once you place some fucker inside.
-//God this entire file is fucking awful
+//God this entire file is fucking awful //Yes
//Suit painter for Bay's special snowflake aliums.
+GLOBAL_LIST_EMPTY(suit_cycler_typecache)
/obj/machinery/suit_cycler
name = "suit cycler"
@@ -559,13 +505,31 @@
var/can_repair // If set, the cycler can repair voidsuits.
var/electrified = 0
- //Departments that the cycler can paint suits to look like.
- var/list/departments = list("Engineering","Mining","Medical","Security","Atmospherics","HAZMAT","Construction","Biohazard","Emergency Medical Response","Crowd Control","Security EVA")
- //Species that the suits can be configured to fit.
- var/list/species = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_TAJ, SPECIES_TESHARI)
+ /// Departments that the cycler can paint suits to look like. Null assumes all except specially excluded ones.
+ /// No idea why these particular suits are the default cycler's options.
+ var/list/limit_departments = list(
+ /datum/suit_cycler_choice/department/eng/standard,
+ /datum/suit_cycler_choice/department/crg/mining,
+ /datum/suit_cycler_choice/department/med/standard,
+ /datum/suit_cycler_choice/department/sec/standard,
+ /datum/suit_cycler_choice/department/eng/atmospherics,
+ /datum/suit_cycler_choice/department/eng/hazmat,
+ /datum/suit_cycler_choice/department/eng/construction,
+ /datum/suit_cycler_choice/department/med/biohazard,
+ /datum/suit_cycler_choice/department/med/emt,
+ /datum/suit_cycler_choice/department/sec/riot,
+ /datum/suit_cycler_choice/department/sec/eva
+ )
+
+ /// Species that the cycler can refit suits for. Null assumes all except specially excluded ones.
+ var/list/limit_species
- var/target_department
- var/target_species
+ var/list/departments
+ var/list/species
+ var/list/emagged_departments
+
+ var/datum/suit_cycler_choice/department/target_department
+ var/datum/suit_cycler_choice/species/target_species
var/mob/living/carbon/human/occupant = null
var/obj/item/clothing/suit/space/void/suit = null
@@ -573,96 +537,187 @@
var/datum/wires/suit_storage_unit/wires = null
-/obj/machinery/suit_cycler/New()
- ..()
+/obj/machinery/suit_cycler/Initialize()
+ . = ..()
+ departments = load_departments()
+ species = load_species()
+ emagged_departments = load_emagged()
+ limit_departments = null // just for mem
+
+ target_department = departments["No Change"]
+ target_species = species["No Change"]
+
+ if(!target_department || !target_species)
+ stat |= BROKEN
+
wires = new(src)
- target_department = departments[1]
- target_species = species[1]
- if(!target_department || !target_species) qdel(src)
/obj/machinery/suit_cycler/Destroy()
qdel(wires)
wires = null
return ..()
+/obj/machinery/suit_cycler/proc/load_departments()
+ var/list/typecache = GLOB.suit_cycler_typecache[type]
+ // First of our type
+ if(!typecache)
+ typecache = list()
+ GLOB.suit_cycler_typecache[type] = typecache
+ var/list/loaded = typecache["departments"]
+ // No departments loaded
+ if(!loaded)
+ loaded = list()
+ typecache["departments"] = loaded
+ for(var/datum/suit_cycler_choice/department/thing as anything in GLOB.suit_cycler_departments)
+ if(istype(thing, /datum/suit_cycler_choice/department/noop))
+ loaded[thing.name] = thing
+ continue
+ if(limit_departments && !is_type_in_list(thing, limit_departments))
+ continue
+ loaded[thing.name] = thing
+
+ return loaded
+
+/obj/machinery/suit_cycler/proc/load_species()
+ var/list/typecache = GLOB.suit_cycler_typecache[type]
+ // First of our type
+ if(!typecache)
+ typecache = list()
+ GLOB.suit_cycler_typecache[type] = typecache
+ var/list/loaded = typecache["species"]
+ // No species loaded
+ if(!loaded)
+ loaded = list()
+ typecache["species"] = loaded
+ for(var/datum/suit_cycler_choice/species/thing as anything in GLOB.suit_cycler_species)
+ if(istype(thing, /datum/suit_cycler_choice/species/noop))
+ loaded[thing.name] = thing
+ continue
+ if(limit_species && !is_type_in_list(thing, limit_species))
+ continue
+ loaded[thing.name] = thing
+
+ return loaded
+
+/obj/machinery/suit_cycler/proc/load_emagged()
+ var/list/typecache = GLOB.suit_cycler_typecache[type]
+ // First of our type
+ if(!typecache)
+ typecache = list()
+ GLOB.suit_cycler_typecache[type] = typecache
+ var/list/loaded = typecache["emagged"]
+ // No emagged loaded
+ if(!loaded)
+ loaded = list()
+ typecache["emagged"] = loaded
+ for(var/datum/suit_cycler_choice/department/thing as anything in GLOB.suit_cycler_emagged)
+ loaded[thing.name] = thing
+
+ return loaded
+
/obj/machinery/suit_cycler/refit_only
name = "Suit cycler"
desc = "A dedicated industrial machine that can refit voidsuits for different species, but not change the suit's overall appearance or departmental scheme."
model_text = "General Access"
req_access = null
- departments = list("No Change")
+ limit_departments = list()
/obj/machinery/suit_cycler/engineering
name = "Engineering suit cycler"
model_text = "Engineering"
req_access = list(access_construction)
- departments = list("Engineering","Atmospherics","HAZMAT","Construction","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/eng
+ )
/obj/machinery/suit_cycler/mining
name = "Mining suit cycler"
model_text = "Mining"
req_access = list(access_mining)
- departments = list("Mining","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/crg
+ )
/obj/machinery/suit_cycler/security
name = "Security suit cycler"
model_text = "Security"
req_access = list(access_security)
- departments = list("Security","Crowd Control","Security EVA","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/sec
+ )
/obj/machinery/suit_cycler/medical
name = "Medical suit cycler"
model_text = "Medical"
req_access = list(access_medical)
- departments = list("Medical","Biohazard","Emergency Medical Response","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/med
+ )
/obj/machinery/suit_cycler/syndicate
name = "Nonstandard suit cycler"
model_text = "Nonstandard"
req_access = list(access_syndicate)
- departments = list("Mercenary", "Charring","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/emag
+ )
can_repair = 1
/obj/machinery/suit_cycler/exploration
name = "Explorer suit cycler"
model_text = "Exploration"
- departments = list("Exploration","Expedition Medic","Old Exploration","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/exp
+ )
/obj/machinery/suit_cycler/pilot
name = "Pilot suit cycler"
model_text = "Pilot"
- departments = list("Pilot Blue","Pilot","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/pil
+ )
/obj/machinery/suit_cycler/vintage
name = "Vintage Crew suit cycler"
model_text = "Vintage"
- departments = list("Vintage Crew","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/vintage/crew
+ )
req_access = null
/obj/machinery/suit_cycler/vintage/pilot
name = "Vintage Pilot suit cycler"
model_text = "Vintage Pilot"
- departments = list("Vintage Pilot (Bubble Helm)","Vintage Pilot (Closed Helm)","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/vintage/pilot
+ )
/obj/machinery/suit_cycler/vintage/medsci
name = "Vintage MedSci suit cycler"
model_text = "Vintage MedSci"
- departments = list("Vintage Medical (Bubble Helm)","Vintage Medical (Closed Helm)","Vintage Research (Bubble Helm)","Vintage Research (Closed Helm)","No Change")
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/vintage/research,
+ /datum/suit_cycler_choice/department/vintage/med
+ )
/obj/machinery/suit_cycler/vintage/rugged
name = "Vintage Ruggedized suit cycler"
model_text = "Vintage Ruggedized"
- departments = list("Vintage Engineering","Vintage Marine","Vintage Officer","Vintage Mercenary","No Change")
+
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/vintage/eng,
+ /datum/suit_cycler_choice/department/vintage/marine,
+ /datum/suit_cycler_choice/department/vintage/officer,
+ /datum/suit_cycler_choice/department/vintage/merc
+ )
/obj/machinery/suit_cycler/vintage/omni
name = "Vintage Master suit cycler"
model_text = "Vintage Master"
- departments = list("Vintage Crew","Vintage Engineering","Vintage Pilot (Bubble Helm)","Vintage Pilot (Closed Helm)","Vintage Medical (Bubble Helm)","Vintage Medical (Closed Helm)","Vintage Research (Bubble Helm)","Vintage Research (Closed Helm)","Vintage Marine","Vintage Officer","Vintage Mercenary","No Change")
-
-/obj/machinery/suit_cycler/vintage/Initialize()
- species -= SPECIES_TESHARI
- return ..()
+ limit_departments = list(
+ /datum/suit_cycler_choice/department/vintage
+ )
/obj/machinery/suit_cycler/attack_ai(mob/user as mob)
return attack_hand(user)
@@ -807,8 +862,6 @@
//Clear the access reqs, disable the safeties, and open up all paintjobs.
to_chat(user, "You run the sequencer across the interface, corrupting the operating protocols.")
- departments = list("Engineering","Mining","Medical","Security","Atmospherics","HAZMAT","Construction","Biohazard","Crowd Control","Security EVA","Emergency Medical Response","^%###^%$", "Charring","No Change")
- species = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_TESHARI, SPECIES_AKULA, SPECIES_SERGAL, SPECIES_VULPKANIN) //VORESTATION EDIT
emagged = 1
safeties = 0
@@ -842,8 +895,6 @@
/obj/machinery/suit_cycler/tgui_data(mob/user)
var/list/data = list()
- data["departments"] = departments
- data["species"] = species
data["model_text"] = model_text
data["can_repair"] = can_repair
data["userHasAccess"] = allowed(user)
@@ -872,6 +923,28 @@
return data
+/obj/machinery/suit_cycler/tgui_static_data(mob/user)
+ var/list/data = list()
+
+ // tgui gets angy if you pass values too
+ var/list/department_keys = list()
+ for(var/key in departments)
+ department_keys += key
+
+ // emagged at the bottom
+ if(emagged)
+ for(var/key in emagged_departments)
+ department_keys += key
+
+ var/list/species_keys = list()
+ for(var/key in species)
+ species_keys += key
+
+ data["departments"] = department_keys
+ data["species"] = species_keys
+
+ return data
+
/obj/machinery/suit_cycler/tgui_act(action, params)
if(..())
return TRUE
@@ -890,13 +963,15 @@
if("department")
var/choice = params["department"]
if(choice in departments)
- target_department = choice
+ target_department = departments[choice]
+ else if(emagged && (choice in emagged_departments))
+ target_department = emagged_departments[choice]
. = TRUE
if("species")
var/choice = params["species"]
if(choice in species)
- target_species = choice
+ target_species = species[choice]
. = TRUE
if("radlevel")
@@ -1035,227 +1110,22 @@
return
-//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z
-//hold onto your hat, this sumbitch just got streamlined -KK
+// "Streamlined" before? Ok. -Aro
/obj/machinery/suit_cycler/proc/apply_paintjob()
- var/obj/item/clothing/head/helmet/parent_helmet
- var/obj/item/clothing/suit/space/parent_suit
- var/turf/T = get_turf(src)
if(!target_species || !target_department)
return
- //Now "Complete" with most departmental and variant suits, and sorted by department. These aren't available in the standard or emagged cycler lists because they're incomplete for most species.
- switch(target_department)
- if("No Change")
- parent_helmet = helmet
- parent_suit = suit
- //Engineering and Engineering Variants
- if("Engineering")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/engineering
- parent_suit = /obj/item/clothing/suit/space/void/engineering
- if("HAZMAT")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/engineering/hazmat
- parent_suit = /obj/item/clothing/suit/space/void/engineering/hazmat
- if("Construction")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/engineering/construction
- parent_suit = /obj/item/clothing/suit/space/void/engineering/construction
- if("Reinforced")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/engineering/alt
- parent_suit = /obj/item/clothing/suit/space/void/engineering/alt
- if("Salvager")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/engineering/salvage
- parent_suit = /obj/item/clothing/suit/space/void/engineering/salvage
- if("Atmospherics")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/atmos
- parent_suit = /obj/item/clothing/suit/space/void/atmos
- if("Heavy Duty Atmospherics")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/atmos/alt
- parent_suit = /obj/item/clothing/suit/space/void/atmos/alt
- //Mining and Mining Variants
- if("Mining")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/mining
- parent_suit = /obj/item/clothing/suit/space/void/mining
- if("Frontier Miner")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/mining/alt
- parent_suit = /obj/item/clothing/suit/space/void/mining/alt
- //Medical and Medical Variants
- if("Medical")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/medical
- parent_suit = /obj/item/clothing/suit/space/void/medical
- if("Biohazard")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/medical/bio
- parent_suit = /obj/item/clothing/suit/space/void/medical/bio
- if("Emergency Medical Response")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/medical/emt
- parent_suit = /obj/item/clothing/suit/space/void/medical/emt
- if("Vey-Medical Streamlined")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/medical/alt
- parent_suit = /obj/item/clothing/suit/space/void/medical/alt
- //Security and Security Variants
- if("Security")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/security
- parent_suit = /obj/item/clothing/suit/space/void/security
- if("Crowd Control")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/security/riot
- parent_suit = /obj/item/clothing/suit/space/void/security/riot
- if("Security EVA")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/security/alt
- parent_suit = /obj/item/clothing/suit/space/void/security/alt
- //Exploration Department
- if("Exploration")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/exploration
- parent_suit = /obj/item/clothing/suit/space/void/exploration
- if("Field Medic")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/expedition_medical
- parent_suit = /obj/item/clothing/suit/space/void/expedition_medical
- if("Old Exploration")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/exploration/alt
- parent_suit = /obj/item/clothing/suit/space/void/exploration/alt
- if("Pilot")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/pilot
- parent_suit = /obj/item/clothing/suit/space/void/pilot
- if("Pilot Blue")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/pilot/alt
- parent_suit = /obj/item/clothing/suit/space/void/pilot/alt
- //Antag Suits
- if("^%###^%$" || "Mercenary")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/merc
- parent_suit = /obj/item/clothing/suit/space/void/merc
- if("Charring")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/merc/fire
- parent_suit = /obj/item/clothing/suit/space/void/merc/fire
- if("Gem-Encrusted" || "Wizard")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/wizard
- parent_suit = /obj/item/clothing/suit/space/void/wizard
- //Special or Event suits
- if("Vintage Crew")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb
- parent_suit = /obj/item/clothing/suit/space/void/refurb
- if("Vintage Engineering")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/engineering
- parent_suit = /obj/item/clothing/suit/space/void/refurb/engineering
- if("Vintage Medical (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/medical/alt
- parent_suit = /obj/item/clothing/suit/space/void/refurb/medical
- if("Vintage Medical (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/medical
- parent_suit = /obj/item/clothing/suit/space/void/refurb/medical
- if("Vintage Marine")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/marine
- parent_suit = /obj/item/clothing/suit/space/void/refurb/marine
- if("Vintage Officer")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/officer
- parent_suit = /obj/item/clothing/suit/space/void/refurb/officer
- if("Vintage Pilot (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/pilot
- parent_suit = /obj/item/clothing/suit/space/void/refurb/pilot
- if("Vintage Pilot (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/pilot/alt
- parent_suit = /obj/item/clothing/suit/space/void/refurb/pilot
- if("Vintage Research (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/research/alt
- parent_suit = /obj/item/clothing/suit/space/void/refurb/research
- if("Vintage Research (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/research
- parent_suit = /obj/item/clothing/suit/space/void/refurb/research
- if("Vintage Mercenary")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/mercenary
- parent_suit = /obj/item/clothing/suit/space/void/refurb/mercenary
- //BEGIN: Space for additional downstream variants
- //VOREStation Addition Start
- if("Manager")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/captain
- parent_suit = /obj/item/clothing/suit/space/void/captain
- if("Prototype")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/security/prototype
- parent_suit = /obj/item/clothing/suit/space/void/security/prototype
- if("Talon Crew")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/talon
- if("Talon Engineering")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/engineering/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/engineering/talon
- if("Talon Medical (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/medical/alt/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/medical/talon
- if("Talon Medical (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/medical/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/medical/talon
- if("Talon Marine")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/marine/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/marine/talon
- if("Talon Officer")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/officer/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/officer/talon
- if("Talon Pilot (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/pilot/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/pilot/talon
- if("Talon Pilot (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/pilot/alt/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/pilot/talon
- if("Talon Research (Bubble Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/research/alt/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/research/talon
- if("Talon Research (Closed Helm)")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/research/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/research/talon
- if("Talon Mercenary")
- parent_helmet = /obj/item/clothing/head/helmet/space/void/refurb/mercenary/talon
- parent_suit = /obj/item/clothing/suit/space/void/refurb/mercenary/talon
- //VOREStation Addition End
- //END: downstream variant space
- if(target_species)
- //Only run these checks if they have a sprite sheet defined, otherwise they use human's anyways, and there is almost definitely a sprite.
- if((helmet!=null&&(target_species in helmet.sprite_sheets_obj))||(suit!=null&&(target_species in suit.sprite_sheets_obj)))
- //Making sure all of our items have the sprites to be refitted.
- var/helmet_check = ((helmet!=null && (initial(parent_helmet.icon_state) in icon_states(helmet.sprite_sheets_obj[target_species],1))) || helmet==null)
- //If the helmet exists, only return true if there's also sprites for it. If the helmet doesn't exist, return true.
- var/suit_check = ((suit!=null && (initial(parent_suit.icon_state) in icon_states(suit.sprite_sheets_obj[target_species],1))) || suit==null)
- var/suit_helmet_check = ((suit!=null && suit.helmet!=null && (initial(parent_helmet.icon_state) in icon_states(suit.helmet.sprite_sheets_obj[target_species],1))) || suit==null || suit.helmet==null)
- if(helmet_check && suit_check && suit_helmet_check)
- if(helmet)
- helmet.refit_for_species(target_species)
- if(suit)
- suit.refit_for_species(target_species)
- if(suit.helmet)
- suit.helmet.refit_for_species(target_species)
- else
- //If they don't, alert the user and stop here.
- T.visible_message("[bicon(src)]Unable to apply specified cosmetics with specified species. Please try again with a different species or cosmetic option selected.")
- return
- else
- if(helmet)
- helmet.refit_for_species(target_species)
- if(suit)
- suit.refit_for_species(target_species)
- if(suit.helmet)
- suit.helmet.refit_for_species(target_species)
- //look at this! isn't it beautiful? -KK (well ok not beautiful but it's a lot cleaner)
- if(helmet && target_department != "No Change")
- var/obj/item/clothing/H = new parent_helmet
- helmet.name = "refitted [initial(parent_helmet.name)]"
- helmet.desc = initial(parent_helmet.desc)
- helmet.icon_state = initial(parent_helmet.icon_state)
- helmet.item_state = initial(parent_helmet.item_state)
- helmet.light_overlay = initial(parent_helmet.light_overlay)
- helmet.item_state_slots = H.item_state_slots
- qdel(H)
-
- if(suit && target_department != "No Change")
- var/obj/item/clothing/S = new parent_suit
- suit.name = "refitted [initial(parent_suit.name)]"
- suit.desc = initial(parent_suit.desc)
- suit.icon_state = initial(parent_suit.icon_state)
- suit.item_state = initial(parent_suit.item_state)
- suit.item_state_slots = S.item_state_slots
- qdel(S)
-
- //can't believe I forgot to fix this- now helmets will properly cycle if they're attached to a suit -KK
- if(suit.helmet && target_department != "No Change")
- var/obj/item/clothing/AH = new parent_helmet
- suit.helmet.name = "refitted [initial(parent_helmet.name)]"
- suit.helmet.desc = initial(parent_helmet.desc)
- suit.helmet.icon_state = initial(parent_helmet.icon_state)
- suit.helmet.item_state = initial(parent_helmet.item_state)
- suit.helmet.light_overlay = initial(parent_helmet.light_overlay)
- suit.helmet.item_state_slots = AH.item_state_slots
- qdel(AH)
+ if(suit?.helmet)
+ visible_message("[bicon(src)]Separate the suit and helmet before applying any customizations.")
+ return
+
+ if(helmet && target_department.can_refit_helmet(helmet))
+ target_department.do_refit_helmet(helmet)
+ if(suit && target_department.can_refit_suit(suit))
+ target_department.do_refit_suit(suit)
+
+ if(target_species.can_refit_to(helmet, suit))
+ target_species.do_refit_to(helmet, suit)
+ else
+ visible_message("[bicon(src)]Unable to apply specified cosmetics with specified species. Please try again with a different species or cosmetic option selected.")
+ return
+
\ No newline at end of file
diff --git a/code/game/machinery/suit_storage_unit_vr.dm b/code/game/machinery/suit_storage_unit_vr.dm
index 3a7a9b5b8b3..4337096a687 100644
--- a/code/game/machinery/suit_storage_unit_vr.dm
+++ b/code/game/machinery/suit_storage_unit_vr.dm
@@ -1,12 +1,7 @@
-/obj/machinery/suit_cycler
- departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Emergency Medical Response","Crowd Control","Exploration","Pilot Blue","Pilot","Manager","Prototype","No Change")
- species = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_TESHARI, SPECIES_AKULA, SPECIES_SERGAL, SPECIES_VULPKANIN)
-
// Old Exploration is too WIP to use right now
/obj/machinery/suit_cycler/exploration
req_access = null
req_one_access = list(access_explorer,access_medical_equip)
- departments = list("Exploration","Field Medic","No Change")
/obj/machinery/suit_cycler/pilot
req_access = list(access_pilot)
@@ -15,54 +10,46 @@
name = "Manager suit cycler"
model_text = "Manager"
req_access = list(access_captain)
- departments = list("Manager","No Change")
-
-/obj/machinery/suit_cycler/captain/Initialize() //No Teshari Sprites
- species -= SPECIES_TESHARI
- return ..()
+ departments = list(/datum/suit_cycler_choice/department/captain)
/obj/machinery/suit_cycler/prototype
name = "Prototype suit cycler"
model_text = "Prototype"
req_access = list(access_hos)
- departments = list("Prototype","No Change")
-
-/obj/machinery/suit_cycler/prototype/Initialize() //No Teshari Sprites
- species -= SPECIES_TESHARI
- return ..()
+ departments = list(/datum/suit_cycler_choice/department/prototype)
/obj/machinery/suit_cycler/vintage/tcrew
name = "Talon crew suit cycler"
model_text = "Talon crew"
req_access = list(access_talon)
- departments = list("Talon Crew","No Change")
+ departments = list(/datum/suit_cycler_choice/department/talon/crew)
/obj/machinery/suit_cycler/vintage/tpilot
name = "Talon pilot suit cycler"
model_text = "Talon pilot"
req_access = list(access_talon)
- departments = list("Talon Pilot (Bubble Helm)","Talon Pilot (Closed Helm)","No Change")
+ departments = list(/datum/suit_cycler_choice/department/talon/pilot)
/obj/machinery/suit_cycler/vintage/tengi
name = "Talon engineer suit cycler"
model_text = "Talon engineer"
req_access = list(access_talon)
- departments = list("Talon Engineering","No Change")
+ departments = list(/datum/suit_cycler_choice/department/talon/eng)
/obj/machinery/suit_cycler/vintage/tguard
name = "Talon guard suit cycler"
model_text = "Talon guard"
req_access = list(access_talon)
- departments = list("Talon Marine","Talon Mercenary","No Change")
+ departments = list(/datum/suit_cycler_choice/department/talon/marine)
/obj/machinery/suit_cycler/vintage/tmedic
name = "Talon doctor suit cycler"
model_text = "Talon doctor"
req_access = list(access_talon)
- departments = list("Talon Medical (Bubble Helm)","Talon Medical (Closed Helm)","No Change")
+ departments = list(/datum/suit_cycler_choice/department/talon/med)
/obj/machinery/suit_cycler/vintage/tcaptain
name = "Talon captain suit cycler"
model_text = "Talon captain"
req_access = list(access_talon)
- departments = list("Talon Officer","No Change")
\ No newline at end of file
+ departments = list(/datum/suit_cycler_choice/department/talon/officer)
\ No newline at end of file
diff --git a/code/modules/clothing/spacesuits/void/void_vr.dm b/code/modules/clothing/spacesuits/void/void_vr.dm
index 8e1f9b543f6..262bc1e6dc7 100644
--- a/code/modules/clothing/spacesuits/void/void_vr.dm
+++ b/code/modules/clothing/spacesuits/void/void_vr.dm
@@ -7,62 +7,14 @@
/obj/item/clothing/head/helmet/space/void
species_restricted = list(SPECIES_HUMAN, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
- sprite_sheets = list(
- SPECIES_TAJ = 'icons/inventory/head/mob_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/head/mob_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/head/mob_unathi.dmi',
- SPECIES_TESHARI = 'icons/inventory/head/mob_teshari.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/head/mob_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/head/mob_akula.dmi',
- SPECIES_SERGAL = 'icons/inventory/head/mob_sergal.dmi',
- SPECIES_NEVREAN = 'icons/inventory/head/mob_sergal.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/head/mob_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/head/mob_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/head/mob_vulpkanin.dmi'
- )
- sprite_sheets_obj = list(
- SPECIES_TAJ = 'icons/inventory/head/item_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/head/item_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/head/item_unathi.dmi',
- SPECIES_TESHARI = 'icons/inventory/head/item_teshari.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/head/item_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/head/item_akula.dmi',
- SPECIES_SERGAL = 'icons/inventory/head/item_sergal.dmi',
- SPECIES_NEVREAN = 'icons/inventory/head/item_sergal.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/head/item_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/head/item_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/head/item_vulpkanin.dmi'
- )
+ sprite_sheets = VR_SPECIES_SPRITE_SHEETS_HEAD_MOB
+ sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_HEAD_ITEM
/obj/item/clothing/suit/space/void
species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
- sprite_sheets = list(
- SPECIES_TAJ = 'icons/inventory/suit/mob_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/suit/mob_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/suit/mob_unathi.dmi',
- SPECIES_TESHARI = 'icons/inventory/suit/mob_teshari.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/suit/mob_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/suit/mob_akula.dmi',
- SPECIES_SERGAL = 'icons/inventory/suit/mob_sergal.dmi',
- SPECIES_NEVREAN = 'icons/inventory/suit/mob_sergal.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/suit/mob_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/suit/mob_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/suit/mob_vulpkanin.dmi'
- )
- sprite_sheets_obj = list(
- SPECIES_TAJ = 'icons/inventory/suit/item_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/suit/item_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/suit/item_unathi.dmi',
- SPECIES_TESHARI = 'icons/inventory/suit/item_teshari.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/suit/item_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/suit/item_akula.dmi',
- SPECIES_SERGAL = 'icons/inventory/suit/item_sergal.dmi',
- SPECIES_NEVREAN = 'icons/inventory/suit/item_sergal.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/suit/item_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/suit/item_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/suit/item_vulpkanin.dmi'
- )
-
+ sprite_sheets = VR_SPECIES_SPRITE_SHEETS_SUIT_MOB
+ sprite_sheets_obj = VR_SPECIES_SPRITE_SHEETS_SUIT_ITEM
+
// This is a hack to prevent the item_state variable on the suits from taking effect
// when the item is equipped in outer clothing slot.
// This variable is normally used to set the icon_override when the suit is refitted,
@@ -152,33 +104,9 @@
breach_threshold = 6 //this thing is basically tissue paper
w_class = ITEMSIZE_NORMAL //if it's snug, high-tech, and made of relatively soft materials, it should be much easier to store!
default_worn_icon = 'icons/inventory/suit/mob_vr.dmi'
-
-/obj/item/clothing/suit/space/void/autolok
- sprite_sheets = list(
- SPECIES_HUMAN = 'icons/inventory/suit/mob_vr.dmi',
- SPECIES_TAJ = 'icons/inventory/suit/mob_vr_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/suit/mob_vr_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/suit/mob_vr_unathi.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/suit/mob_vr_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/suit/mob_vr_unathi.dmi',
- SPECIES_SERGAL = 'icons/inventory/suit/mob_vr_unathi.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',
- SPECIES_TESHARI = 'icons/inventory/suit/mob_vr_teshari.dmi'
- )
- sprite_sheets_obj = list(
- SPECIES_TAJ = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_SKRELL = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_UNATHI = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_AKULA = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_SERGAL = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_FENNEC = 'icons/inventory/suit/item_vr.dmi',
- SPECIES_TESHARI = 'icons/inventory/suit/item_vr.dmi'
- )
+ sprite_sheets = ALL_VR_SPRITE_SHEETS_SUIT_MOB
+ sprite_sheets_obj = null
+ sprite_sheets_refit = null
/obj/item/clothing/suit/space/void/autolok/Initialize()
. = ..()
@@ -232,31 +160,7 @@
species_restricted = list("exclude",SPECIES_DIONA,SPECIES_VOX) //this thing can autoadapt too
flags_inv = HIDEEARS|BLOCKHAIR //removed HIDEFACE/MASK/EYES flags so sunglasses or facemasks don't disappear. still gotta have BLOCKHAIR or it'll clip out tho.
default_worn_icon = 'icons/inventory/head/mob_vr.dmi'
-
-/obj/item/clothing/head/helmet/space/void/autolok
- sprite_sheets = list(
- SPECIES_HUMAN = 'icons/inventory/head/mob_vr.dmi',
- SPECIES_TAJ = 'icons/inventory/head/mob_vr_tajaran.dmi',
- SPECIES_SKRELL = 'icons/inventory/head/mob_vr_skrell.dmi',
- SPECIES_UNATHI = 'icons/inventory/head/mob_vr_unathi.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/head/mob_vr_unathi.dmi',
- SPECIES_AKULA = 'icons/inventory/head/mob_vr_unathi.dmi',
- SPECIES_SERGAL = 'icons/inventory/head/mob_vr_unathi.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/head/mob_vr_vulpkanin.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/head/mob_vr_vulpkanin.dmi',
- SPECIES_FENNEC = 'icons/inventory/head/mob_vr_vulpkanin.dmi',
- SPECIES_TESHARI = 'icons/inventory/head/mob_vr_teshari.dmi'
- )
- sprite_sheets_obj = list(
- SPECIES_TAJ = 'icons/inventory/head/item_vr.dmi',
- SPECIES_SKRELL = 'icons/inventory/head/item_vr.dmi',
- SPECIES_UNATHI = 'icons/inventory/head/item_vr.dmi',
- SPECIES_XENOHYBRID = 'icons/inventory/head/item_vr.dmi',
- SPECIES_AKULA = 'icons/inventory/head/item_vr.dmi',
- SPECIES_SERGAL = 'icons/inventory/head/item_vr.dmi',
- SPECIES_VULPKANIN = 'icons/inventory/head/item_vr.dmi',
- SPECIES_ZORREN_HIGH = 'icons/inventory/head/item_vr.dmi',
- SPECIES_FENNEC = 'icons/inventory/head/item_vr.dmi',
- SPECIES_TESHARI = 'icons/inventory/head/item_vr.dmi'
- )
- sprite_sheets_refit = list() //have to nullify this as well just to be thorough
\ No newline at end of file
+ sprite_sheets = ALL_VR_SPRITE_SHEETS_HEAD_MOB
+ sprite_sheets_obj = null
+ sprite_sheets_refit = null
+
\ No newline at end of file
diff --git a/vorestation.dme b/vorestation.dme
index 9c3afafbf13..10e91475fe4 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -867,6 +867,7 @@
#include "code\game\machinery\spaceheater.dm"
#include "code\game\machinery\status_display.dm"
#include "code\game\machinery\status_display_ai.dm"
+#include "code\game\machinery\suit_cycler_datums.dm"
#include "code\game\machinery\suit_storage_unit.dm"
#include "code\game\machinery\suit_storage_unit_vr.dm"
#include "code\game\machinery\supply_display.dm"