From 5c11247ab44f664751d6f29e00f5724fa7e8db6f Mon Sep 17 00:00:00 2001 From: "Lila S." Date: Mon, 21 Oct 2024 01:27:56 +0200 Subject: [PATCH] uh i should put this here --- .../breather/nitrogen_breather/nitrogen_breather.dm | 5 ++++- .../breather/water_breather/water_breather.dm | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modular_doppler/modular_quirks/breather/nitrogen_breather/nitrogen_breather.dm b/modular_doppler/modular_quirks/breather/nitrogen_breather/nitrogen_breather.dm index f43bef49f70ed..1eb1eb4078314 100644 --- a/modular_doppler/modular_quirks/breather/nitrogen_breather/nitrogen_breather.dm +++ b/modular_doppler/modular_quirks/breather/nitrogen_breather/nitrogen_breather.dm @@ -14,7 +14,6 @@ /datum/quirk/item_quirk/breather/nitrogen_breather/add_unique(client/client_source) var/mob/living/carbon/human/target = quirk_holder - var/obj/item/organ/internal/lungs/target_lungs = target.get_organ_slot(ORGAN_SLOT_LUNGS) var/obj/item/clothing/accessory/breathing/target_tag = new(get_turf(target)) target_tag.breath_type = breath_type @@ -28,6 +27,10 @@ LOCATION_HANDS = ITEM_SLOT_HANDS ) ) + var/obj/item/organ/internal/lungs/target_lungs = target.get_organ_slot(ORGAN_SLOT_LUNGS) + if(!target_lungs) + to_chat(target, span_warning("Your [name] quirk couldn't properly execute due to your species/body lacking a pair of lungs!")) + return // set lung vars target_lungs.safe_oxygen_min = 0 //Dont need oxygen target_lungs.safe_oxygen_max = 2 //But it is quite toxic diff --git a/modular_doppler/modular_quirks/breather/water_breather/water_breather.dm b/modular_doppler/modular_quirks/breather/water_breather/water_breather.dm index 82a29b658e2c2..708e25746f435 100644 --- a/modular_doppler/modular_quirks/breather/water_breather/water_breather.dm +++ b/modular_doppler/modular_quirks/breather/water_breather/water_breather.dm @@ -10,8 +10,6 @@ /datum/quirk/item_quirk/breather/water_breather/add_unique(client/client_source) var/mob/living/carbon/human/target = quirk_holder - var/obj/item/organ/internal/lungs/target_lungs = target.get_organ_slot(ORGAN_SLOT_LUNGS) - var/obj/item/bodypart/chest/target_chest = target.get_bodypart(BODY_ZONE_CHEST) var/obj/item/clothing/accessory/breathing/target_tag = new(get_turf(target)) target_tag.breath_type = breath_type @@ -25,6 +23,11 @@ LOCATION_BACKPACK = ITEM_SLOT_BACKPACK ), "Be sure to equip your vaporizer, or you may end up choking to death!" ) + var/obj/item/organ/internal/lungs/target_lungs = target.get_organ_slot(ORGAN_SLOT_LUNGS) + var/obj/item/bodypart/chest/target_chest = target.get_bodypart(BODY_ZONE_CHEST) + if(!target_lungs || !target_chest) + to_chat(target, span_warning("Your [name] quirk couldn't properly execute due to your species/body lacking a pair of lungs!")) + return // if your lungs already have this trait, no need to update if(target_lungs.type == /obj/item/organ/internal/lungs/fish) return