Replaces the changeling spacesuit with a passive ability (#78763)

## About The Pull Request

Fixes #74168

I was going to make changes to the changeling spacesuit so that it works
on Icebox but then I thought, why not _not_ do that.
This isn't a commonly picked adaption so why don't we make it a little
better.

What's more spooky, hearing a knock on the window and seeing a fat suit
outside? Or this?

![image](https://github.com/tgstation/tgstation/assets/7483112/b87dec0c-5e98-45a5-8f83-f7a2967c743f)

Picking Void Adaption will now make you immune to low temperature and
pressure (but not high temperature and pressure) and you will stop
breathing. If you enter an area with low temperature or pressure then
your chemical regeneration rate will decrease until you leave that area.
Because it doesn't put a suit on you, it now also works during Lesser
Form.

While testing this I noticed that we weren't calling `Grant` on passive
changeling abilities for some reason, I replaced that with the
already-written interface for making "an action which doesn't give you a
button".

If people really _really_ miss the fat suit I guess I'll rework that
instead, but I think I like this more.

## Why It's Good For The Game

Makes a niche-pick ability more useful and easier to use.
Meteor Changelings who land on Icebox now don't roll a dice to see if
they get instantly knocked out by the atmosphere there.

## Changelog

🆑
balance: The Changeling Space Suit has been replaced by a new ability
which makes you passively spaceproof without replacing your clothing.
admin: Editing the atmos sensitivity variables on a basic mob during the
game will now actually do something.
/🆑
This commit is contained in:
Jacquerel
2023-10-10 03:09:21 +01:00
committed by GitHub
parent 44d6e7a03c
commit 389cdd6716
9 changed files with 113 additions and 93 deletions
+39 -9
View File
@@ -117,13 +117,23 @@
if(speak_emote)
speak_emote = string_list(speak_emote)
if(unsuitable_atmos_damage != 0)
//String assoc list returns a cached list, so this is like a static list to pass into the element below.
habitable_atmos = string_assoc_list(habitable_atmos)
AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage)
apply_atmos_requirements()
apply_temperature_requirements()
/// Ensures this mob can take atmospheric damage if it's supposed to
/mob/living/basic/proc/apply_atmos_requirements()
if(unsuitable_atmos_damage == 0)
return
//String assoc list returns a cached list, so this is like a static list to pass into the element below.
habitable_atmos = string_assoc_list(habitable_atmos)
AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage)
/// Ensures this mob can take temperature damage if it's supposed to
/mob/living/basic/proc/apply_temperature_requirements()
if(unsuitable_cold_damage == 0 && unsuitable_heat_damage == 0)
return
AddElement(/datum/element/basic_body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
if(unsuitable_cold_damage != 0 && unsuitable_heat_damage != 0)
AddElement(/datum/element/basic_body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT, times_fired)
. = ..()
@@ -207,10 +217,24 @@
melee_attack(attack_target, modifiers)
/mob/living/basic/vv_edit_var(vname, vval)
switch(vname)
if(NAMEOF(src, habitable_atmos), NAMEOF(src, unsuitable_atmos_damage))
RemoveElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage)
. = TRUE
if(NAMEOF(src, minimum_survivable_temperature), NAMEOF(src, maximum_survivable_temperature), NAMEOF(src, unsuitable_cold_damage), NAMEOF(src, unsuitable_heat_damage))
RemoveElement(/datum/element/basic_body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
. = TRUE
. = ..()
if(vname == NAMEOF(src, speed))
datum_flags |= DF_VAR_EDITED
set_varspeed(vval)
switch(vname)
if(NAMEOF(src, habitable_atmos), NAMEOF(src, unsuitable_atmos_damage))
apply_atmos_requirements()
if(NAMEOF(src, minimum_survivable_temperature), NAMEOF(src, maximum_survivable_temperature), NAMEOF(src, unsuitable_cold_damage), NAMEOF(src, unsuitable_heat_damage))
apply_temperature_requirements()
if(NAMEOF(src, speed))
datum_flags |= DF_VAR_EDITED
set_varspeed(vval)
/mob/living/basic/proc/set_varspeed(var_value)
speed = var_value
@@ -260,3 +284,9 @@
else if(on_fire && !isnull(last_icon_state))
return last_icon_state
return null
/mob/living/basic/get_body_temp_heat_damage_limit()
return maximum_survivable_temperature
/mob/living/basic/get_body_temp_cold_damage_limit()
return minimum_survivable_temperature