From 602de64abc33189edbd456f2974f1b5005998695 Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Sun, 21 Jun 2020 20:48:06 +0100 Subject: [PATCH 1/2] Update suit_storage_unit.dm --- code/game/machinery/suit_storage_unit.dm | 34 ++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index a79126be551..c3b3fb2a099 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -612,6 +612,13 @@ wires = null return ..() +/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") + /obj/machinery/suit_cycler/engineering name = "Engineering suit cycler" model_text = "Engineering" @@ -820,7 +827,7 @@ //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") + 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 @@ -1043,10 +1050,16 @@ if(target_species) if(helmet) helmet.refit_for_species(target_species) - if(suit) suit.refit_for_species(target_species) + if(suit) + suit.refit_for_species(target_species) + if(suit.helmet) + suit.helmet.refit_for_species(target_species) //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 @@ -1201,7 +1214,7 @@ //END: downstream variant space //look at this! isn't it beautiful? -KK (well ok not beautiful but it's a lot cleaner) - if(helmet) + 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) @@ -1211,11 +1224,22 @@ helmet.item_state_slots = H.item_state_slots qdel(H) - if(suit) + 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 + 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) From a1507ad0ac60817d0c4b6f54a19bdda3b0a7691b Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Thu, 25 Jun 2020 11:43:37 +0100 Subject: [PATCH 2/2] no_cycle logic --- code/game/machinery/suit_storage_unit.dm | 12 +++++++++++- code/modules/clothing/spacesuits/void/station.dm | 2 ++ code/modules/clothing/spacesuits/void/void.dm | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index c3b3fb2a099..718b71b6443 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -748,7 +748,8 @@ updateUsrDialog() return - else if(istype(I,/obj/item/clothing/head/helmet/space) && !istype(I, /obj/item/clothing/head/helmet/space/rig)) + else if(istype(I,/obj/item/clothing/head/helmet/space/void) && !istype(I, /obj/item/clothing/head/helmet/space/rig)) + var/obj/item/clothing/head/helmet/space/void/IH = I if(locked) to_chat(user, "The suit cycler is locked.") @@ -758,6 +759,10 @@ to_chat(user, "The cycler already contains a helmet.") return + if(IH.no_cycle) + to_chat(user, "That item is not compatible with the cycler's protocols.") + return + if(I.icon_override == CUSTOM_ITEM_MOB) to_chat(user, "You cannot refit a customised voidsuit.") return @@ -784,6 +789,7 @@ return else if(istype(I,/obj/item/clothing/suit/space/void)) + var/obj/item/clothing/suit/space/void/IS = I if(locked) to_chat(user, "The suit cycler is locked.") @@ -793,6 +799,10 @@ to_chat(user, "The cycler already contains a voidsuit.") return + if(IS.no_cycle) + to_chat(user, "That item is not compatible with the cycler's protocols.") + return + if(I.icon_override == CUSTOM_ITEM_MOB) to_chat(user, "You cannot refit a customised voidsuit.") return diff --git a/code/modules/clothing/spacesuits/void/station.dm b/code/modules/clothing/spacesuits/void/station.dm index 4191d65aadf..4ec3a49a2d1 100644 --- a/code/modules/clothing/spacesuits/void/station.dm +++ b/code/modules/clothing/spacesuits/void/station.dm @@ -162,6 +162,7 @@ icon_state = "rig0-medicalalt" armor = list(melee = 20, bullet = 5, laser = 20,energy = 5, bomb = 15, bio = 100, rad = 30) light_overlay = "helmet_light_dual_blue" + no_cycle = TRUE /obj/item/clothing/suit/space/void/medical/alt icon_state = "rig-medicalalt" @@ -169,6 +170,7 @@ desc = "A more recent model of Vey-Med voidsuit, exchanging physical protection for fully unencumbered movement and a complete range of motion." slowdown = 0 armor = list(melee = 20, bullet = 5, laser = 20,energy = 5, bomb = 15, bio = 100, rad = 30) + no_cycle = TRUE //Security /obj/item/clothing/head/helmet/space/void/security diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 1fddf1116b2..d92b1351eee 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -28,6 +28,7 @@ ) light_overlay = "helmet_light" + var/no_cycle = FALSE //stop this item from being put in a cycler /obj/item/clothing/suit/space/void name = "voidsuit" @@ -66,6 +67,9 @@ var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any. var/obj/item/weapon/tank/tank = null // Deployable tank, if any. var/obj/item/device/suit_cooling_unit/cooler = null// Cooling unit, for FBPs. Cannot be installed alongside a tank. + + //Cycler settings + var/no_cycle = FALSE //stop this item from being put in a cycler /obj/item/clothing/suit/space/void/examine(user) . = ..()