From 1345f05616f30fb661b638304a956dcc6e9b590c Mon Sep 17 00:00:00 2001 From: Screemonster Date: Mon, 26 Mar 2018 00:31:52 +0100 Subject: [PATCH 1/5] WIP alraune species --- .../living/carbon/human/human_species_vr.dm | 4 + .../carbon/human/species/station/alraune.dm | 134 ++++++++++++++++++ vorestation.dme | 1 + 3 files changed, 139 insertions(+) create mode 100644 code/modules/mob/living/carbon/human/species/station/alraune.dm diff --git a/code/modules/mob/living/carbon/human/human_species_vr.dm b/code/modules/mob/living/carbon/human/human_species_vr.dm index 45b615c240..ed27c12e62 100644 --- a/code/modules/mob/living/carbon/human/human_species_vr.dm +++ b/code/modules/mob/living/carbon/human/human_species_vr.dm @@ -25,3 +25,7 @@ /mob/living/carbon/human/protean/New(var/new_loc) ..(new_loc, "Protean") + + +/mob/living/carbon/human/alraune/New(var/new_loc) + ..(new_loc, "Alraune") diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm new file mode 100644 index 0000000000..af844f25b9 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -0,0 +1,134 @@ +/datum/species/alraune + name = SPECIES_ALRAUNE + name_plural = "Alraunes" + unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch, /datum/unarmed_attack/bite) + num_alternate_languages = 2 + language = LANGUAGE_ROOTLOCAL + slowdown = 1 //slow, they're plants. Not as slow as full diona. + total_health = 100 //standard + brute_mod = 1 //nothing special + burn_mod = 1.5 //plants don't like fire + metabolic_rate = 0.75 // slow metabolism + item_slowdown_mod = 0.25 //while they start slow, they don't get much slower + bloodloss_rate = 0.1 //While they do bleed, they bleed out VERY slowly + min_age = 18 + max_age = 250 + health_hud_intensity = 1.5 + + body_temperature = T20C + breath_type = "oxygen" + poison_type = "phoron" + exhale_type = null // as much as I'd like them to breathe in CO2 and breathe out O2, it'd take completely rewriting breath code + + cold_level_1 = 200 //Default 260 - Lower is better + cold_level_2 = 140 //Default 200 + cold_level_3 = 80 //Default 120 + cold_discomfort_level = 260 //they start feeling uncomfortable around the point where humans take damage + + heat_level_1 = 330 //Default 360 - Higher is better + heat_level_2 = 380 //Default 400 + heat_level_3 = 800 //Default 1000 + + breath_cold_level_1 = -1 //They don't have lungs, they breathe through their skin + breath_cold_level_2 = -1 //and we don't want messages about icicles in their nonexistent lungs + breath_cold_level_3 = -1 + + breath_heat_level_1 = INFINITY + breath_heat_level_2 = INFINITY + breath_heat_level_3 = INFINITY + + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED // whitelist only while WIP + flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT + appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR + + color_mult = 1 + icobase = 'icons/mob/human_races/r_human_vr.dmi' + deform = 'icons/mob/human_races/r_def_human_vr.dmi' + flesh_color = "#9ee02c" + blood_color = "#edf4d0" //sap! + base_color = "#1a5600" + + blurb = "Alraunes are a rare sight in space. Their bodies are reminiscent of that of plants, and yet they share many\ + traits with other humanoid beings.\ + \ + Most Alraunes are not interested in traversing space, their heavy preference for natural environments and general\ + disinterest in things outside it keeps them as a species at a rather primal stage.\ + \ + However, after their discovery by the angels of Sanctum, many alraunes succumbed to their curiosity, and took the offer\ + to learn of the world and venture out, whether it's to Sanctum, or elsewhere in the galaxy." + + has_limbs = list( + BP_TORSO = list("path" = /obj/item/organ/external/chest), + BP_GROIN = list("path" = /obj/item/organ/external/groin), + BP_HEAD = list("path" = /obj/item/organ/external/head), + BP_L_ARM = list("path" = /obj/item/organ/external/arm), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BP_L_LEG = list("path" = /obj/item/organ/external/leg), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BP_L_HAND = list("path" = /obj/item/organ/external/hand), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right) + ) + + // limited organs, 'cause they're simple + has_organ = list( + O_HEART = /obj/item/organ/internal/heart, + O_BRAIN = /obj/item/organ/internal/brain, + O_EYES = /obj/item/organ/internal/eyes, + ) + +/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. + return + + //They don't have lungs so breathe() will just return. Instead, they breathe through their skin. + + var/datum/gas_mixture/breath = null + var/fullysealed = FALSE //if they're wearing a fully sealed suit, their internals take priority. + var/environmentalair = FALSE //if no sealed suit, internals take priority in low pressure environements + + if(H.wear_suit && (H.wear_suit.item_flags & STOPPRESSUREDAMAGE) && H.head && (H.head.item_flags & STOPPRESSUREDAMAGE)) + fullysealed = TRUE + else // find out if local gas mixture is enough to override use of internals + var/datum/gas_mixture/environment = H.loc.return_air() + var/envpressure = environment.return_pressure() + if(envpressure >= hazard_low_pressure) + environmentalair = TRUE + + if(fullysealed || !environmentalair) + breath = H.get_breath_from_internal() + + if(!breath) //No breath from internals so let's try to get air from our location + // cut-down version of get_breath_from_environment - notably, gas masks provide no benefit + var/datum/gas_mixture/environment2 + if(H.loc) + environment2 = H.loc.return_air_for_internal_lifeform(H) + + if(environment2) + breath = environment2.remove_volume(BREATH_VOLUME) + H.handle_chemical_smoke(environment2) //handle chemical smoke while we're at it + + H.handle_breath(breath) // everything that needs to be handled is handled in here + + // Now we've handled the usual breathing stuff, check for presence of CO2 in breath, and light levels + + var/co2buff = 0 + if(breath.gas["carbon_dioxide"]) + var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME + var/CO2_pp = (breath.gas["carbon_dioxide"] / breath.total_moles) * breath_pressure + co2buff = (Clamp(CO2_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. + H.adjustOxyLoss(-co2buff*2) + + var/light_amount = fullysealed ? H.getlightlevel() : H.getlightlevel()/3 // if they're covered, they're not going to get much light on them. + + if(co2buff >= 0.2 && light_amount >= 0.4) //if there's enough light and CO2, heal. Note if you're wearing a sealed suit you'll never be able to do this no matter how much CO2 you cheese into your internals tank. + H.adjustBruteLoss(-(light_amount * co2buff * 2)) //even at a full partial pressure of CO2 and full light, you'll only heal half as fast as diona. + H.adjustFireLoss(-(light_amount * co2buff)) //this won't let you tank environmental damage from fire. + + if(H.nutrition < (200 + 400*co2buff)) //if no CO2, a fully lit tile gives them 1/tick up to 200. With CO2, potentially up to 600. + H.nutrition += (light_amount*(1+co2buff*5)) \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index ac579c0790..ae816b1ed6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2007,6 +2007,7 @@ #include "code\modules\mob\living\carbon\human\species\outsider\shadow.dm" #include "code\modules\mob\living\carbon\human\species\outsider\skeleton.dm" #include "code\modules\mob\living\carbon\human\species\outsider\vox.dm" +#include "code\modules\mob\living\carbon\human\species\station\alraune.dm" #include "code\modules\mob\living\carbon\human\species\station\blank_vr.dm" #include "code\modules\mob\living\carbon\human\species\station\golem.dm" #include "code\modules\mob\living\carbon\human\species\station\human_subspecies.dm" From dc51c324c213ce04b239a19de2c84f59ddbe3568 Mon Sep 17 00:00:00 2001 From: Screemonster Date: Fri, 30 Mar 2018 03:42:33 +0100 Subject: [PATCH 2/5] tweak temp tolerance + succudrain --- .../carbon/human/species/station/alraune.dm | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index af844f25b9..cf5a8da8d2 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -20,14 +20,17 @@ poison_type = "phoron" exhale_type = null // as much as I'd like them to breathe in CO2 and breathe out O2, it'd take completely rewriting breath code - cold_level_1 = 200 //Default 260 - Lower is better - cold_level_2 = 140 //Default 200 - cold_level_3 = 80 //Default 120 + // 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. + cold_level_1 = 240 //Default 260 - Lower is better + cold_level_2 = 200 //Default 200 + cold_level_3 = 160 //Default 120 cold_discomfort_level = 260 //they start feeling uncomfortable around the point where humans take damage - heat_level_1 = 330 //Default 360 - Higher is better - heat_level_2 = 380 //Default 400 - heat_level_3 = 800 //Default 1000 + heat_level_1 = 380 //Default 360 - Higher is better + heat_level_2 = 400 //Default 400 + heat_level_3 = 700 //Default 1000 + heat_discomfort_level = 360 breath_cold_level_1 = -1 //They don't have lungs, they breathe through their skin breath_cold_level_2 = -1 //and we don't want messages about icicles in their nonexistent lungs @@ -41,6 +44,12 @@ flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR + inherent_verbs = list( + /mob/living/carbon/human/proc/succubus_drain, + /mob/living/carbon/human/proc/succubus_drain_finalize, + /mob/living/carbon/human/proc/succubus_drain_lethal, + /mob/living/carbon/human/proc/bloodsuck) //Give them the voremodes related to wrapping people in vines and sapping their fluids + color_mult = 1 icobase = 'icons/mob/human_races/r_human_vr.dmi' deform = 'icons/mob/human_races/r_def_human_vr.dmi' From 9d34f4d8cbb2211d85c5df2d9bffa6210504f717 Mon Sep 17 00:00:00 2001 From: Screemonster Date: Sun, 1 Apr 2018 19:52:22 +0100 Subject: [PATCH 3/5] gets rid of handle_breath call and moves all breathing processing to alraune.dm --- .../carbon/human/species/station/alraune.dm | 198 ++++++++++++++++-- 1 file changed, 183 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index cf5a8da8d2..0686dd3fec 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -16,9 +16,9 @@ health_hud_intensity = 1.5 body_temperature = T20C - breath_type = "oxygen" + breath_type = "carbon_dioxide" poison_type = "phoron" - exhale_type = null // as much as I'd like them to breathe in CO2 and breathe out O2, it'd take completely rewriting breath code + exhale_type = "oxygen" // 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. @@ -32,13 +32,13 @@ heat_level_3 = 700 //Default 1000 heat_discomfort_level = 360 - breath_cold_level_1 = -1 //They don't have lungs, they breathe through their skin - breath_cold_level_2 = -1 //and we don't want messages about icicles in their nonexistent lungs - breath_cold_level_3 = -1 + breath_cold_level_1 = 220 //They don't have lungs, they breathe through their skin + breath_cold_level_2 = 180 //again, tolerant in the midrange but burn fast at extremes + breath_cold_level_3 = 140 - breath_heat_level_1 = INFINITY - breath_heat_level_2 = INFINITY - breath_heat_level_3 = INFINITY + breath_heat_level_1 = 400 + breath_heat_level_2 = 450 + breath_heat_level_3 = 800 spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED // whitelist only while WIP flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT @@ -95,7 +95,13 @@ if(H.inStasisNow()) // if they're in stasis, they won't need this stuff. return + //setting these here 'cause ugh the defines for life are in the wrong place to compile properly + //set them back to HUMAN_MAX_OXYLOSS if we move the life defines to the defines folder at any point + var/ALRAUNE_MAX_OXYLOSS = 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. + var/ALRAUNE_CRIT_MAX_OXYLOSS = ( 2.0 / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. last_tick_duration = ~2.0 on average + //They don't have lungs so breathe() will just return. Instead, they breathe through their skin. + //This is mostly normal breath code with some tweaks that apply to their particular biology. var/datum/gas_mixture/breath = null var/fullysealed = FALSE //if they're wearing a fully sealed suit, their internals take priority. @@ -122,15 +128,82 @@ breath = environment2.remove_volume(BREATH_VOLUME) H.handle_chemical_smoke(environment2) //handle chemical smoke while we're at it - H.handle_breath(breath) // everything that needs to be handled is handled in here + // NOW a crude copypasta of handle_breath. Leaving some things out that don't apply to plants. + if(H.does_not_breathe) + H.failed_last_breath = 0 + H.adjustOxyLoss(-5) + return // if somehow they don't breathe, abort breathing. - // Now we've handled the usual breathing stuff, check for presence of CO2 in breath, and light levels + if(!breath || (breath.total_moles == 0)) + H.failed_last_breath = 1 + if(H.health > config.health_threshold_crit) + H.adjustOxyLoss(ALRAUNE_MAX_OXYLOSS) + else + H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS) + + H.oxygen_alert = max(H.oxygen_alert, 1) + + return // skip air processing if there's no air + + // now into the good stuff + + //var/safe_pressure_min = species.minimum_breath_pressure // Minimum safe partial pressure of breathable gas in kPa + //just replace safe_pressure_min with minimum_breath_pressure, no need to declare a new var + + var/safe_exhaled_max = 10 + var/safe_toxins_max = 0.2 + var/SA_para_min = 1 + var/SA_sleep_min = 5 + var/inhaled_gas_used = 0 + + var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME + + var/inhaling + var/poison + var/exhaling + + var/failed_inhale = 0 + var/failed_exhale = 0 + + inhaling = breath.gas[breath_type] + poison = breath.gas[poison_type] + exhaling = breath.gas[exhale_type] + + var/inhale_pp = (inhaling/breath.total_moles)*breath_pressure + var/toxins_pp = (poison/breath.total_moles)*breath_pressure + var/exhaled_pp = (exhaling/breath.total_moles)*breath_pressure + + // Not enough to breathe + if((inhale_pp + exhaled_pp) < minimum_breath_pressure) //they can breathe either oxygen OR CO2 + if(prob(20)) + spawn(0) H.emote("gasp") + + var/ratio = (inhale_pp + exhaled_pp)/minimum_breath_pressure + // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS (1) after all!) + H.adjustOxyLoss(max(ALRAUNE_MAX_OXYLOSS*(1-ratio), 0)) + failed_inhale = 1 + + H.oxygen_alert = max(H.oxygen_alert, 1) + else + // We're in safe limits + H.oxygen_alert = 0 + + inhaled_gas_used = inhaling/6 + breath.adjust_gas(breath_type, -inhaled_gas_used, update = 0) //update afterwards + breath.adjust_gas_temp(exhale_type, inhaled_gas_used, H.bodytemperature, update = 0) //update afterwards + + //Now we handle CO2. + if(inhale_pp > safe_exhaled_max * 0.7) // For a human, this would be too much exhaled gas in the air. But plants don't care. + H.co2_alert = 1 // Give them the alert on the HUD. They'll be aware when the good stuff is present. + + else + H.co2_alert = 0 + + //do the CO2 buff stuff here var/co2buff = 0 - if(breath.gas["carbon_dioxide"]) - var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME - var/CO2_pp = (breath.gas["carbon_dioxide"] / breath.total_moles) * breath_pressure - co2buff = (Clamp(CO2_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. + if(inhaling) + co2buff = (Clamp(inhale_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. H.adjustOxyLoss(-co2buff*2) var/light_amount = fullysealed ? H.getlightlevel() : H.getlightlevel()/3 // if they're covered, they're not going to get much light on them. @@ -140,4 +213,99 @@ H.adjustFireLoss(-(light_amount * co2buff)) //this won't let you tank environmental damage from fire. if(H.nutrition < (200 + 400*co2buff)) //if no CO2, a fully lit tile gives them 1/tick up to 200. With CO2, potentially up to 600. - H.nutrition += (light_amount*(1+co2buff*5)) \ No newline at end of file + H.nutrition += (light_amount*(1+co2buff*5)) + + // Too much poison in the air. + if(toxins_pp > safe_toxins_max) + var/ratio = (poison/safe_toxins_max) * 10 + if(H.reagents) + H.reagents.add_reagent("toxin", Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE)) + breath.adjust_gas(poison_type, -poison/6, update = 0) //update after + H.phoron_alert = max(H.phoron_alert, 1) + else + H.phoron_alert = 0 + + // If there's some other shit in the air lets deal with it here. + if(breath.gas["sleeping_agent"]) + var/SA_pp = (breath.gas["sleeping_agent"] / breath.total_moles) * breath_pressure + + // Enough to make us paralysed for a bit + if(SA_pp > SA_para_min) + + // 3 gives them one second to wake up and run away a bit! + H.Paralyse(3) + + // Enough to make us sleep as well + if(SA_pp > SA_sleep_min) + H.Sleeping(5) + + // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning + else if(SA_pp > 0.15) + if(prob(20)) + spawn(0) H.emote(pick("giggle", "laugh")) + breath.adjust_gas("sleeping_agent", -breath.gas["sleeping_agent"]/6, update = 0) //update after + + // Were we able to breathe? + if (failed_inhale || failed_exhale) + H.failed_last_breath = 1 + else + H.failed_last_breath = 0 + H.adjustOxyLoss(-5) + + + // Hot air hurts :( + if((breath.temperature < breath_cold_level_1 || breath.temperature > breath_heat_level_1) && !(COLD_RESISTANCE in H.mutations)) + + if(breath.temperature <= breath_cold_level_1) + if(prob(20)) + to_chat(H, "You feel icicles forming on your skin!") + else if(breath.temperature >= breath_heat_level_1) + if(prob(20)) + src << "You feel yourself smouldering in the heat!" + + var/bodypart = pick(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_TORSO,BP_GROIN,BP_HEAD) + if(breath.temperature >= breath_heat_level_1) + if(breath.temperature < breath_heat_level_2) + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Heat") + H.fire_alert = max(H.fire_alert, 2) + else if(breath.temperature < breath_heat_level_3) + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Heat") + H.fire_alert = max(H.fire_alert, 2) + else + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Heat") + H.fire_alert = max(H.fire_alert, 2) + + else if(breath.temperature <= breath_cold_level_1) + if(breath.temperature > breath_cold_level_2) + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Cold") + H.fire_alert = max(H.fire_alert, 1) + else if(breath.temperature > breath_cold_level_3) + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Cold") + H.fire_alert = max(H.fire_alert, 1) + else + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Cold") + H.fire_alert = max(H.fire_alert, 1) + + + //breathing in hot/cold air also heats/cools you a bit + var/temp_adj = breath.temperature - H.bodytemperature + if (temp_adj < 0) + temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed + else + temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed + + var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE) + temp_adj *= relative_density + + if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX + if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX + //world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]" + H.bodytemperature += temp_adj + + else if(breath.temperature >= heat_discomfort_level) + get_environment_discomfort(src,"heat") + else if(breath.temperature <= cold_discomfort_level) + get_environment_discomfort(src,"cold") + + breath.update_values() + return 1 From 75b7abfce767fe0d352279025efd9dac133d8b02 Mon Sep 17 00:00:00 2001 From: Screemonster Date: Sun, 1 Apr 2018 21:44:16 +0100 Subject: [PATCH 4/5] a few tweaks to tolerances and regen to make going outside naked suck --- .../carbon/human/species/station/alraune.dm | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 0686dd3fec..526715c239 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -32,13 +32,13 @@ heat_level_3 = 700 //Default 1000 heat_discomfort_level = 360 - breath_cold_level_1 = 220 //They don't have lungs, they breathe through their skin - breath_cold_level_2 = 180 //again, tolerant in the midrange but burn fast at extremes - breath_cold_level_3 = 140 + breath_cold_level_1 = 240 //They don't have lungs, they breathe through their skin + breath_cold_level_2 = 180 //sadly for them, their breath tolerance is no better than anyone else's. + breath_cold_level_3 = 140 //mainly 'cause breath tolerance is more generous than body temp tolerance. - breath_heat_level_1 = 400 + breath_heat_level_1 = 400 //slightly better heat tolerance in air though. Slightly. breath_heat_level_2 = 450 - breath_heat_level_3 = 800 + breath_heat_level_3 = 800 //lower incineration threshold though spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED // whitelist only while WIP flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT @@ -204,13 +204,12 @@ var/co2buff = 0 if(inhaling) co2buff = (Clamp(inhale_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. - H.adjustOxyLoss(-co2buff*2) - var/light_amount = fullysealed ? H.getlightlevel() : H.getlightlevel()/3 // if they're covered, they're not going to get much light on them. + var/light_amount = fullysealed ? H.getlightlevel() : H.getlightlevel()/5 // if they're covered, they're not going to get much light on them. - if(co2buff >= 0.2 && light_amount >= 0.4) //if there's enough light and CO2, heal. Note if you're wearing a sealed suit you'll never be able to do this no matter how much CO2 you cheese into your internals tank. - H.adjustBruteLoss(-(light_amount * co2buff * 2)) //even at a full partial pressure of CO2 and full light, you'll only heal half as fast as diona. - H.adjustFireLoss(-(light_amount * co2buff)) //this won't let you tank environmental damage from fire. + if(co2buff && !H.toxloss && light_amount >= 0.1) //if there's enough light and CO2 and you're not poisoned, heal. Note if you're wearing a sealed suit your heal rate will suck. + H.adjustBruteLoss(-(light_amount * co2buff * 2)) //at a full partial pressure of CO2 and full light, you'll only heal half as fast as diona. + H.adjustFireLoss(-(light_amount * co2buff)) //this won't let you tank environmental damage from fire. MAYBE cold until your body temp drops. if(H.nutrition < (200 + 400*co2buff)) //if no CO2, a fully lit tile gives them 1/tick up to 200. With CO2, potentially up to 600. H.nutrition += (light_amount*(1+co2buff*5)) @@ -261,7 +260,7 @@ to_chat(H, "You feel icicles forming on your skin!") else if(breath.temperature >= breath_heat_level_1) if(prob(20)) - src << "You feel yourself smouldering in the heat!" + to_chat(H, "You feel yourself smouldering in the heat!") var/bodypart = pick(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_TORSO,BP_GROIN,BP_HEAD) if(breath.temperature >= breath_heat_level_1) From c8632e8accedb04afb3bb2e219b03ad58d26eaac Mon Sep 17 00:00:00 2001 From: Screemonster Date: Sat, 5 May 2018 06:29:57 +0100 Subject: [PATCH 5/5] adds organs --- .../carbon/human/species/station/alraune.dm | 32 ++++++++++++++++-- icons/mob/species/alraune/organs.dmi | Bin 0 -> 877 bytes 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 icons/mob/species/alraune/organs.dmi diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 526715c239..0f8d7b5622 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -82,9 +82,10 @@ // limited organs, 'cause they're simple has_organ = list( - O_HEART = /obj/item/organ/internal/heart, - O_BRAIN = /obj/item/organ/internal/brain, - O_EYES = /obj/item/organ/internal/eyes, + O_LIVER = /obj/item/organ/internal/liver/alraune, + O_KIDNEYS = /obj/item/organ/internal/kidneys/alraune, + O_BRAIN = /obj/item/organ/internal/brain/alraune, + O_EYES = /obj/item/organ/internal/eyes/alraune, ) /datum/species/alraune/can_breathe_water() @@ -308,3 +309,28 @@ breath.update_values() return 1 + +/obj/item/organ/internal/brain/alraune + icon = 'icons/mob/species/alraune/organs.dmi' + icon_state = "neurostroma" + name = "neuro-stroma" + desc = "A knot of fibrous plant matter." + parent_organ = BP_TORSO // brains in their core + +/obj/item/organ/internal/eyes/alraune + icon = 'icons/mob/species/alraune/organs.dmi' + icon_state = "photoreceptors" + name = "photoreceptors" + desc = "Bulbous and fleshy plant matter." + +/obj/item/organ/internal/kidneys/alraune + icon = 'icons/mob/species/alraune/organs.dmi' + icon_state = "rhyzofilter" + name = "rhyzofilter" + desc = "A tangle of root nodules." + +/obj/item/organ/internal/liver/alraune + icon = 'icons/mob/species/alraune/organs.dmi' + icon_state = "phytoextractor" + name = "phytoextractor" + desc = "A bulbous gourd-like structure." \ No newline at end of file diff --git a/icons/mob/species/alraune/organs.dmi b/icons/mob/species/alraune/organs.dmi new file mode 100644 index 0000000000000000000000000000000000000000..e2da475f67949836775bf419faa185cbb2ff6615 GIT binary patch literal 877 zcmV-z1CsoSP)G@*#)#gw(#rw?{7f(lb(lof%0007DNkl=qQdv&MyN?Mqo=PbizwGrRY6y}4 z&qifqZ_EAHTGRzOnCr6qE&;g$VAR&$&e^LzKW_kPmgSb?ZtP{=0{XgSh1!_bZUE3% zn_~cTF{a-D4f@D)+gj64TM6@#f%n$f9uq+T2G}vDaOyGXlI#QZ#ay@qq13Psz-&0i zSi5Y!?E-HnC2{B=$8gUg$B$5xTk}9T%eQ6u69FoKDxh5wqfy{$b0GxQkz^n=P+7`Q z=G-nYH6FMvF-@`4>J0pJ66TjpKwatt3HX7{u-w*w%t2sK3L0(S!>>vV_? z{!6Q+AM#y%v~bJC4iIa-&3-mI76Tn0fwWb1Ujdws-nlpc$Sfo|iqRd6u()$i!EGYX z3D`(9GxK3ZV4!j>QMK*NVsJRTDs1GHghpeX>lW!Am)J(^R00*=UOjW)^|Y4=RGPiY zQo!2T0j^No0WD+v4piD`Ju`R9q*tJltpLsRJbM?|qoP;XqqyD|0$R7a^$GyrrStQ` zg8&^|gs9(YcJctli;m|YJd^~cp+bEmGz+f_p?s)#J7NeE(>{PG0DhyymxoN5WG!aV zIp_+&?N3el!kFJ5)&n41Iuk&UxUc(;4FTjEPdHjWvrOx-*HXa)I#BTNf=B`c+g164 z?gJeO-G~xO?Go`ESh2%Lg9FGx1m47vbTaxkpj7_^m(z8{X9dXh00000NkvXXu0mjf D(D9ip literal 0 HcmV?d00001