mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Replaces yet more istypes with helpers (#20806)
* uses more istype helpers * oranges is inefficient
This commit is contained in:
@@ -18,7 +18,7 @@ In all, this is a lot like the monkey code. /N
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
@@ -125,4 +125,4 @@ In all, this is a lot like the monkey code. /N
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
|
||||
return 0//aliens are immune to acid.
|
||||
return 0//aliens are immune to acid.
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
M << "You cannot attack people before the game has started."
|
||||
return 0
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return 0
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
M << "You cannot attack people before the game has started."
|
||||
return 0
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return 0
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ var/list/ai_list = list()
|
||||
radio = new /obj/item/device/radio/headset/ai(src)
|
||||
aicamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
|
||||
|
||||
if (istype(loc, /turf))
|
||||
if(isturf(loc))
|
||||
verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall,\
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
var/mob/living/M = card.loc
|
||||
if(!isliving(M))
|
||||
while(!isliving(M))
|
||||
if(istype(M, /turf))
|
||||
if(isturf(M))
|
||||
src.temp = "Error: No biological host found. <br>"
|
||||
src.subscreen = 0
|
||||
return dat
|
||||
|
||||
@@ -418,19 +418,15 @@ Auto Patrol[]"},
|
||||
return
|
||||
lastfired = world.time
|
||||
var/turf/T = loc
|
||||
var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
if((!( U ) || !( T )))
|
||||
var/turf/U = get_turf(target)
|
||||
if(!U)
|
||||
return
|
||||
while(!(istype(U, /turf)))
|
||||
U = U.loc
|
||||
if(!(istype(T, /turf)))
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
if(!projectile)
|
||||
return
|
||||
|
||||
if(!(istype(U, /turf)))
|
||||
return
|
||||
var/obj/item/projectile/A = new projectile (loc)
|
||||
playsound(loc, shoot_sound, 50, 1)
|
||||
A.current = U
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
if(target)
|
||||
if(path.len == 0)
|
||||
if(!istype(target, /turf/))
|
||||
if(!isturf(target))
|
||||
var/turf/TL = get_turf(target)
|
||||
path = get_path_to(src, TL, /turf/proc/Distance_cardinal, 0, 30, id=access_card,simulated_only = 0)
|
||||
else
|
||||
@@ -248,7 +248,7 @@
|
||||
target = null
|
||||
path = list()
|
||||
return
|
||||
if(istype(target, /turf/) && emagged < 2)
|
||||
if(isturf(target) && emagged < 2)
|
||||
repair(target)
|
||||
else if(emagged == 2 && isfloorturf(target))
|
||||
var/turf/open/floor/F = target
|
||||
|
||||
@@ -474,7 +474,7 @@ var/global/mulebot_count = 0
|
||||
if(next == loc)
|
||||
path -= next
|
||||
return
|
||||
if(istype( next, /turf))
|
||||
if(isturf(next))
|
||||
//world << "at ([x],[y]) moving to ([next.x],[next.y])"
|
||||
|
||||
if(bloodiness)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
walk(src,0)
|
||||
if(do_after(src, 50, target = src))
|
||||
if(busy == SPINNING_COCOON)
|
||||
if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
|
||||
if(cocoon_target && isturf(cocoon_target.loc) && get_dist(src,cocoon_target) <= 1)
|
||||
var/obj/structure/spider/cocoon/C = new(cocoon_target.loc)
|
||||
var/large_cocoon = 0
|
||||
C.pixel_x = cocoon_target.pixel_x
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
|
||||
var/tturf = get_turf(target)
|
||||
if(!(istype(tturf, /turf)))
|
||||
if(!isturf(tturf))
|
||||
return
|
||||
if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen
|
||||
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user