Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempts to Fix Temperature + Makes It More Realistic in the Face of Extreme Temperatures #3512

Merged
merged 41 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
47dbafe
:3
rye-rice Sep 19, 2024
15943ed
x
rye-rice Sep 20, 2024
c5e50e5
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Oct 5, 2024
b7a7326
yep
rye-rice Oct 5, 2024
cbe5094
pushing
rye-rice Oct 13, 2024
9879c59
works
rye-rice Oct 13, 2024
0b7fd51
test
rye-rice Oct 14, 2024
76b326e
fine tuning
rye-rice Oct 15, 2024
95508fb
sorothy nerf/buf
rye-rice Oct 15, 2024
e09fda7
wag
rye-rice Oct 15, 2024
609ce57
species changes, makes people not Die on fucking dying due to bodies …
rye-rice Oct 16, 2024
67c5322
more stuff
rye-rice Oct 16, 2024
baf98e9
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Oct 19, 2024
09db16f
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Oct 23, 2024
9d26479
oops
rye-rice Oct 24, 2024
58a0748
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Oct 29, 2024
ed734a7
yeah
rye-rice Oct 29, 2024
7501aef
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Nov 10, 2024
f487d76
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Nov 10, 2024
56513e9
a
rye-rice Nov 14, 2024
96825be
better ws-mos
rye-rice Nov 15, 2024
2305bbf
kepoury fixes
rye-rice Nov 16, 2024
2c580f4
kep 2
rye-rice Nov 16, 2024
45d815e
kepoury fixes
rye-rice Nov 16, 2024
1126d71
basilkis nerf
rye-rice Nov 16, 2024
0a053be
basilisk nerf
rye-rice Nov 16, 2024
ce9d85a
weather temp nerfs
rye-rice Nov 16, 2024
3ae8198
slipfix
rye-rice Nov 16, 2024
2fad4e2
yees
rye-rice Nov 16, 2024
6b10564
better idea
rye-rice Nov 16, 2024
433a59b
water be gone
rye-rice Nov 16, 2024
820646e
wawa
rye-rice Nov 17, 2024
e44bdca
probably for the best
rye-rice Nov 17, 2024
df73466
Merge remote-tracking branch 'upstream/master' into tempplus
rye-rice Nov 20, 2024
02a97bf
dumbass, i am
rye-rice Nov 20, 2024
c9a8e44
fix
rye-rice Nov 20, 2024
27d3b86
i fucking give up, noticable heat at 35c, way too high but i really d…
rye-rice Nov 21, 2024
03443c1
edge cases my ass
rye-rice Nov 21, 2024
9979716
pre-adressing reviews
rye-rice Nov 21, 2024
8c202b0
temp gun nerf
rye-rice Nov 21, 2024
3bb7c4f
moar edgecases
rye-rice Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@
#define KITCHEN_COLDROOM_ATMOS "o2=33;n2=124;TEMP=193.15"
/// used in the holodeck burn test program
#define BURNMIX_ATMOS "o2=2500;plasma=5000;TEMP=370"
/// used in rockplanet
#define ROCKPLANET_DEFAULT_ATMOS "co2=95;n2=3;TEMP=210.15"
//ATMOSPHERICS DEPARTMENT GAS TANK TURFS
#define ATMOS_TANK_N2O "n2o=6000;TEMP=293.15"
#define ATMOS_TANK_CO2 "co2=50000;TEMP=293.15"
Expand All @@ -226,11 +224,16 @@
//PLANETARY
/// what pressure you have to be under to increase the effect of equipment meant for lavaland
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 90
#define ICEMOON_DEFAULT_ATMOS "ICEMOON_ATMOS"
#define GAS_GIANT_ATMOS "GAS_GIANT_ATMOS"
#define PLASMA_GIANT_ATMOS "PLASMA_GIANT_ATMOS"
#define WASTEPLANET_DEFAULT_ATMOS "WASTEPLANET_ATMOS"
#define DEFAULT_ATMOS_DETECTOR "plasma=70000;TEMP=293.15"
#define LAVALAND_DEFAULT_ATMOS "LAVALAND_ATMOS"
#define ICEMOON_DEFAULT_ATMOS "ICEMOON_ATMOS"
#define WASTEPLANET_DEFAULT_ATMOS "WASTEPLANET_ATMOS"
#define ROCKPLANET_DEFAULT_ATMOS "ROCKPLANET_ATMOS"
#define BEACHPLANET_DEFAULT_ATMOS "BEACHPLANET_ATMOS"
#define JUNGLEPLANET_DEFAULT_ATMOS "JUNGLEPLANET_ATMOS"
#define SANDPLANET_DEFAULT_ATMOS "SANDPLANET_ATMOS"


//ATMOS MIX IDS
Expand Down
26 changes: 13 additions & 13 deletions code/__DEFINES/species.dm
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
// Pressure limits.
/// This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
#define HAZARD_HIGH_PRESSURE 550
/// This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
#define WARNING_HIGH_PRESSURE 325
/// This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE)
#define WARNING_LOW_PRESSURE 50
/// This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)
#define HAZARD_LOW_PRESSURE 20
/// This determins at what pressure the ultra-high pressure red icon is displayed.
#define HAZARD_HIGH_PRESSURE 303
/// This determins when the orange pressure icon is displayed
#define WARNING_HIGH_PRESSURE 202
/// This is when the gray low pressure icon is displayed.
#define WARNING_LOW_PRESSURE 60
/// This is when the black ultra-low pressure icon is displayed.
#define HAZARD_LOW_PRESSURE 40

