Merge remote-tracking branch 'skrat/master' into new-bubbermaster

# Conflicts:
#	_maps/RandomRuins/SpaceRuins/hilbertresearchfacility.dmm
#	_maps/RandomRuins/SpaceRuins/skyrat/interdynefob.dmm
#	_maps/map_files/Birdshot/birdshot.dmm
#	_maps/map_files/Deltastation/DeltaStation2.dmm
#	_maps/map_files/IceBoxStation/IceBoxStation.dmm
#	_maps/map_files/MetaStation/MetaStation.dmm
#	_maps/map_files/NorthStar/north_star.dmm
#	_maps/map_files/VoidRaptor/VoidRaptor.dmm
#	_maps/map_files/tramstation/tramstation.dmm
#	_maps/shuttles/pirate_ex_interdyne.dmm
#	code/__DEFINES/mobs.dm
#	code/__HELPERS/~skyrat_helpers/is_helpers.dm
#	code/datums/mood.dm
#	code/game/objects/effects/spawners/random/random.dm
#	code/modules/admin/verbs/adminhelp.dm
#	code/modules/clothing/head/jobs.dm
#	code/modules/mob/living/brain/brain_say.dm
#	code/modules/projectiles/guns/energy/kinetic_accelerator.dm
#	code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_jelly.png
#	code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_jelly_stargazer.png
#	code/modules/uplink/uplink_items/job.dm
#	config/lavaruinblacklist.txt
#	icons/mob/actions/actions_changeling.dmi
#	icons/mob/clothing/mask.dmi
#	icons/obj/mining.dmi
#	modular_skyrat/master_files/code/modules/client/preferences/headshot.dm
#	modular_skyrat/master_files/code/modules/mob/living/examine_tgui.dm
#	modular_skyrat/master_files/code/modules/research/techweb/all_nodes.dm
#	modular_skyrat/master_files/icons/mob/clothing/under/skirts_dresses.dmi
#	modular_skyrat/master_files/icons/obj/clothing/under/skirts_dresses.dmi
#	modular_skyrat/modules/aesthetics/airlock/icons/airlocks/multi_tile/metal_overlays.dmi
#	modular_skyrat/modules/colony_fabricator/code/appliances/space_heater.dm
#	modular_skyrat/modules/company_imports/code/armament_datums/deforest_medical.dm
#	modular_skyrat/modules/hyposprays/code/hypospray_kits.dm
#	strings/traumas.json
#	tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/headshot.tsx
This commit is contained in:
nevimer
2024-04-20 22:19:03 -04:00
2516 changed files with 78843 additions and 55503 deletions
+21 -12
View File
@@ -93,9 +93,9 @@
var/minimum_survivable_temperature = NPC_DEFAULT_MIN_TEMP
///Maximal body temperature without receiving damage
var/maximum_survivable_temperature = NPC_DEFAULT_MAX_TEMP
///This damage is taken when the body temp is too cold. Set both this and unsuitable_heat_damage to 0 to avoid adding the basic_body_temp_sensitive element.
///This damage is taken when the body temp is too cold. Set both this and unsuitable_heat_damage to 0 to avoid adding the body_temp_sensitive element.
var/unsuitable_cold_damage = 1
///This damage is taken when the body temp is too hot. Set both this and unsuitable_cold_damage to 0 to avoid adding the basic_body_temp_sensitive element.
///This damage is taken when the body temp is too hot. Set both this and unsuitable_cold_damage to 0 to avoid adding the body_temp_sensitive element.
var/unsuitable_heat_damage = 1
/mob/living/basic/Initialize(mapload)
@@ -115,23 +115,32 @@
if(speak_emote)
speak_emote = string_list(speak_emote)
apply_atmos_requirements()
apply_temperature_requirements()
///We need to wait for SSair to be initialized before we can check atmos/temp requirements.
if(PERFORM_ALL_TESTS(focus_only/atmos_and_temp_requirements) && mapload && !SSair.initialized)
RegisterSignal(SSair, COMSIG_SUBSYSTEM_POST_INITIALIZE, PROC_REF(on_ssair_init))
return
apply_atmos_requirements(mapload)
apply_temperature_requirements(mapload)
/mob/living/basic/proc/on_ssair_init(datum/source)
SIGNAL_HANDLER
UnregisterSignal(SSair, COMSIG_SUBSYSTEM_POST_INITIALIZE)
apply_atmos_requirements(TRUE)
apply_temperature_requirements(TRUE)
/// Ensures this mob can take atmospheric damage if it's supposed to
/mob/living/basic/proc/apply_atmos_requirements()
if(unsuitable_atmos_damage == 0)
/mob/living/basic/proc/apply_atmos_requirements(mapload)
if(unsuitable_atmos_damage == 0 || isnull(habitable_atmos))
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)
AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage, mapload)
/// 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)
/mob/living/basic/proc/apply_temperature_requirements(mapload)
if((unsuitable_cold_damage == 0 && unsuitable_heat_damage == 0) || (minimum_survivable_temperature <= 0 && maximum_survivable_temperature >= INFINITY))
return
AddElement(/datum/element/basic_body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
AddElement(/datum/element/body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage, mapload)
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT, times_fired)
. = ..()
@@ -219,7 +228,7 @@
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)
RemoveElement(/datum/element/body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
. = TRUE
. = ..()