Mice and Regal Rats won't spawn in the icebox solar panels (#73388)

## About The Pull Request

Fixes #73238

This adds a temperature check to the turf locator in the mice migration
event.
Also it refactors the check a bit because its loop seemed... odd? If
there was some reason the old version was more efficient let me know but
I can't see a purpose to do it that way around.
Also then the same numbers were being used in 3 separate files so I
moved it into a define.
_Finally_ I removed a redundant element from the cockroach while I was
looking at the files.

There was a moment when I started looking at this where I thought "I
should add a generic helper proc which is given a turf and a mob and can
tell you if it would die if it spawned on that turf".
Then I looked at lungs and immediately decided that was going to be a
massive amount of work for this trivial bug fix... maybe one day.

## Why It's Good For The Game

This was sparing mappers from the punishment whoever added this feature
surely intended for them to suffer.
Also it's just a bit sad to notify ghosts to join a ghost role which
will die instantly 😢

## Changelog

🆑
fix: Mice and Regal Rats will no longer spawn in icebox's solar panels
and die of cold.
/🆑
This commit is contained in:
Jacquerel
2023-02-14 21:36:56 -07:00
committed by GitHub
parent d228c746c1
commit a99c163d7b
6 changed files with 22 additions and 21 deletions
+2 -2
View File
@@ -89,9 +89,9 @@
var/unsuitable_atmos_damage = 1
///Minimal body temperature without receiving damage
var/minimum_survivable_temperature = 250
var/minimum_survivable_temperature = NPC_DEFAULT_MIN_TEMP
///Maximal body temperature without receiving damage
var/maximum_survivable_temperature = 350
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.
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.