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
@@ -166,6 +166,7 @@
|
||||
loc.visible_message("<span class='warning'>A grotesque blade forms around [loc.name]\'s arm!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a deadly blade.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
if(synthetic)
|
||||
can_drop = TRUE
|
||||
AddComponent(/datum/component/butchering, 60, 80)
|
||||
|
||||
/obj/item/melee/arm_blade/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "rended")
|
||||
|
||||
/obj/item/melee/cultblade/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 40, 100)
|
||||
|
||||
/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
if(!iscultist(user))
|
||||
@@ -112,6 +115,7 @@
|
||||
set_light(4)
|
||||
jaunt = new(src)
|
||||
linked_action = new(src)
|
||||
AddComponent(/datum/component/butchering, 50, 80)
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/examine(mob/user)
|
||||
if(contents.len)
|
||||
@@ -662,6 +666,10 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/datum/action/innate/cult/spear/spear_act
|
||||
|
||||
/obj/item/twohanded/cult_spear/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 90)
|
||||
|
||||
/obj/item/twohanded/cult_spear/Destroy()
|
||||
if(spear_act)
|
||||
qdel(spear_act)
|
||||
|
||||
@@ -129,6 +129,10 @@
|
||||
var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/broken_bottle/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 200, 55)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/gin
|
||||
name = "Griffeater gin"
|
||||
desc = "A bottle of high quality gin, produced in the New London Space Station."
|
||||
|
||||
@@ -90,6 +90,10 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/hatchet/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 70, 100)
|
||||
|
||||
/obj/item/hatchet/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is chopping at [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
@@ -113,6 +117,10 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/swiping = FALSE
|
||||
|
||||
/obj/item/scythe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 90, 105)
|
||||
|
||||
/obj/item/scythe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
var/detonation_damage = 50
|
||||
var/backstab_bonus = 30
|
||||
|
||||
/obj/item/twohanded/required/kinetic_crusher/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 60, 110) //technically it's huge and bulky, but this provides an incentive to use it
|
||||
|
||||
/obj/item/twohanded/required/kinetic_crusher/Destroy()
|
||||
QDEL_LIST(trophies)
|
||||
return ..()
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/shovel/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 150, 40) //it's sharp, so it works, but barely.
|
||||
|
||||
/obj/item/shovel/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins digging their own grave! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(use_tool(user, user, 30, volume=50))
|
||||
|
||||
@@ -671,6 +671,7 @@
|
||||
spirits = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
AddComponent(/datum/component/butchering, 150, 90)
|
||||
|
||||
/obj/item/melee/ghost_sword/Destroy()
|
||||
for(var/mob/dead/observer/G in spirits)
|
||||
|
||||
@@ -789,8 +789,6 @@
|
||||
if(organs_amt)
|
||||
to_chat(user, "<span class='notice'>You retrieve some of [src]\'s internal organs!</span>")
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/ExtinguishMob()
|
||||
for(var/X in get_equipped_items())
|
||||
var/obj/item/I = X
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
//Weapon
|
||||
|
||||
/obj/item/light_eater
|
||||
name = "light eater"
|
||||
name = "light eater" //as opposed to heavy eater
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
force = 25
|
||||
@@ -173,6 +173,10 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/light_eater/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 80, 70)
|
||||
|
||||
/obj/item/light_eater/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
@@ -773,17 +773,8 @@
|
||||
/mob/living/proc/get_permeability_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/harvest(mob/living/user)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(butcher_results)
|
||||
var/atom/Tsec = drop_location()
|
||||
for(var/path in butcher_results)
|
||||
for(var/i = 1; i <= butcher_results[path];i++)
|
||||
new path(Tsec)
|
||||
butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below.
|
||||
visible_message("<span class='notice'>[user] butchers [src].</span>")
|
||||
gib(0, 0, 1)
|
||||
/mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering
|
||||
return
|
||||
|
||||
/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
if(incapacitated())
|
||||
|
||||
@@ -65,7 +65,10 @@
|
||||
var/last_bumped = 0
|
||||
var/unique_name = 0 //if a mob's name should be appended with an id when created e.g. Mob (666)
|
||||
|
||||
var/list/butcher_results = null
|
||||
var/list/butcher_results = null //these will be yielded from butchering with a probability chance equal to the butcher item's effectiveness
|
||||
var/list/guaranteed_butcher_results = null //these will always be yielded from butchering
|
||||
var/butcher_difficulty = 0 //effectiveness prob. is modified negatively by this amount; positive numbers make it more difficult, negative ones make it easier
|
||||
|
||||
var/hellbound = 0 //People who've signed infernal contracts are unrevivable.
|
||||
|
||||
var/list/weather_immunities = list()
|
||||
|
||||
@@ -53,7 +53,8 @@ Difficulty: Medium
|
||||
pixel_x = -16
|
||||
crusher_loot = list(/obj/structure/closet/crate/necropolis/dragon/crusher)
|
||||
loot = list(/obj/structure/closet/crate/necropolis/dragon)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/bone = 30)
|
||||
guaranteed_butcher_results = list(/obj/item/stack/sheet/animalhide/ashdrake = 10)
|
||||
var/swooping = NONE
|
||||
var/swoop_cooldown = 0
|
||||
medal_type = BOSS_MEDAL_DRAKE
|
||||
|
||||
@@ -86,7 +86,8 @@
|
||||
throw_message = "does nothing to the tough hide of the"
|
||||
pre_attack_icon = "goliath2"
|
||||
crusher_loot = /obj/item/crusher_trophy/goliath_tentacle
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2)
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/bone = 2)
|
||||
guaranteed_butcher_results = list(/obj/item/stack/sheet/animalhide/goliath_hide = 1)
|
||||
loot = list()
|
||||
stat_attack = UNCONSCIOUS
|
||||
robust_searching = 1
|
||||
@@ -111,6 +112,7 @@
|
||||
throw_message = "does nothing to the rocky hide of the"
|
||||
loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) //A throwback to the asteroid days
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/goliath = 2, /obj/item/stack/sheet/bone = 2)
|
||||
guaranteed_butcher_results = list()
|
||||
crusher_drop_mod = 30
|
||||
wander = FALSE
|
||||
var/list/cached_tentacle_turfs
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/CanAttack(atom/the_target) // Mushroom-specific version of CanAttack to handle stupid attack_same = 2 crap so we don't have to do it for literally every single simple_animal/hostile because this shit never gets spawned
|
||||
if(!the_target || isturf(the_target) || istype(the_target, /atom/movable/lighting_object))
|
||||
if(!the_target || isturf(the_target) || istype(the_target, /atom/movable/lighting_object))
|
||||
return FALSE
|
||||
|
||||
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
|
||||
@@ -188,4 +188,3 @@
|
||||
S.reagents.add_reagent("mushroomhallucinogen", powerlevel)
|
||||
S.reagents.add_reagent("omnizine", powerlevel)
|
||||
S.reagents.add_reagent("synaptizine", powerlevel)
|
||||
qdel(src)
|
||||
|
||||
@@ -90,6 +90,10 @@
|
||||
"Command Blue" = "pen-fountain-cb"
|
||||
)
|
||||
|
||||
/obj/item/pen/fountain/captain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 200, 115) //the pen is mightier than the sword
|
||||
|
||||
/obj/item/pen/fountain/captain/reskin_obj(mob/M)
|
||||
..()
|
||||
if(current_skin)
|
||||
@@ -178,6 +182,10 @@
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") //these wont show up if the pen is off
|
||||
var/on = FALSE
|
||||
|
||||
/obj/item/pen/edagger/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 60, 100, 0, 'sound/weapons/blade1.ogg', TRUE)
|
||||
|
||||
/obj/item/pen/edagger/attack_self(mob/living/user)
|
||||
if(on)
|
||||
on = FALSE
|
||||
@@ -199,6 +207,8 @@
|
||||
throwforce = 35
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
|
||||
to_chat(user, "<span class='warning'>[src] is now active.</span>")
|
||||
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
|
||||
butchering.butchering_enabled = on
|
||||
update_icon()
|
||||
|
||||
/obj/item/pen/edagger/update_icon()
|
||||
|
||||
@@ -131,6 +131,10 @@
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
..()
|
||||
if(cell)
|
||||
|
||||
@@ -86,6 +86,10 @@
|
||||
sharpness = IS_SHARP
|
||||
max_charges = 4
|
||||
|
||||
/obj/item/gun/magic/staff/spellblade/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 15, 125, 0, hitsound)
|
||||
|
||||
/obj/item/gun/magic/staff/spellblade/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
|
||||
|
||||
@@ -112,6 +112,10 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
|
||||
/obj/item/scalpel/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed, 100, 0)
|
||||
|
||||
/obj/item/scalpel/augment
|
||||
name = "toolarm scalpel"
|
||||
desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy."
|
||||
@@ -153,6 +157,10 @@
|
||||
attack_verb = list("attacked", "slashed", "sawed", "cut")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/circular_saw/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 40 * toolspeed, 100, 5, 'sound/weapons/circsawhit.ogg') //saws are very accurate and fast at butchering
|
||||
|
||||
/obj/item/circular_saw/augment
|
||||
name = "toolarm circular saw"
|
||||
desc = "A small but very fast spinning saw. Edges dulled to prevent accidental cutting inside of the surgeon."
|
||||
|
||||
Reference in New Issue
Block a user