mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Add a unit test to check that maploaded simple/basic mobs are in an environment they can survive in. (#82180)
## About The Pull Request I've recently noticed that the maploaded penguins from the snowdin away mission were dying from unsafe atmos/temperature. This sparked the idea of making a (focus only) unit test that would prevent this sort of issues from happening. This PR also implements the usage of the `atmos_requirements` and `body_temp_sensitive` elements for simple animals too, cutting down the copypaste. ## Why It's Good For The Game More unit tests to make sure things are done correctly. ## Changelog 🆑 fix: Made sure that mapped critters (i.e. penguins on the snow cabin away mission) can survive in the environment they're spawned in. /🆑
This commit is contained in:
@@ -134,6 +134,13 @@
|
||||
/obj/effect/spawner/random/trash/cigbutt = 2,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/random/trash/grime/Initialize(mapload)
|
||||
if(mapload)
|
||||
var/turf/location = get_turf(loc)
|
||||
if(location.initial_gas_mix != OPENTURF_DEFAULT_ATMOS && location.initial_gas_mix != OPENTURF_DIRTY_ATMOS)
|
||||
loot -= /mob/living/basic/cockroach
|
||||
return ..()
|
||||
|
||||
/obj/effect/spawner/random/trash/moisture
|
||||
name = "water hazard spawner"
|
||||
icon_state = "caution"
|
||||
@@ -150,6 +157,13 @@
|
||||
/mob/living/basic/axolotl = 1,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/random/trash/moisture/Initialize(mapload)
|
||||
if(mapload)
|
||||
var/turf/location = get_turf(loc)
|
||||
if(location.initial_gas_mix != OPENTURF_DEFAULT_ATMOS && location.initial_gas_mix != OPENTURF_DIRTY_ATMOS)
|
||||
loot -= list(/mob/living/basic/frog, /mob/living/basic/axolotl)
|
||||
return ..()
|
||||
|
||||
/obj/effect/spawner/random/trash/graffiti
|
||||
name = "random graffiti spawner"
|
||||
icon_state = "rune"
|
||||
|
||||
Reference in New Issue
Block a user