From 00b06c66b6c08c6e0b6049d3e03727cb3df83412 Mon Sep 17 00:00:00 2001 From: Swan <122107181+NiceNiceSwan@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:16:15 +0100 Subject: [PATCH] added atmos WG prefs --- GainStation13/code/mechanics/fatness.dm | 4 ++++ GainStation13/code/mechanics/lipoifium.dm | 6 ++---- code/__DEFINES/misc.dm | 1 + code/modules/client/preferences_savefile.dm | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index f845f50b68..b2c370571f 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -124,6 +124,10 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/command/bridge, /area/mainten if(!client?.prefs?.weight_gain_nanites) return FALSE + if(FATTENING_TYPE_ATMOS) + if(!client?.prefs?.weight_gain_atmos) + return FALSE + if(FATTENING_TYPE_WEIGHT_LOSS) if(HAS_TRAIT(src, TRAIT_WEIGHT_LOSS_IMMUNE)) return FALSE diff --git a/GainStation13/code/mechanics/lipoifium.dm b/GainStation13/code/mechanics/lipoifium.dm index 1d2c561027..bca6497c9e 100644 --- a/GainStation13/code/mechanics/lipoifium.dm +++ b/GainStation13/code/mechanics/lipoifium.dm @@ -3,13 +3,11 @@ var/pressure = breath.return_pressure() var/total_moles = breath.total_moles() #define PP_MOLES(X) ((X / total_moles) * pressure) - var/gas_breathed = PP_MOLES(breath.get_moles(GAS_FAT)) + var/gas_breathed = PP_MOLES(breath.get_moles(GAS_FAT)) // this does the same thing as the bit below but I think this is more readable // #define PP(air, gas) PP_MOLES(air.get_moles(gas)) // var/gas_breathed = PP(breath, GAS_FAT) if(gas_breathed > 0) - // investigate_log("Supermatter shard consumed by singularity.", INVESTIGATE_SINGULO) - // message_admins("gas breathed is: [gas_breathed]") - H.adjust_fatness(5 * gas_breathed) + H.adjust_fatness(5 * gas_breathed, FATTENING_TYPE_ATMOS) breath.adjust_moles(GAS_FAT, -gas_breathed) /obj/item/organ/lungs/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index e10e19c1c5..d914f07c15 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -593,6 +593,7 @@ GLOBAL_LIST_INIT(pda_reskins, list( #define FATTENING_TYPE_MAGIC "magic" #define FATTENING_TYPE_VIRUS "virus" #define FATTENING_TYPE_NANITES "nanites" +#define FATTENING_TYPE_ATMOS "atmos" // yeah I'm taking the name atmos instead of gasses, because fuck you I'm not calling my pref "inflation type gas", some people will get confused, if you wanna do inflation just call it that lol #define FATTENING_TYPE_RADIATIONS "radiations" #define FATTENING_TYPE_WEIGHT_LOSS "weight_loss" #define FATTENING_TYPE_ALMIGHTY "almighty" //This ignores prefs, please only use this for smites and other admin controlled instances. diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index df44203998..09e7a10661 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -925,6 +925,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["weight_gain_magic"] >> weight_gain_magic S["weight_gain_viruses"] >> weight_gain_viruses S["weight_gain_nanites"] >> weight_gain_nanites + S["weight_gain_atmos"] >> weight_gain_atmos S["weight_gain_weapons"] >> weight_gain_weapons S["weight_gain_extreme"] >> weight_gain_extreme S["weight_gain_persistent"] >> weight_gain_persistent @@ -1220,6 +1221,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["weight_gain_magic"], weight_gain_magic) WRITE_FILE(S["weight_gain_viruses"], weight_gain_viruses) WRITE_FILE(S["weight_gain_nanites"], weight_gain_nanites) + WRITE_FILE(S["weight_gain_atmos"], weight_gain_atmos) WRITE_FILE(S["weight_gain_chems"], weight_gain_chems) WRITE_FILE(S["weight_gain_weapons"], weight_gain_weapons) WRITE_FILE(S["weight_gain_extreme"], weight_gain_extreme)