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

View File

@@ -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))