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
+2 -2
View File
@@ -242,7 +242,7 @@
/obj/effect/resonance/proc/burst(turf/T)
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
if(istype(T, /turf/closed/mineral))
if(ismineralturf(T))
var/turf/closed/mineral/M = T
M.gets_drilled(creator)
for(var/mob/living/L in T)
@@ -522,7 +522,7 @@
L.underlays += I
hammer_synced.marked_image = I
var/target_turf = get_turf(target)
if(istype(target_turf, /turf/closed/mineral))
if(ismineralturf(target_turf))
var/turf/closed/mineral/M = target_turf
PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, M)
M.gets_drilled(firer)
@@ -794,7 +794,7 @@
addtimer(src, "aoe_burst", 0, FALSE, T, user)
add_logs(user, target, "fired 3x3 blast at", src)
else
if(istype(target, /turf/closed/mineral) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
addtimer(src, "cardinal_blasts", 0, FALSE, T, user)
timer = world.time + cooldown_time
else if(target in view(5, get_turf(user))) //if the target is in view, hit it
+4 -4
View File
@@ -73,7 +73,7 @@
var/path = pickweight(mineralSpawnChanceList)
var/turf/T = ChangeTurf(path)
if(T && istype(T, /turf/closed/mineral))
if(T && ismineralturf(T))
var/turf/closed/mineral/M = T
M.mineralAmt = rand(1, 5)
M.environment_type = src.environment_type
@@ -358,7 +358,7 @@
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T)
for(var/S in RANGE_TURFS(1, src))
var/turf/NT = S
if(!NT || istype(NT, /turf/open/space) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
sanity = 0
break
if(!sanity)
@@ -400,7 +400,7 @@
P.playDigSound()
if(do_after(user,P.digspeed, target = src))
if(istype(src, /turf/closed/mineral))
if(ismineralturf(src))
user << "<span class='notice'>You finish cutting into the rock.</span>"
gets_drilled(user)
feedback_add_details("pick_used_mining","[P.type]")
@@ -715,7 +715,7 @@
for(var/i in 1 to 5)
AM.pixel_y--
sleep(2)
if(isrobot(AM))
if(iscyborg(AM))
var/mob/living/silicon/robot/S = AM
qdel(S.mmi)
qdel(AM)