Refactors various item attack() implementations

Replaced some attack() overrides with apply_hit_effect() or other attack
procs where appropriate.
Removed the attack() override from reagent_containers.
This commit is contained in:
mwerezak
2015-09-08 23:39:33 -04:00
parent 6ceffaacb5
commit 068d02c28c
22 changed files with 141 additions and 230 deletions
@@ -108,6 +108,7 @@
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>The [src] slips out of your hand and hits your head.</span>"
user.drop_from_inventory(src)
user.take_organ_damage(10)
user.Paralyse(2)
return
@@ -64,9 +64,7 @@
processing_objects -= src
..()
/obj/item/weapon/material/attack()
if(!..())
return
/obj/item/weapon/material/apply_hit_effect()
if(!unbreakable)
if(material.is_brittle())
health = 0
@@ -44,7 +44,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
flags = CONDUCT | NOBLUDGEON
force_divisor = 0.25 // 5 with weight 20 (steel)
thrown_force_divisor = 0.25 // as above
w_class = 2