mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Adds a "params" parameter to attackby(), so it keeps track of pixel_x and pixel_y among other things
This commit is contained in:
@@ -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>"
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user