Skip to content

Commit

Permalink
Minor quirk refactoring
Browse files Browse the repository at this point in the history
- Adds trait for Vacuum Resistance
- Refactors Vacuum Resistance
- Removes processing from Breathless
  • Loading branch information
LeDrascol committed Nov 3, 2024
1 parent 1a58731 commit fbb9e38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/~~~splurt_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit fbb9e38

Please sign in to comment.