Files
Bubberstation/code/modules/procedural_mapping/mapGeneratorModules/helpers.dm
Mothblocks 0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00

85 lines
2.5 KiB
Plaintext

//Helper Modules
// Helper to repressurize the area in case it was run in space
/datum/map_generator_module/bottom_layer/repressurize
spawnableAtoms = list()
spawnableTurfs = list()
/datum/map_generator_module/bottom_layer/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, TRUE)
/datum/map_generator_module/bottom_layer/massdelete
spawnableAtoms = list()
spawnableTurfs = list()
var/deleteturfs = TRUE //separate var for the empty type.
var/list/ignore_typecache
/datum/map_generator_module/bottom_layer/massdelete/generate()
if(!mother)
return
for(var/V in mother.map)
var/turf/T = V
T.empty(deleteturfs? null : T.type, null, ignore_typecache, CHANGETURF_FORCEOP)
/datum/map_generator_module/bottom_layer/massdelete/no_delete_mobs/New()
..()
ignore_typecache = GLOB.typecache_mob
/datum/map_generator_module/bottom_layer/massdelete/leave_turfs
deleteturfs = FALSE
/datum/map_generator_module/bottom_layer/massdelete/regeneration_delete
deleteturfs = FALSE
/datum/map_generator_module/bottom_layer/massdelete/regeneration_delete/New()
..()
ignore_typecache = GLOB.typecache_mob
//Only places atoms/turfs on area borders
/datum/map_generator_module/border
clusterCheckFlags = CLUSTER_CHECK_NONE
/datum/map_generator_module/border/generate()
if(!mother)
return
var/list/map = mother.map
for(var/turf/T in map)
if(is_border(T))
place(T)
/datum/map_generator_module/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/map_generator/repressurize
modules = list(/datum/map_generator_module/bottom_layer/repressurize)
buildmode_name = "Block: Restore Roundstart Air Contents"
/datum/map_generator/massdelete
modules = list(/datum/map_generator_module/bottom_layer/massdelete)
buildmode_name = "Block: Full Mass Deletion"
/datum/map_generator/massdelete/nomob
modules = list(/datum/map_generator_module/bottom_layer/massdelete/no_delete_mobs)
buildmode_name = "Block: Mass Deletion - Leave Mobs"
/datum/map_generator/massdelete/noturf
modules = list(/datum/map_generator_module/bottom_layer/massdelete/leave_turfs)
buildmode_name = "Block: Mass Deletion - Leave Turfs"
/datum/map_generator/massdelete/regen
modules = list(/datum/map_generator_module/bottom_layer/massdelete/regeneration_delete)
buildmode_name = "Block: Mass Deletion - Leave Mobs and Turfs"