/// This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5

/// The natural temperature for a body
#define HUMAN_BODYTEMP_NORMAL 310.15
/// This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
#define HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR 11
#define HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR 22
/// Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
#define HUMAN_BODYTEMP_AUTORECOVERY_MINIMUM 12
///Similar to the HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
#define HUMAN_BODYTEMP_COLD_DIVISOR 15
#define HUMAN_BODYTEMP_COLD_DIVISOR 20
/// Similar to the HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
#define HUMAN_BODYTEMP_HEAT_DIVISOR 15
#define HUMAN_BODYTEMP_HEAT_DIVISOR 10
/// The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
#define HUMAN_BODYTEMP_COOLING_MAX -100
/// The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
#define HUMAN_BODYTEMP_HEATING_MAX 30
/// The body temperature limit the human body can take before it starts taking damage from heat.
/// This also affects how fast the body normalises it's temperature when hot.
/// 340k is about 66c, and rather high for a human.
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 30)
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 3)
/// The body temperature limit the human body can take before it starts taking damage from cold.
/// This also affects how fast the body normalises it's temperature when cold.
/// 270k is about -3c, that is below freezing and would hurt over time.
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 40)
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 8)


//VOX DEFINES
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Override makes it so the alert is not replaced until cleared by a clear_alert wi

/atom/movable/screen/alert/sweat
name = "Sweating"
desc = "You're sweating and the heat is starting to hurt. Get somewhere cooler and take off any insulating clothing like a fire suit."
desc = "You're sweating and the heat is starting to hurt. Stay hydrated, get somewhere cooler, and take off any insulating clothing like a fire suit."
icon_state = "sweat"

/atom/movable/screen/alert/shiver
Expand Down
163 changes: 131 additions & 32 deletions code/datums/atmosphere/planetary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
)
restricted_gases = list(
GAS_BZ=10,
GAS_PLASMA=0.1,
GAS_H2O=0.1,
)
restricted_chance = 50

Expand All @@ -26,12 +24,65 @@
// even worse, occasionally there would be a perma-TRITFIRE, if oxygen
// concentration was high enough. this caused a bunch of lag and added nothing to the game whatsoever
// thus, the temperatures were reduced to 70-90 C
minimum_temp = T20C + 50
maximum_temp = T20C + 70
minimum_temp = T20C + 20
maximum_temp = T20C + 40

/datum/atmosphere/icemoon
id = ICEMOON_DEFAULT_ATMOS

base_gases = list(
GAS_O2=5,
GAS_N2=10,
)
normal_gases = list(
GAS_O2=10,
GAS_N2=10,
GAS_CO2=10,
)
restricted_gases = list(
GAS_CO2=0.1,
)
restricted_chance = 50

minimum_pressure = HAZARD_LOW_PRESSURE + 10
maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1


minimum_temp = 200 //fucking cold to
maximum_temp = 240 //still cold


//wasteplanet

/datum/atmosphere/wasteplanet
id = WASTEPLANET_DEFAULT_ATMOS


base_gases = list(
GAS_O2=7,
GAS_N2=10,
)
normal_gases = list(
GAS_O2=7,
GAS_O2=3,
GAS_N2=5,
GAS_N2=2
)
restricted_gases = list(
GAS_O2=1,
)
restricted_chance = 0

minimum_pressure = ONE_ATMOSPHERE - 30
maximum_pressure = ONE_ATMOSPHERE + 100

minimum_temp = T20C - 10
maximum_temp = T20C + 20

//sandplanet
/datum/atmosphere/whitesands
id = SANDPLANET_DEFAULT_ATMOS

base_gases = list(
GAS_O2=5,
GAS_N2=10,
Expand All @@ -43,16 +94,89 @@
)
restricted_gases = list(
GAS_PLASMA=0.1,
GAS_H2O=0.1,
)
restricted_chance = 50

minimum_pressure = HAZARD_LOW_PRESSURE + 10
maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1

minimum_temp = 180
maximum_temp = 180
minimum_temp = 233
maximum_temp = 263 //No longer always 180

//Jungleplanet

/datum/atmosphere/jungleplanet
id = JUNGLEPLANET_DEFAULT_ATMOS

base_gases = list(
GAS_O2=15,
GAS_N2=60,
GAS_CO2=1,
)
normal_gases = list(
GAS_O2=1,
GAS_N2=4,
)
restricted_gases = list(
GAS_CO2=0.1,
)
restricted_chance = 0

minimum_pressure = 101.3
maximum_pressure = 135.7 //Nonsense values

minimum_temp = T20C + 10
maximum_temp = T20C + 20

//welcome to the beach

/datum/atmosphere/beach
id = BEACHPLANET_DEFAULT_ATMOS

