@@ -0,0 +1 @@
|
||||
#define GAS_FAT "lipoifium"
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/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()
|
||||
var/lipoifium_moles = breath.get_moles(GAS_FAT)
|
||||
#define PP_MOLES(X) ((X / total_moles) * pressure)
|
||||
var/gas_breathed = PP_MOLES(lipoifium_moles) // 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)
|
||||
// listen I know I can debug this but sometimes having this show up in chat without a pause is more convenient
|
||||
// message_admins("Lipoifium pp is [gas_breathed]")
|
||||
// message_admins("Lipoifium moles are [lipoifium_moles]")
|
||||
H.adjust_fatness(2 * gas_breathed, FATTENING_TYPE_ATMOS)
|
||||
breath.adjust_moles(GAS_FAT, -gas_breathed)
|
||||
// TODO: the entire code below is a workaround for default odor not working
|
||||
// The problem seems to be auxmos'es get_gasses function not acknowledging that lipoifium exists
|
||||
// which is strange, considering that everything else regarding this gas and auxmos works
|
||||
// I do not know what kind of spaghetti coding must be going on there, but I pray god has in his
|
||||
// care the poor sods who have to work on that
|
||||
var/smell_chance = min(lipoifium_moles * 100 / total_moles, 20)
|
||||
if(prob(smell_chance))
|
||||
to_chat(owner, "<span class='notice'>You can smell lard.</span>")
|
||||
|
||||
|
||||
/obj/item/organ/lungs/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
lipoifium_breathing(breath, H)
|
||||
. = ..()
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/gas/lipoifium
|
||||
id = GAS_FAT
|
||||
specific_heat = 20
|
||||
name = "Lipoifium"
|
||||
moles_visible = MOLES_GAS_VISIBLE
|
||||
color = "#e2e1b1"
|
||||
odor = "that this is a function that wasn't working, but it now, for some reason, is. You should speak to the gods about this and the conditions under which it happened"
|
||||
odor_strength = 1 // TODO: doesn't work for now
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/datum/gas_reaction/lipoifium_formation
|
||||
priority = 7
|
||||
name = "Lipoifium Formation"
|
||||
id = "lipoifium_formation"
|
||||
|
||||
/datum/gas_reaction/lipoifium_formation/init_reqs()
|
||||
min_requirements = list(
|
||||
"MAX_TEMP" = 100,
|
||||
GAS_BZ = 15,
|
||||
GAS_TRITIUM = 15
|
||||
)
|
||||
|
||||
/datum/gas_reaction/lipoifium_formation/react(datum/gas_mixture/air)
|
||||
if (air.get_moles(GAS_BZ) < 15 || air.get_moles(GAS_TRITIUM) < 15)
|
||||
return NO_REACTION
|
||||
var/temperature = air.return_temperature()
|
||||
var/reaction_efficiency = 0
|
||||
if (temperature <= 5)
|
||||
reaction_efficiency = 1
|
||||
else if (temperature >= 100)
|
||||
return NO_REACTION
|
||||
else
|
||||
reaction_efficiency = -((temperature - 5) / 95) + 1 // will equal 1 at 5 kelvin, and will linearly fall until 0 at 100k
|
||||
|
||||
var/energy_released = reaction_efficiency * FIRE_CARBON_ENERGY_RELEASED
|
||||
var/old_heat_capacity = air.heat_capacity()
|
||||
air.adjust_moles(GAS_FAT, reaction_efficiency)
|
||||
air.adjust_moles(GAS_TRITIUM, -reaction_efficiency / 2)
|
||||
air.adjust_moles(GAS_BZ, -reaction_efficiency / 2)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
air.set_temperature(max((temperature * old_heat_capacity + energy_released) / new_heat_capacity, TCMB))
|
||||
|
||||
return REACTING
|
||||
@@ -0,0 +1,6 @@
|
||||
/obj/machinery/portable_atmospherics/canister/lipoifium
|
||||
name = "lipoifium canister"
|
||||
desc = "Lipoifium. Inhaling causes quick buildup of adipose in one's body."
|
||||
icon = 'GainStation13/icons/obj/atmos.dmi'
|
||||
icon_state = "yellowblack"
|
||||
gas_type = GAS_FAT
|
||||
@@ -15,6 +15,8 @@
|
||||
var/weight_gain_viruses = FALSE
|
||||
///Weight gain from nanites
|
||||
var/weight_gain_nanites = FALSE
|
||||
//Weight gain from atmos gasses
|
||||
var/weight_gain_atmos = FALSE
|
||||
///Blueberry Inflation
|
||||
var/blueberry_inflation = FALSE
|
||||
///Extreme weight gain
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -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.
|
||||
|
||||
@@ -60,7 +60,10 @@
|
||||
"caution" = /obj/machinery/portable_atmospherics/canister,
|
||||
"miasma" = /obj/machinery/portable_atmospherics/canister/miasma,
|
||||
"methane" = /obj/machinery/portable_atmospherics/canister/methane,
|
||||
"methyl bromide" = /obj/machinery/portable_atmospherics/canister/methyl_bromide
|
||||
"methyl bromide" = /obj/machinery/portable_atmospherics/canister/methyl_bromide,
|
||||
// GS13 - edit
|
||||
"lipoifium" = /obj/machinery/portable_atmospherics/canister/lipoifium // :D
|
||||
//GS13 - end edit
|
||||
)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/interact(mob/user)
|
||||
@@ -396,6 +399,13 @@
|
||||
investigate_log("was relabelled to [initial(replacement.name)] by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
name = initial(replacement.name)
|
||||
desc = initial(replacement.desc)
|
||||
// GS13 - edit
|
||||
cut_overlays() // removes all overlays (connector, tank...).
|
||||
icon = initial(replacement.icon) // changes icon file
|
||||
// you may notice that we do not add the overlays back after removing them,
|
||||
// yet they stay when we relabel a can. How? I have no idea. But it works,
|
||||
// and as such, I won't question it
|
||||
// GS13 - end edit
|
||||
icon_state = initial(replacement.icon_state)
|
||||
if("restricted")
|
||||
restricted = !restricted
|
||||
|
||||
@@ -1411,6 +1411,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Magic:</b><a href='?_src_=prefs;preference=weight_gain_magic'>[weight_gain_magic == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Viruses:</b><a href='?_src_=prefs;preference=weight_gain_viruses'>[weight_gain_viruses == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Nanites:</b><a href='?_src_=prefs;preference=weight_gain_nanites'>[weight_gain_nanites == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Atmos gasses:</b><a href='?_src_=prefs;preference=weight_gain_atmos'>[weight_gain_atmos == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "</td>"
|
||||
|
||||
dat +="<td width='300px' height='300px' valign='top'>"
|
||||
@@ -3458,6 +3459,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
weight_gain_viruses = !weight_gain_viruses
|
||||
if("weight_gain_nanites")
|
||||
weight_gain_nanites = !weight_gain_nanites
|
||||
if("weight_gain_atmos")
|
||||
weight_gain_atmos = !weight_gain_atmos
|
||||
if("weight_gain_extreme")
|
||||
weight_gain_extreme = !weight_gain_extreme
|
||||
if("weight_gain_persistent")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -3922,6 +3922,7 @@
|
||||
#include "code\modules\VR\vr_sleeper.dm"
|
||||
#include "code\modules\zombie\items.dm"
|
||||
#include "code\modules\zombie\organs.dm"
|
||||
#include "GainStation13\code\__DEFINES\atmospherics.dm"
|
||||
#include "GainStation13\code\__HELPERS\global_lists.dm"
|
||||
#include "GainStation13\code\__HELPERS\transformation.dm"
|
||||
#include "GainStation13\code\clothing\accessory.dm"
|
||||
@@ -3983,6 +3984,7 @@
|
||||
#include "GainStation13\code\mechanics\calorite.dm"
|
||||
#include "GainStation13\code\mechanics\fatness.dm"
|
||||
#include "GainStation13\code\mechanics\fatrousal.dm"
|
||||
#include "GainStation13\code\mechanics\fattening_gasses.dm"
|
||||
#include "GainStation13\code\mechanics\fattening_trap.dm"
|
||||
#include "GainStation13\code\mechanics\helplessness.dm"
|
||||
#include "GainStation13\code\mechanics\infestation.dm"
|
||||
@@ -4005,6 +4007,9 @@
|
||||
#include "GainStation13\code\mobs\emote.dm"
|
||||
#include "GainStation13\code\mobs\races\caloritegolem.dm"
|
||||
#include "GainStation13\code\modules\arousal\arousal.dm"
|
||||
#include "GainStation13\code\modules\atmospherics\auxgm\gas_types.dm"
|
||||
#include "GainStation13\code\modules\atmospherics\gasmixtures\reactions.dm"
|
||||
#include "GainStation13\code\modules\atmospherics\machinery\portable\canister.dm"
|
||||
#include "GainStation13\code\modules\cargo\packs.dm"
|
||||
#include "GainStation13\code\modules\client\border_control.dm"
|
||||
#include "GainStation13\code\modules\client\loadout\head.dm"
|
||||
|
||||
Reference in New Issue
Block a user