Adds a "params" parameter to attackby(), so it keeps track of pixel_x and pixel_y among other things

This commit is contained in:
Markolie
2015-02-22 22:12:11 +01:00
parent aee4626ed9
commit 672305e034
456 changed files with 714 additions and 1182 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ Pipelines + Other Objects -> Pipe network
pipe_color = null
..()
/obj/machinery/atmospherics/attackby(atom/A, mob/user as mob)
/obj/machinery/atmospherics/attackby(atom/A, mob/user as mob, params)
if(istype(A, /obj/item/device/pipe_painter))
return
..()
+1 -1
View File
@@ -47,7 +47,7 @@
cell.emp_act(severity)
..(severity)
/obj/machinery/space_heater/air_conditioner/attackby(obj/item/I, mob/user)
/obj/machinery/space_heater/air_conditioner/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
@@ -70,7 +70,7 @@
return 1
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
@@ -152,7 +152,7 @@
src.updateUsrDialog()
return
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
@@ -184,7 +184,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -171,7 +171,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -70,7 +70,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(!istype(W, /obj/item/weapon/wrench))
return ..()
@@ -133,7 +133,7 @@
return null
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (connected_device)
@@ -156,7 +156,7 @@ Filter types:
set_frequency(frequency)
..()
/obj/machinery/atmospherics/trinary/filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/trinary/filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/datum/gas_mixture/int_air = return_air()
@@ -114,7 +114,7 @@
return 1
/obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/datum/gas_mixture/int_air = return_air()
+1 -1
View File
@@ -358,7 +358,7 @@
else
go_to_side()
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (istype(src, /obj/machinery/atmospherics/tvalve/digital))
@@ -65,7 +65,7 @@
return 1
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
@@ -68,7 +68,7 @@
icon_state = "[prefix]off"
return
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
@@ -307,7 +307,7 @@
update_icon()
return
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user)
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
@@ -343,7 +343,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -276,7 +276,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
+1 -1
View File
@@ -299,7 +299,7 @@
else
open()
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && src:frequency)
+2 -2
View File
@@ -62,7 +62,7 @@
..()
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
return ..()
if (istype(src, /obj/machinery/atmospherics/pipe/vent))
@@ -1220,7 +1220,7 @@
return null
/obj/machinery/atmospherics/pipe/tank/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/pipe/tank/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/device/pipe_painter))
return