From fbb9e389d5fed8ee38930547886ec883257ecd7c Mon Sep 17 00:00:00 2001 From: Darius <5933805+LeDrascol@users.noreply.github.com> Date: Sun, 3 Nov 2024 13:26:07 -0500 Subject: [PATCH] Minor quirk refactoring - Adds trait for Vacuum Resistance - Refactors Vacuum Resistance - Removes processing from Breathless --- .../~~~splurt_defines/traits/declarations.dm | 1 + .../quirks/positive_quirks/breathless.dm | 5 ----- .../positive_quirks/vacuum_resistance.dm | 20 ++++++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/code/__DEFINES/~~~splurt_defines/traits/declarations.dm b/code/__DEFINES/~~~splurt_defines/traits/declarations.dm index dfbe764a36a36..335de7ba65dbc 100644 --- a/code/__DEFINES/~~~splurt_defines/traits/declarations.dm +++ b/code/__DEFINES/~~~splurt_defines/traits/declarations.dm @@ -36,3 +36,4 @@ #define TRAIT_NO_PROCESS_FOOD "no-process-food" #define TRAIT_CONCUBUS "concubus" #define TRAIT_MODULAR_LIMBS "modular_limbs" +#define TRAIT_VACUUM_RESIST "vacuum_resist" diff --git a/modular_zzplurt/code/datums/quirks/positive_quirks/breathless.dm b/modular_zzplurt/code/datums/quirks/positive_quirks/breathless.dm index 624a1c0c6b24b..2e029c4901bca 100644 --- a/modular_zzplurt/code/datums/quirks/positive_quirks/breathless.dm +++ b/modular_zzplurt/code/datums/quirks/positive_quirks/breathless.dm @@ -2,14 +2,9 @@ name = "Breathless" desc = "You no longer require air to function. This also means that administering life-saving maneuvers such as CPR are impossible." value = 6 - quirk_flags = QUIRK_PROCESSES gain_text = span_notice("You no longer need to breathe.") lose_text = span_notice("You need to breathe again...") medical_record_text = "Patient demonstrates no requirement for oxygen intake." mob_trait = TRAIT_NOBREATH hardcore_value = -4 icon = FA_ICON_LUNGS - -/datum/quirk/breathless/process(seconds_per_tick) - var/mob/living/carbon/C = quirk_holder - C.adjustOxyLoss(-3) // Fix for defibrillator "bug". probably not necessary in this codebase diff --git a/modular_zzplurt/code/datums/quirks/positive_quirks/vacuum_resistance.dm b/modular_zzplurt/code/datums/quirks/positive_quirks/vacuum_resistance.dm index 2883b0fcef948..f4a8790f839bd 100644 --- a/modular_zzplurt/code/datums/quirks/positive_quirks/vacuum_resistance.dm +++ b/modular_zzplurt/code/datums/quirks/positive_quirks/vacuum_resistance.dm @@ -5,21 +5,23 @@ gain_text = span_notice("Your physique attunes to the silence of space, now able to operate in zero pressure.") lose_text = span_notice("Your physiology reverts as your space faring gifts lay dormant once more.") medical_record_text = "Patient's body has fully adapted to zero-pressure environments." + mob_trait = TRAIT_VACUUM_RESIST hardcore_value = -6 icon = FA_ICON_USER_ASTRONAUT mail_goodies = list ( /obj/item/storage/box/emergency_spacesuit = 1 ) - var/list/perks = list(TRAIT_RESISTLOWPRESSURE) /datum/quirk/vacuum_resistance/add(client/client_source) - . = ..() - var/mob/living/carbon/human/H = quirk_holder - for(var/perk in perks) - ADD_TRAIT(H, perk, ROUNDSTART_TRAIT) + // Define quirk mob + var/mob/living/carbon/human/quirk_mob = quirk_holder + + // Add quirk traits + ADD_TRAIT(quirk_mob,TRAIT_RESISTLOWPRESSURE,TRAIT_VACUUM_RESIST) /datum/quirk/vacuum_resistance/remove() - . = ..() - var/mob/living/carbon/human/H = quirk_holder - for(var/perk in perks) - REMOVE_TRAIT(H, perk, ROUNDSTART_TRAIT) + // Define quirk mob + var/mob/living/carbon/human/quirk_mob = quirk_holder + + // Remove quirk traits + REMOVE_TRAIT(quirk_mob,TRAIT_RESISTLOWPRESSURE,TRAIT_VACUUM_RESIST)