Makes the singularity eat asteroids, adds a planetary z-level list with a helper that adds maps to it
This commit is contained in:
@@ -1453,3 +1453,7 @@ GLOBAL_PROTECT(valid_HTTPSGet)
|
||||
var/temp = bitfield - ((bitfield>>1)&46811) - ((bitfield>>2)&37449) //0133333 and 0111111 respectively
|
||||
temp = ((temp + (temp>>3))&29127) % 63 //070707
|
||||
return temp
|
||||
|
||||
//checks if a turf is in the planet z list.
|
||||
/proc/turf_z_is_planet(turf/T)
|
||||
return GLOB.z_is_planet["[T.z]"]
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm (rejected hunks)
|
||||
@@ -101,10 +101,9 @@
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_act()
|
||||
- if(!turf_z_is_planet(src))
|
||||
- ChangeTurf(/turf/open/space)
|
||||
- else
|
||||
+ if(turf_z_is_planet(src))
|
||||
return ..()
|
||||
+ ChangeTurf(/turf/open/space)
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_pull(S, current_size)
|
||||
return
|
||||
@@ -49,3 +49,21 @@
|
||||
/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)
|
||||
if(!turf_z_is_planet(T))
|
||||
GLOB.z_is_planet["[T.z]"] = list()
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user