Merge pull request #31286 from KorPhaeron/ismachinery

ismachinery define
This commit is contained in:
Leo
2017-10-04 21:25:31 -03:00
committed by CitadelStationBot
parent 2d27df3adc
commit 39cf9bb7a0
9 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
I.damtype = STAMINA // thou shalt not
N.update_icon()
if(istype(O, /obj/machinery))
if(ismachinery(O))
var/obj/machinery/M = O
M.power_change()
@@ -275,7 +275,7 @@
if(O.anchored)
continue
if(isitem(O) || isstructure(O) || istype(O, /obj/machinery))
if(isitem(O) || isstructure(O) || ismachinery(O))
cocoon_target = O
busy = MOVING_TO_TARGET
stop_automated_movement = 1
@@ -144,7 +144,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
icon_living = icon_state
copy_overlays(O)
add_overlay(googly_eyes)
if(isstructure(O) || istype(O, /obj/machinery))
if(isstructure(O) || ismachinery(O))
health = (anchored * 50) + 50
destroy_objects = 1
if(O.density && O.anchored)
@@ -31,7 +31,7 @@
origin_tech = "programming=2;engineering=2;powerstorage=3"
/obj/item/computer_hardware/recharger/APC/use_power(amount, charging=0)
if(istype(holder.physical, /obj/machinery))
if(ismachinery(holder.physical))
var/obj/machinery/M = holder.physical
if(M.powered())
M.use_power(amount)
@@ -55,13 +55,13 @@
origin_tech = "engineering=2;powerstorage=1"
/obj/item/computer_hardware/recharger/wired/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
if(istype(M.physical, /obj/machinery) && M.physical.anchored)
if(ismachinery(M.physical) && M.physical.anchored)
return ..()
to_chat(user, "<span class='warning'>\The [src] is incompatible with portable computers!</span>")
return 0
/obj/item/computer_hardware/recharger/wired/use_power(amount, charging=0)
if(istype(holder.physical, /obj/machinery) && holder.physical.anchored)
if(ismachinery(holder.physical) && holder.physical.anchored)
var/obj/machinery/M = holder.physical
var/turf/T = M.loc
if(!T || !istype(T))
@@ -58,7 +58,7 @@
if(isliving(mover))
shock(mover)
if(istype(mover, /obj/machinery) || isstructure(mover) || ismecha(mover))
if(ismachinery(mover) || isstructure(mover) || ismecha(mover))
bump_field(mover)
/obj/machinery/field/containment/proc/set_master(master1,master2)
@@ -90,13 +90,13 @@
if(isliving(mover))
shock(mover)
return
if(istype(mover, /obj/machinery) || isstructure(mover) || ismecha(mover))
if(ismachinery(mover) || isstructure(mover) || ismecha(mover))
bump_field(mover)
return
/obj/machinery/field/CanPass(atom/movable/mover, turf/target)
if(hasShocked || isliving(mover) || istype(mover, /obj/machinery) || isstructure(mover) || ismecha(mover))
if(hasShocked || isliving(mover) || ismachinery(mover) || isstructure(mover) || ismecha(mover))
return FALSE
return ..()
+1 -1
View File
@@ -222,7 +222,7 @@
else if(closest_mob)
continue
else if(istype(A, /obj/machinery))
else if(ismachinery(A))
var/obj/machinery/M = A
var/dist = get_dist(source, A)
if(dist <= zap_range && (dist < closest_dist || !closest_machine) && !M.being_shocked)