mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
fixes inconsistent lighting ci failure in icebox (#67430)
Fixes and adds test for get_pixel_turf returning null on tall objects on top of the map.
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
#include "emoting.dm"
|
||||
#include "food_edibility_check.dm"
|
||||
#include "gas_transfer.dm"
|
||||
#include "get_turf_pixel.dm"
|
||||
#include "greyscale_config.dm"
|
||||
#include "heretic_knowledge.dm"
|
||||
#include "heretic_rituals.dm"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
///ensures that get_turf_pixel() returns turfs within the bounds of the map,
|
||||
///even when called on a movable with its sprite out of bounds
|
||||
/datum/unit_test/get_turf_pixel
|
||||
|
||||
/datum/unit_test/get_turf_pixel/Run()
|
||||
//we need long larry to peek over the top edge of the earth
|
||||
var/turf/north = locate(1, world.maxy, run_loc_floor_bottom_left.z)
|
||||
|
||||
//hes really long, so hes really good at peaking over the edge of the map
|
||||
var/mob/living/simple_animal/hostile/megafauna/colossus/long_larry = allocate(/mob/living/simple_animal/hostile/megafauna/colossus, north)
|
||||
TEST_ASSERT(istype(get_turf_pixel(long_larry), /turf), "get_turf_pixel() isnt clamping a mob whos sprite is above the bounds of the world inside of the map.")
|
||||
Reference in New Issue
Block a user