Files
Paradise/code/modules/procedural_mapping/mapGeneratorModules/mapgen_helpers.dm
Contrabang e32544e599 #undef is now required for all file defines (#24091)
* CI

* undef

* hooooly crap

* yeah

* false by default

* fixes

* alright, there we go

* oops lmao

* lol, lmao even

* proper programming

* fix

* losin my mind

* oops

* yeah coloring

* WE LOVE MULTIPLE DEFINES (ive lost my sanity)
2024-03-11 14:03:30 -04:00

44 lines
1.1 KiB
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/simulated/T in map)
SSair.remove_from_active(T)
for(var/turf/simulated/T in map)
if(T.air)
T.air.oxygen = T.oxygen
T.air.nitrogen = T.nitrogen
T.air.carbon_dioxide = T.carbon_dioxide
T.air.toxins = T.toxins
T.air.sleeping_agent = T.sleeping_agent
T.air.agent_b = T.agent_b
T.air.temperature = T.temperature
SSair.add_to_active(T)
//Only places atoms/turfs on area borders
/datum/mapGeneratorModule/border
clusterCheckFlags = MAP_GENERATOR_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