More istypes replaced with helpers (#20767)

* shouldn't you be merging these by now

* my oh my do we have a lot of these

* a fellow pedantic shit
This commit is contained in:
Joan Lung
2016-10-03 13:40:13 +13:00
committed by oranges
parent de19e36a51
commit b5b4037e2e
87 changed files with 185 additions and 175 deletions
+1 -1
View File
@@ -278,7 +278,7 @@
/obj/machinery/power/am_control_unit/interact(mob/user)
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!istype(user, /mob/living/silicon/ai))
if(!isAI(user))
user.unset_machine()
user << browse(null, "window=AMcontrol")
return
+1 -1
View File
@@ -368,7 +368,7 @@
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params)
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
if(issilicon(user) && get_dist(src,user)>1)
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/crowbar) && opened)
if (has_electronics==1)
+1 -1
View File
@@ -271,7 +271,7 @@ display round(lastgen) and plasmatank amount
/obj/machinery/power/port_gen/pacman/interact(mob/user)
if (get_dist(src, user) > 1 )
if (!istype(user, /mob/living/silicon/ai))
if(!isAI(user))
user.unset_machine()
user << browse(null, "window=port_gen")
return
@@ -226,7 +226,7 @@
/obj/machinery/particle_accelerator/control_box/interact(mob/user)
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!istype(user, /mob/living/silicon))
if(!issilicon(user))
user.unset_machine()
user << browse(null, "window=pacontrol")
return
+1 -1
View File
@@ -253,7 +253,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
else if(closest_mob)
var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5)
closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1)
if(istype(closest_mob, /mob/living/silicon))
if(issilicon(closest_mob))
var/mob/living/silicon/S = closest_mob
S.emp_act(2)
tesla_zap(S, 7, power / 1.5) // metallic folks bounce it further
+1 -1
View File
@@ -291,7 +291,7 @@
/obj/machinery/power/turbine/interact(mob/user)
if ( !Adjacent(user) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon)) )
if(!Adjacent(user) || (stat & (NOPOWER|BROKEN)) && !issilicon(user))
user.unset_machine(src)
user << browse(null, "window=turbine")
return