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
+3 -3
View File
@@ -50,7 +50,7 @@
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
for(var/i=0,i<2,i++)
@@ -60,7 +60,7 @@
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
G.attackby(NG, user, params)
usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
del(src)
return
@@ -201,7 +201,7 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
+1 -1
View File
@@ -82,7 +82,7 @@
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/seeds))
if(seed)
user << "There is already a seed loaded."
+1 -1
View File
@@ -32,7 +32,7 @@
master.growth_queue -= src
..()
/obj/effect/plantsegment/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/plantsegment/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src