added lipoifium breathing

This commit is contained in:
Swan
2024-12-12 19:56:52 +01:00
parent fc95da1557
commit 74a33d5c7c
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
/obj/item/organ/lungs/proc/lipoifium_breathing(datum/gas_mixture/breath, mob/living/carbon/human/H)
if(breath)
var/pressure = breath.return_pressure()
var/total_moles = breath.total_moles()
#define PP_MOLES(X) ((X / total_moles) * pressure)
#define PP(air, gas) PP_MOLES(air.get_moles(gas))
var/gas_breathed = PP(breath, GAS_FAT)
if(gas_breathed > 0)
H.adjust_fatness(5 * gas_breathed)
breath.adjust_moles(GAS_FAT, -5 * gas_breathed)
/obj/item/organ/lungs/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
lipoifium_breathing(breath, H)
. = ..()
+1
View File
@@ -4241,4 +4241,5 @@
#include "GainStation13\code\__DEFINES\atmospherics.dm"
#include "GainStation13\code\modules\atmospherics\auxgm\gas_types.dm"
#include "GainStation13\code\modules\atmospherics\gasmixtures\reactions.dm"
#include "GainStation13\code\mechanics\lipoifium.dm"
// END_INCLUDE