mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Converts some istype's to use helpers (#3224)
Converts various istype's to use helpers. Mainly: Cable Wrench Screwdriver Multitool Crowbar Wirecutter And makes the helpers defines.
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (unlocked)
|
||||
user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
add_overlay("hi-turb")
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>"
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
anchored = !anchored
|
||||
turbine = null
|
||||
user << "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>"
|
||||
|
||||
@@ -214,7 +214,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>"
|
||||
|
||||
Reference in New Issue
Block a user