Adds a few turf istype helpers (#20754)

* a very calming act
when the world is too much, too fast

* i'm tired
but i have to be efficient, infinite

* lick your lips at the sight of me
a fantasy made reality
This commit is contained in:
Joan Lung
2016-10-01 13:25:46 -04:00
committed by AnturK
parent d6ba32394c
commit bdcb16113a
145 changed files with 337 additions and 326 deletions

View File

@@ -87,7 +87,7 @@ var/datum/subsystem/minimap/SSminimap
var/obj/obj
var/list/obj_icons
// Don't use icons for space, just add objects in space if they exist.
if(istype(tile, /turf/open/space))
if(isspaceturf(tile))
obj = locate(/obj/structure/lattice/catwalk) in tile
if(obj)
tile_icon = new /icon('icons/obj/smooth_structures/catwalk.dmi', "catwalk", SOUTH)

View File

@@ -29,7 +29,7 @@ var/datum/subsystem/persistence/SSpersistence
var/list/free_satchels = list()
for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION)))) //Nontrivially expensive but it's roundstart only
if(istype(T,/turf/open/floor) && !istype(T,/turf/open/floor/plating/))
if(isfloorturf(T) && !istype(T,/turf/open/floor/plating/))
free_satchels += new /obj/item/weapon/storage/backpack/satchel/flat/secret(T)
if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchels) >= (50 - expanded_old_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves
break
@@ -60,7 +60,7 @@ var/datum/subsystem/persistence/SSpersistence
F.x = text2num(chosen_satchel[1])
F.y = text2num(chosen_satchel[2])
F.z = ZLEVEL_STATION
if(istype(F.loc,/turf/open/floor) && !istype(F.loc,/turf/open/floor/plating/))
if(isfloorturf(F.loc) && !istype(F.loc,/turf/open/floor/plating/))
F.hide(1)
new path(F)
return 1

View File

@@ -82,7 +82,7 @@ var/datum/subsystem/shuttle/SSshuttle
for(var/i in block(A, B))
var/turf/T = i
// Only dying the "pure" space, not the transit tiles
if(!(T.type == /turf/open/space))
if(istype(T, /turf/open/space/transit) || !isspaceturf(T))
continue
if((T.x == A.x) || (T.x == B.x) || (T.y == A.y) || (T.y == B.y))
T.color = "#ffff00"