From 24575c6c8a86cd900564a25c8b4aae732fb34ded Mon Sep 17 00:00:00 2001 From: alex-gh Date: Tue, 28 Aug 2018 23:53:29 +0200 Subject: [PATCH 1/2] Vox nitrogen tanks now almost never overwrite job items. --- .../mob/living/carbon/human/species/vox.dm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index 1bc0b8b3b9e..b52f11e7dcd 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -84,16 +84,21 @@ /datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H) if(!H.mind || !H.mind.assigned_role || H.mind.assigned_role != "Clown" && H.mind.assigned_role != "Mime") H.unEquip(H.wear_mask) - H.unEquip(H.l_hand) H.equip_or_collect(new /obj/item/clothing/mask/breath/vox(H), slot_wear_mask) var/tank_pref = H.client && H.client.prefs ? H.client.prefs.speciesprefs : null + var/obj/item/tank/internal_tank if(tank_pref)//Diseasel, here you go - H.equip_or_collect(new /obj/item/tank/nitrogen(H), slot_l_hand) + internal_tank = new /obj/item/tank/nitrogen(H) else - H.equip_or_collect(new /obj/item/tank/emergency_oxygen/vox(H), slot_l_hand) - to_chat(H, "You are now running on nitrogen internals from the [H.l_hand] in your hand. Your species finds oxygen toxic, so you must breathe nitrogen only.") - H.internal = H.l_hand + internal_tank = new /obj/item/tank/emergency_oxygen/vox(H) + if (!H.equip_to_appropriate_slot(internal_tank)) + if (!H.put_in_any_hand_if_possible(internal_tank)) + H.unEquip(H.l_hand) + H.equip_or_collect(internal_tank, slot_l_hand) + to_chat(H, "Could not find an empty slot for internals! Please report this as a bug") + internal_tank.toggle_internals(H) + to_chat(H, "You are now running on nitrogen internals from the [internal_tank]. Your species finds oxygen toxic, so you must breathe nitrogen only.") H.update_action_buttons_icon() /datum/species/vox/on_species_gain(mob/living/carbon/human/H) From 6222de5540262ac834f95cb2fc7948eb3cbb63ba Mon Sep 17 00:00:00 2001 From: alex-gh Date: Mon, 10 Sep 2018 00:09:40 +0200 Subject: [PATCH 2/2] Refactor internal enabling code for consistency's sake --- code/modules/mob/living/carbon/human/species/vox.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index b52f11e7dcd..d01f1ccf6fe 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -92,12 +92,12 @@ internal_tank = new /obj/item/tank/nitrogen(H) else internal_tank = new /obj/item/tank/emergency_oxygen/vox(H) - if (!H.equip_to_appropriate_slot(internal_tank)) - if (!H.put_in_any_hand_if_possible(internal_tank)) + if(!H.equip_to_appropriate_slot(internal_tank)) + if(!H.put_in_any_hand_if_possible(internal_tank)) H.unEquip(H.l_hand) H.equip_or_collect(internal_tank, slot_l_hand) to_chat(H, "Could not find an empty slot for internals! Please report this as a bug") - internal_tank.toggle_internals(H) + H.internal = internal_tank to_chat(H, "You are now running on nitrogen internals from the [internal_tank]. Your species finds oxygen toxic, so you must breathe nitrogen only.") H.update_action_buttons_icon()