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:
committed by
CitadelStationBot
parent
0589c06507
commit
a7d5e4cdcf
@@ -197,6 +197,10 @@
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/nullrod/scythe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 70, 110) //the harvest gives a high bonus chance
|
||||
|
||||
/obj/item/nullrod/scythe/vibro
|
||||
icon_state = "hfrequency0"
|
||||
item_state = "hfrequency1"
|
||||
@@ -290,6 +294,10 @@
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
|
||||
/obj/item/nullrod/chainsaw/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 30, 100, 0, hitsound)
|
||||
|
||||
/obj/item/nullrod/clown
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "clownrender"
|
||||
@@ -356,6 +364,10 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/nullrod/armblade/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 80, 70)
|
||||
|
||||
/obj/item/nullrod/armblade/tentacle
|
||||
name = "unholy blessing"
|
||||
icon_state = "tentacle"
|
||||
@@ -414,7 +426,7 @@
|
||||
/obj/item/nullrod/tribal_knife/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
AddComponent(/datum/component/butchering, 50, 100)
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -73,6 +73,10 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
|
||||
/obj/item/kitchen/knife/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 80 - force, 100, force - 10) //bonus chance increases depending on force
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -251,6 +251,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
/obj/item/shard/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/caltrop, force)
|
||||
AddComponent(/datum/component/butchering, 150, 65)
|
||||
icon_state = pick("large", "medium", "small")
|
||||
switch(icon_state)
|
||||
if("small")
|
||||
|
||||
@@ -234,6 +234,10 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/twohanded/fireaxe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 80, hitsound) //axes are not known for being precision butchering tools
|
||||
|
||||
/obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "fireaxe[wielded]"
|
||||
return
|
||||
@@ -470,6 +474,10 @@
|
||||
var/obj/item/grenade/explosive = null
|
||||
var/war_cry = "AAAAARGH!!!"
|
||||
|
||||
/obj/item/twohanded/spear/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad.
|
||||
|
||||
/obj/item/twohanded/spear/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(explosive)
|
||||
@@ -562,6 +570,10 @@
|
||||
actions_types = list(/datum/action/item_action/startchainsaw)
|
||||
var/on = FALSE
|
||||
|
||||
/obj/item/twohanded/required/chainsaw/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 30, 100, 0, 'sound/weapons/chainsawhit.ogg', TRUE)
|
||||
|
||||
/obj/item/twohanded/required/chainsaw/suicide_act(mob/living/carbon/user)
|
||||
if(on)
|
||||
user.visible_message("<span class='suicide'>[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -580,8 +592,10 @@
|
||||
force = on ? force_on : initial(force)
|
||||
throwforce = on ? force_on : initial(force)
|
||||
icon_state = "chainsaw_[on ? "on" : "off"]"
|
||||
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
|
||||
butchering.butchering_enabled = on
|
||||
|
||||
if(hitsound == "swing_hit")
|
||||
if(on)
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
else
|
||||
hitsound = "swing_hit"
|
||||
@@ -733,6 +747,10 @@
|
||||
slot_flags = SLOT_BACK
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/twohanded/vibro_weapon/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 20, 105)
|
||||
|
||||
/obj/item/twohanded/vibro_weapon/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(wielded)
|
||||
final_block_chance *= 2
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/claymore/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 40, 105)
|
||||
|
||||
/obj/item/claymore/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
Reference in New Issue
Block a user