base_gases = list(
GAS_O2=10,
GAS_N2=40,
)
normal_gases = list(
GAS_O2=1,
GAS_N2=4,
)
restricted_gases = list(
GAS_PLASMA=0.1,
)
restricted_chance = 0

minimum_pressure = 101.3
maximum_pressure = 135.7

minimum_temp = T20C - 10
maximum_temp = T20C + 10

//rockplanets have lots of CO2 and are moderately cold.
/datum/atmosphere/rockplanet

id = ROCKPLANET_DEFAULT_ATMOS

base_gases = list(
GAS_CO2=5,
GAS_N2=1,
)
normal_gases = list(
GAS_CO2=3,
GAS_N2=1,
)
restricted_gases = list(
GAS_PLASMA=0.1,
)
restricted_chance = 0

minimum_pressure = 101.3
maximum_pressure = 135.7

minimum_temp = T0C - 20
maximum_temp = T0C

// gas giants
/datum/atmosphere/gas_giant
id = GAS_GIANT_ATMOS

Expand Down Expand Up @@ -92,28 +216,3 @@
GAS_PLASMA=0.1,
)
restricted_chance = 1

/datum/atmosphere/wasteplanet
id = WASTEPLANET_DEFAULT_ATMOS


base_gases = list(
GAS_O2=7,
GAS_N2=10,
)
normal_gases = list(
GAS_O2=7,
GAS_O2=3,
GAS_N2=5,
GAS_N2=2
)
restricted_gases = list(
GAS_H2O=1,
)
restricted_chance = 10

minimum_pressure = ONE_ATMOSPHERE - 30
maximum_pressure = ONE_ATMOSPHERE + 100

minimum_temp = T20C + 1
maximum_temp = T20C + 80
25 changes: 0 additions & 25 deletions code/datums/mapgen/Whitesandsatmos.dm
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
#define WHITESANDS_WALL_ENV "rock"
#define WHITESANDS_SAND_ENV "sand"
#define WHITESANDS_DRIED_ENV "dried_up"
#define WHITESANDS_ATMOS "ws_atmos"

/datum/atmosphere/whitesands
id = WHITESANDS_ATMOS

base_gases = list(
GAS_O2=5,
GAS_N2=10,
)
normal_gases = list(
GAS_O2=10,
GAS_N2=10,
GAS_CO2=10,
)
restricted_gases = list(
GAS_PLASMA=0.1,
GAS_H2O=0.1,
)
restricted_chance = 50

minimum_pressure = HAZARD_LOW_PRESSURE + 10
maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1

minimum_temp = 180
maximum_temp = 180
2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/hailstorm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
/// Think of some good solution of how weather should affect monsters and how they should be resistant to things like this
if(isanimal(living_mob))
return
living_mob.adjust_bodytemperature(-rand(3,6))
living_mob.adjust_bodytemperature(-rand(1,2))
living_mob.adjustBruteLoss(rand(2,4))
2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/snow_storm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
sound_weak_inside = /datum/looping_sound/weak_inside_ashstorm

/datum/weather/snow_storm/weather_act(mob/living/living_mob)
living_mob.adjust_bodytemperature(-rand(5,15))
living_mob.adjust_bodytemperature(-rand(2,4))

2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/snowfall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
thunder_chance = 2

/datum/weather/snowfall/heavy/weather_act(mob/living/living_mob)
living_mob.adjust_bodytemperature(-rand(2,4))
living_mob.adjust_bodytemperature(-rand(1,2))
13 changes: 13 additions & 0 deletions code/game/objects/effects/particles/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,16 @@
fadein = 0.7 SECONDS
position = generator(GEN_VECTOR, list(-3, 5, 0), list(3, 6.5, 0), NORMAL_RAND)
velocity = generator(GEN_VECTOR, list(-0.1, 0.4, 0), list(0.1, 0.5, 0), NORMAL_RAND)

/particles/fog
icon = 'icons/effects/particles/smoke.dmi'
icon_state = list("chill_1" = 2, "chill_2" = 2, "chill_3" = 1)

/particles/fog/breath
count = 1
spawning = 1
lifespan = 1 SECONDS
fade = 0.5 SECONDS
grow = 0.05
spin = 2
color = "#fcffffff"
4 changes: 2 additions & 2 deletions code/game/objects/structures/shower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@

if(current_temperature == SHOWER_FREEZING)
if(iscarbon(L))
C.adjust_bodytemperature(-80, 80)
C.adjust_bodytemperature(-5, 280)
to_chat(L, "<span class='warning'>[src] is freezing!</span>")
else if(current_temperature == SHOWER_BOILING)
if(iscarbon(L))
C.adjust_bodytemperature(35, 0, 500)
C.adjust_bodytemperature(5, 0, 350)
L.adjustFireLoss(5)
to_chat(L, "<span class='danger'>[src] is searing!</span>")

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/traps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
/obj/structure/trap/chill/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>You're frozen solid!</B></span>")
L.Paralyze(20)
L.adjust_bodytemperature(-300)
L.adjust_bodytemperature(-20)
L.apply_status_effect(/datum/status_effect/freon)


Expand Down
Loading
Loading