mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Ports overmap events from Baystation12
- Move overmap defines to _defines folder. Rename old file to turfs.dm since that is what it contains. - Definition of overmap event objects and the overmap event handler. - Upgrades to SSevents and SSskybox to tie in the overmap events. - Enhancement to /datum/event itself to support affecting_z and victim ship. - Upgrade to the five event types used on the overmap to support new vars. - Upgrade to dust and meteor spawning code to support targeting z-levels.
This commit is contained in:
@@ -33,6 +33,20 @@
|
||||
available_turfs = start_turfs
|
||||
return pick(available_turfs)
|
||||
|
||||
// Picks a turf that is clearance tiles away from the map edge given by dir, on z-level Z
|
||||
/proc/pick_random_edge_turf(var/dir, var/Z, var/clearance = TRANSITIONEDGE + 1)
|
||||
if(!dir)
|
||||
return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
return locate(rand(clearance, world.maxx - clearance), world.maxy - clearance, Z)
|
||||
if(SOUTH)
|
||||
return locate(rand(clearance, world.maxx - clearance), clearance, Z)
|
||||
if(EAST)
|
||||
return locate(world.maxx - clearance, rand(clearance, world.maxy - clearance), Z)
|
||||
if(WEST)
|
||||
return locate(clearance, rand(clearance, world.maxy - clearance), Z)
|
||||
|
||||
/proc/is_below_sound_pressure(var/turf/T)
|
||||
var/datum/gas_mixture/environment = T ? T.return_air() : null
|
||||
var/pressure = environment ? environment.return_pressure() : 0
|
||||
|
||||
Reference in New Issue
Block a user