mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #2717 from CHOMPStationBot/upstream-merge-11332
[MIRROR] Create a new empty zlevel for testing suffocation
This commit is contained in:
@@ -7,7 +7,21 @@
|
|||||||
async = 1
|
async = 1
|
||||||
|
|
||||||
/datum/unit_test/space_suffocation/start_test()
|
/datum/unit_test/space_suffocation/start_test()
|
||||||
var/turf/space/T = locate()
|
// Get an empty space level instead of just picking a random space turf
|
||||||
|
var/empty_z = using_map.get_empty_zlevel()
|
||||||
|
if(!empty_z)
|
||||||
|
fail("Unable to get empty z-level for suffocation test!")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
// Away from map edges so they don't transit while we're testing
|
||||||
|
var/mid_w = round(world.maxx*0.5)
|
||||||
|
var/mid_h = round(world.maxy*0.5)
|
||||||
|
|
||||||
|
var/turf/T = locate(mid_w, mid_h, empty_z)
|
||||||
|
|
||||||
|
if(!T)
|
||||||
|
fail("Unable to find middle turf for suffocation test!")
|
||||||
|
return 1
|
||||||
|
|
||||||
H = new(T)
|
H = new(T)
|
||||||
startOxyloss = H.getOxyLoss()
|
startOxyloss = H.getOxyLoss()
|
||||||
|
|||||||
Reference in New Issue
Block a user