From a698aa2fd5d6e1dad2e21ec4a6bc9957ce49407b Mon Sep 17 00:00:00 2001 From: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:33:31 -0400 Subject: [PATCH] Simple and basic mobs can breath pluoxium (#76694) ## About The Pull Request Fixes #76661 Also adds new PLUOXIUM_PROPORTION define, this is set to 8 which is currently how better pluoxium is at metabolism compared to oxygen ## Why It's Good For The Game Since pluoxium is 8 times as effective as oxygen, mobs only need 0.625 mol of it compared to 5 mol of oxygen. This is a very small amount, maybe it should just be the same as oxygen? Also pluoxium and oxygen are counted together, so you could have a mix of 0.5 mol of pluoxium and 1 mol of oxygen for example. ## Changelog :cl: fix:Mobs can breathe pluoxium /:cl: Define not player-facing --- code/__DEFINES/atmospherics/atmos_mob_interaction.dm | 3 +++ code/datums/elements/atmos_requirements.dm | 4 ++-- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/simple_animal/simple_animal.dm | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/atmospherics/atmos_mob_interaction.dm b/code/__DEFINES/atmospherics/atmos_mob_interaction.dm index 084a8ba8654..260a80190e7 100644 --- a/code/__DEFINES/atmospherics/atmos_mob_interaction.dm +++ b/code/__DEFINES/atmospherics/atmos_mob_interaction.dm @@ -17,6 +17,9 @@ /// Useful for doing "we're done" effects without duped code #define BREATH_LOST 1 +//The proportion of oxygen needed for metabolism compared to pluoxium. (Pluoxium is this many times efficient as oxygen) +#define PLUOXIUM_PROPORTION 8 + //Defines for N2O and Healium euphoria moodlets #define EUPHORIA_INACTIVE 0 #define EUPHORIA_ACTIVE 1 diff --git a/code/datums/elements/atmos_requirements.dm b/code/datums/elements/atmos_requirements.dm index b863697d08a..1ac10f02027 100644 --- a/code/datums/elements/atmos_requirements.dm +++ b/code/datums/elements/atmos_requirements.dm @@ -46,10 +46,10 @@ return FALSE var/open_turf_gases = open_turf.air.gases - open_turf.air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma) + open_turf.air.assert_gases(/datum/gas/oxygen, /datum/gas/pluoxium, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma) var/plas = open_turf_gases[/datum/gas/plasma][MOLES] - var/oxy = open_turf_gases[/datum/gas/oxygen][MOLES] + var/oxy = open_turf_gases[/datum/gas/oxygen][MOLES] + (open_turf_gases[/datum/gas/pluoxium][MOLES] * PLUOXIUM_PROPORTION) var/n2 = open_turf_gases[/datum/gas/nitrogen][MOLES] var/co2 = open_turf_gases[/datum/gas/carbon_dioxide][MOLES] diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index a068c69ba59..a06bee297fb 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -208,7 +208,7 @@ // Breath has more than 0 moles of gas. // Partial pressures of "main gases". pluoxium_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES]) - o2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES] + (8 * pluoxium_pp)) + o2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES] + (PLUOXIUM_PROPORTION * pluoxium_pp)) plasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES]) co2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES]) // Partial pressures of "trace" gases. diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 9d63e2e7340..63f1565a1a8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -322,10 +322,10 @@ var/turf/open/ST = loc if(ST.air) var/ST_gases = ST.air.gases - ST.air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma) + ST.air.assert_gases(/datum/gas/oxygen, /datum/gas/pluoxium, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma) var/plas = ST_gases[/datum/gas/plasma][MOLES] - var/oxy = ST_gases[/datum/gas/oxygen][MOLES] + var/oxy = ST_gases[/datum/gas/oxygen][MOLES] + (ST_gases[/datum/gas/pluoxium][MOLES] * PLUOXIUM_PROPORTION) var/n2 = ST_gases[/datum/gas/nitrogen][MOLES] var/co2 = ST_gases[/datum/gas/carbon_dioxide][MOLES]