diff --git a/GainStation13/code/mechanics/lipoifium.dm b/GainStation13/code/mechanics/lipoifium.dm new file mode 100644 index 0000000000..55a03ae3cb --- /dev/null +++ b/GainStation13/code/mechanics/lipoifium.dm @@ -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) + . = ..() diff --git a/tgstation.dme b/tgstation.dme index e64ca33ff5..50c6214c03 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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