mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
40 lines
992 B
Plaintext
40 lines
992 B
Plaintext
//Helper Modules
|
|
|
|
|
|
// Helper to repressurize the area in case it was run in space
|
|
/datum/mapGeneratorModule/bottomLayer/repressurize
|
|
spawnableAtoms = list()
|
|
spawnableTurfs = list()
|
|
|
|
/datum/mapGeneratorModule/bottomLayer/repressurize/generate()
|
|
if(!mother)
|
|
return
|
|
var/list/map = mother.map
|
|
for(var/turf/T in map)
|
|
SSair.remove_from_active(T)
|
|
for(var/turf/open/T in map)
|
|
if(T.air)
|
|
T.air.copy_from_turf(T)
|
|
SSair.add_to_active(T)
|
|
|
|
//Only places atoms/turfs on area borders
|
|
/datum/mapGeneratorModule/border
|
|
clusterCheckFlags = CLUSTER_CHECK_NONE
|
|
|
|
/datum/mapGeneratorModule/border/generate()
|
|
if(!mother)
|
|
return
|
|
var/list/map = mother.map
|
|
for(var/turf/T in map)
|
|
if(is_border(T))
|
|
place(T)
|
|
|
|
/datum/mapGeneratorModule/border/proc/is_border(turf/T)
|
|
for(var/direction in list(SOUTH,EAST,WEST,NORTH))
|
|
if (get_step(T,direction) in mother.map)
|
|
continue
|
|
return 1
|
|
return 0
|
|
|
|
/datum/mapGenerator/repressurize
|
|
modules = list(/datum/mapGeneratorModule/bottomLayer/repressurize) |