Files
Bubberstation/code/modules/mapping/mapping_helpers.dm
Tad Hardesty f2dbe5cf13 Replace explicit z-level checks with defines (#33829)
* Replace explicit z-level checks with defines

* Rename turf_z_is_planet for consistency

* Use TRUE/FALSE in onSyndieBase
2017-12-29 14:40:06 -05:00

73 lines
2.2 KiB
Plaintext

//Landmarks and other helpers which speed up the mapping process and reduce the number of unique instances/subtypes of items/turf/ect
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
name = "baseturf editor"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
var/baseturf = null
layer = POINT_LAYER
/obj/effect/baseturf_helper/Initialize()
. = ..()
var/area/thearea = get_area(src)
for(var/turf/T in get_area_turfs(thearea, z))
if(T.baseturfs != T.type) //Don't break indestructible walls and the like
T.baseturfs = baseturf
return INITIALIZE_HINT_QDEL
/obj/effect/baseturf_helper/space
name = "space baseturf editor"
baseturf = /turf/open/space
/obj/effect/baseturf_helper/asteroid
name = "asteroid baseturf editor"
baseturf = /turf/open/floor/plating/asteroid
/obj/effect/baseturf_helper/asteroid/airless
name = "asteroid airless baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/airless
/obj/effect/baseturf_helper/asteroid/basalt
name = "asteroid basalt baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/basalt
/obj/effect/baseturf_helper/asteroid/snow
name = "asteroid snow baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/snow
/obj/effect/baseturf_helper/beach/sand
name = "beach sand baseturf editor"
baseturf = /turf/open/floor/plating/beach/sand
/obj/effect/baseturf_helper/beach/water
name = "water baseturf editor"
baseturf = /turf/open/floor/plating/beach/water
/obj/effect/baseturf_helper/lava
name = "lava baseturf editor"
baseturf = /turf/open/lava/smooth
/obj/effect/baseturf_helper/lava_land/surface
name = "lavaland baseturf editor"
baseturf = /turf/open/lava/smooth/lava_land_surface
//Contains the list of planetary z-levels defined by the planet_z helper.
GLOBAL_LIST_EMPTY(z_is_planet)
/obj/effect/mapping_helpers/planet_z //adds the map it is on to the z_is_planet list
name = "planet z helper"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
layer = POINT_LAYER
/obj/effect/mapping_helpers/planet_z/Initialize()
. = ..()
var/turf/T = get_turf(src)
GLOB.z_is_planet["[T.z]"] = TRUE
return INITIALIZE_HINT_QDEL