Merge pull request #11173 from Heroman3003/waterbreath

Adds xenochimera water breathing trait + refactors water breathing
This commit is contained in:
Aronai Sieyes
2021-07-20 10:50:35 -04:00
committed by GitHub
9 changed files with 25 additions and 32 deletions
@@ -112,7 +112,6 @@ Variables you may want to make use of are:
)
var/use_bodyshape = SPECIES_HUMAN
var/waterbreathing = 0
var/overcome_gravity = 0
var/hover = 0
@@ -199,7 +198,7 @@ Variables you may want to make use of are:
/datum/species/event1/proc/toggle_cloning()
flags ^= NO_SCAN
/datum/species/event1/proc/toggle_defibbing()
flags ^= NO_DEFIB
@@ -215,9 +214,6 @@ Variables you may want to make use of are:
/datum/species/event1/get_bodytype(var/mob/living/carbon/human/H) //Default to human sprites, if they're based on another species, var edit use_bodyshape to the correct thing in _defines/mobs.dm of the species you want to use.
return use_bodyshape
/datum/species/event1/can_breathe_water()
return waterbreathing
/datum/species/event1/can_overcome_gravity(var/mob/living/carbon/human/H)
return overcome_gravity
@@ -70,6 +70,7 @@
breath_type = null
poison_type = null
water_breather = TRUE //They don't quite breathe
vision_flags = SEE_SELF|SEE_MOBS
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_UNDERWEAR
@@ -131,9 +132,6 @@
/datum/species/shadekin/handle_environment_special(var/mob/living/carbon/human/H)
handle_shade(H)
/datum/species/shadekin/can_breathe_water()
return TRUE //they dont quite breathe
/datum/species/shadekin/add_inherent_verbs(var/mob/living/carbon/human/H)
..()
add_shadekin_abilities(H)
@@ -107,7 +107,7 @@
var/alcohol_mod = 1 // Multiplier to alcohol strength; 0.5 = half, 0 = no effect at all, 2 = double, etc.
var/pain_mod = 1 // Multiplier to pain effects; 0.5 = half, 0 = no effect (equal to NO_PAIN, really), 2 = double, etc.
var/spice_mod = 1 // Multiplier to spice/capsaicin/frostoil effects; 0.5 = half, 0 = no effect (immunity), 2 = double, etc.
var/trauma_mod = 1 // Affects traumatic shock (how fast pain crit happens). 0 = no effect (immunity to pain crit), 2 = double etc.Overriden by "can_feel_pain" var
var/trauma_mod = 1 // Affects traumatic shock (how fast pain crit happens). 0 = no effect (immunity to pain crit), 2 = double etc.Overriden by "can_feel_pain" var
// set below is EMP interactivity for nonsynth carbons
var/emp_sensitivity = 0 // bitflag. valid flags are: EMP_PAIN, EMP_BLIND, EMP_DEAFEN, EMP_CONFUSE, EMP_STUN, and EMP_(BRUTE/BURN/TOX/OXY)_DMG
var/emp_dmg_mod = 1 // Multiplier to all EMP damage sustained by the mob, if it's EMP-sensitive
@@ -129,6 +129,7 @@
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "phoron" // Poisonous air.
var/exhale_type = "carbon_dioxide" // Exhaled gas type.
var/water_breather = FALSE
var/body_temperature = 310.15 // Species will try to stabilize at this temperature. (also affects temperature processing)
@@ -499,7 +500,7 @@
// Called when lying down on a water tile.
/datum/species/proc/can_breathe_water()
return FALSE
return water_breather
// Impliments different trails for species depending on if they're wearing shoes.
/datum/species/proc/get_move_trail(var/mob/living/carbon/human/H)
@@ -20,6 +20,7 @@
breath_type = "oxygen"
poison_type = "phoron"
exhale_type = "oxygen"
water_breather = TRUE //eh, why not? Aquatic plants are a thing.
// Heat and cold resistances are 20 degrees broader on the level 1 range, level 2 is default, level 3 is much weaker, halfway between L2 and normal L3.
// Essentially, they can tolerate a broader range of comfortable temperatures, but suffer more at extremes.
@@ -90,9 +91,6 @@
A_FRUIT = /obj/item/organ/internal/fruitgland,
)
/datum/species/alraune/can_breathe_water()
return TRUE //eh, why not? Aquatic plants are a thing.
/datum/species/alraune/handle_environment_special(var/mob/living/carbon/human/H)
if(H.inStasisNow()) // if they're in stasis, they won't need this stuff.
@@ -57,12 +57,6 @@
// Stub species overrides for shoving trait abilities into
//Called when face-down in the water or otherwise over their head.
// Return: TRUE for able to breathe fine in water.
/datum/species/custom/can_breathe_water()
return /datum/trait/positive/water_breather in traits
//Called during handle_environment in Life() ticks.
// Return: Not used.
/datum/species/custom/handle_environment_special(var/mob/living/carbon/human/H)
@@ -340,6 +340,8 @@
reagent_tag = IS_SKRELL
allergens = ALLERGEN_MEAT|ALLERGEN_FISH|ALLERGEN_DAIRY|ALLERGEN_EGGS
water_breather = TRUE
has_limbs = list(
BP_TORSO = list("path" = /obj/item/organ/external/chest),
BP_GROIN = list("path" = /obj/item/organ/external/groin),
@@ -354,9 +356,6 @@
BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right)
)
/datum/species/skrell/can_breathe_water()
return TRUE
/datum/species/zaddat
name = SPECIES_ZADDAT
name_plural = "Zaddat"
@@ -104,13 +104,12 @@
spawn_flags = SPECIES_CAN_JOIN
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
water_breather = TRUE
flesh_color = "#AFA59E"
base_color = "#777777"
blood_color = "#1D2CBF"
/datum/species/akula/can_breathe_water()
return TRUE // Surprise, SHERKS.
/datum/species/nevrean
name = SPECIES_NEVREAN
name_plural = "Nevreans"
@@ -295,7 +294,7 @@
/datum/species/zaddat
spawn_flags = SPECIES_CAN_JOIN
min_age = 18
inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //I don't even know if Zaddat can HAVE hair, but here we are, I suppose
inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //I don't even know if Zaddat can HAVE hair, but here we are, I suppose
gluttonous = 0
genders = list(MALE, FEMALE, PLURAL, NEUTER)
descriptors = list()
@@ -336,7 +335,7 @@
/datum/species/vox
gluttonous = 0
spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE
min_age = 18
min_age = 18
inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) //Get ya quills done did
icobase = 'icons/mob/human_races/r_vox_old.dmi'
deform = 'icons/mob/human_races/r_def_vox_old.dmi'
@@ -456,6 +455,7 @@
breath_type = null
poison_type = null
water_breather = TRUE //They do not quite breathe...
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_SKIN_COLOR | HAS_UNDERWEAR
@@ -486,12 +486,9 @@
BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/crewkin)
)
/datum/species/shadekin/get_bodytype()
/datum/species/crew_shadekin/get_bodytype()
return SPECIES_SHADEKIN
/datum/species/shadekin/can_breathe_water()
return TRUE //they dont quite breathe
//These species are not really species but are just there for custom species selection
/datum/species/fl_zorren
@@ -158,3 +158,4 @@
name = "Water Breather"
desc = "You can breathe under water."
cost = 1
var_changes = list("water_breather" = 1)
@@ -1,4 +1,4 @@
/*
/*
** For now, these are just neutral traits for Xenochimera only to take.
** These are only traits that they should reasonably be able to evolve to acquire themselves.
** I won't add the resistances though because those are kinda lame for a 'chimera to take!
@@ -49,3 +49,12 @@
cost = 0
category = 0
custom_only = FALSE
/datum/trait/positive/water_breather/xenochimera
sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Water Breather"
desc = "You can breathe under water."
cost = 0
category = 0
custom_only = FALSE