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
@@ -13,7 +13,7 @@
max_w_class = 3
max_combined_w_class = 21
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
@@ -33,7 +33,7 @@
..()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(crit_fail)
user << "\red The Bluespace generator isn't working."
return
@@ -115,6 +115,6 @@
A.reagents.del_reagent("water")
A.reagents.add_reagent("holywater",water2holy)
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
@@ -562,7 +562,7 @@
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/match(src)
attackby(obj/item/weapon/match/W as obj, mob/user as mob)
attackby(obj/item/weapon/match/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
W.lit = 1
W.icon_state = "match_lit"
@@ -129,7 +129,7 @@
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
@@ -319,7 +319,7 @@
overlays += image(icon, src, "ledb")
return
/obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
update_icon()
@@ -17,7 +17,7 @@
var/icon_broken = "lockbox+b"
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/card/id))
if(src.broken)
user << "\red It appears to be broken."
@@ -32,7 +32,7 @@
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(locked)
if ((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emag_act(user, W)
@@ -1,6 +1,6 @@
// To clarify:
// For use_to_pickup and allow_quick_gather functionality,
// see item/attackby() (/game/objects/items.dm)
// see item/attackby() (/game/objects/items.dm, params)
// Do not remove this functionality without good reason, cough reagent_containers cough.
// -Sayu
@@ -326,7 +326,7 @@
return 1
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(isrobot(user))