Attack Proc fixes (#1259)

Baymerge changed the attack proc, i think by removing a default value, and a lot of things broke because they weren't using the function correctly.

This proc does three main things.

Adds a default to /obj/item/proc/attack to target the chest when no target zone is supplied.

Fixes the lack of a target zone in many attack procs, properly defining it so it'll get passed to the parent, and ensure that bodypart-specific targeting works.

Removes most instances of code to retrieve the user's selected zone, and instead to use the zone passed into the attack function. saves duplication of effort.
This commit is contained in:
NanakoAC
2016-12-24 03:34:23 +02:00
committed by skull132
parent b0ae247b01
commit 6cef8c9074
24 changed files with 67 additions and 64 deletions
+1 -1
View File
@@ -328,7 +328,7 @@ All custom items with worn sprites must follow the contained sprite system: http
return
/obj/item/weapon/implanter/fluff/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/implanter/fluff/attack(mob/M as mob, mob/user as mob, var/target_zone)
if (!M.ckey || M.ckey != allowed_ckey)
return