Refactors butchering to a component - item-based butchering effectiveness, speed, and chances (#35744)

* Butchering component

* auto-butchering based on toolspeed

* Gives drills their butchering back

* redoes toggles
This commit is contained in:
Ashe Higgs
2018-02-25 15:50:16 -05:00
committed by CitadelStationBot
parent 0589c06507
commit a7d5e4cdcf
29 changed files with 207 additions and 30 deletions
+8
View File
@@ -44,6 +44,10 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = IS_SHARP
/obj/item/melee/synthetic_arm_blade/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 60, 80) //very imprecise
/obj/item/melee/sabre
name = "officer's sabre"
desc = "An elegant weapon, its monomolecular edge is capable of cutting through flesh and bone with ease."
@@ -63,6 +67,10 @@
hitsound = 'sound/weapons/rapierhit.ogg'
materials = list(MAT_METAL = 1000)
/obj/item/melee/sabre/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 30, 95, 5) //fast and effective, but as a sword, it might damage the results.
/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
@@ -1,4 +1,4 @@
/obj/item/melee/transforming //TODO: make transforming energy weapons a subtype of this
/obj/item/melee/transforming
var/active = FALSE
var/force_on = 30 //force when active
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
@@ -21,6 +21,8 @@
else
if(attack_verb_off.len)
attack_verb = attack_verb_off
if(is_sharp())
AddComponent(/datum/component/butchering, 50, 100, 0, hitsound, active)
/obj/item/melee/transforming/attack_self(mob/living/carbon/user)
if(transform_weapon(user))
@@ -59,6 +61,8 @@
attack_verb = attack_verb_off
icon_state = initial(icon_state)
w_class = initial(w_class)
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
butchering.butchering_enabled = active
transform_messages(user, supress_message_text)
add_fingerprint(user)
return TRUE