mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
## About The Pull Request This PR reinforces the flavour and mechanical prowess of morbid people like the coroner by giving them a 30% speed bonus for two additional morbid activities: shearing off limbs and digging graves. It also makes toolspeed modifers affect the time it takes to dig a grave. I have not rebalanced the shovels stats or toolspeed mods in this PR, that will have to wait until my upcoming gravedigging expansion. ## Why It's Good For The Game The amputation shears is a decent luxury chase item for coroner because it synergizes nicely with his playstyle, but it currently doesn't take any morbid or autopsy bonuses into account which makes not that great as a time saver. I think is a shame because the item has perfect flavour and base mechanics for the role. This change makes shelling out the 700 credits feel more worth it and makes the choice regarding what to spend your credits on more meaningful. Digging graves, while a very niche interaction, is also a very flavourful way of getting rid of rejected cadavers, so having a boost there is also nice for encouraging players to try it out instead of just leaving it on the floor to rot or throwing it in disposals. The tool speed modifier change is something that makes the very marginal upgraded shovels a little more special, and is in line with how other advanced tools work. I was touching that line anyway so I figured I might as well add it. ## Changelog 🆑 balance: Morbid people, like the coroner now amputate 30% faster using the amputation shears. balance: Morbid people dig graves 30% faster. balance: Better shovels dig graves faster. /🆑
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
/**
|
|
* Gravedigger element. Allows for graves to be dug from certain tiles
|
|
*/
|
|
/datum/element/gravedigger
|
|
element_flags = ELEMENT_BESPOKE
|
|
argument_hash_start_idx = 2
|
|
|
|
/// A list of turf types that can be used to dig a grave.
|
|
var/static/list/turfs_to_consider = typecacheof(list(
|
|
/turf/open/misc/asteroid,
|
|
/turf/open/misc/dirt,
|
|
/turf/open/misc/grass,
|
|
/turf/open/misc/basalt,
|
|
/turf/open/misc/ashplanet,
|
|
/turf/open/misc/snow,
|
|
/turf/open/misc/sandy_dirt,
|
|
))
|
|
|
|
/datum/element/gravedigger/Attach(datum/target)
|
|
. = ..()
|
|
|
|
if(!isitem(target)) //Must be an item to use toolspeed variable.
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
RegisterSignal(target, COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY, PROC_REF(dig_checks))
|
|
|
|
/datum/element/gravedigger/Detach(datum/source, ...)
|
|
. = ..()
|
|
UnregisterSignal(source, COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY)
|
|
|
|
/datum/element/gravedigger/proc/dig_checks(datum/source, mob/living/user, atom/interacting_with, list/modifiers)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!is_type_in_typecache(interacting_with, turfs_to_consider))
|
|
return NONE
|
|
|
|
if(locate(/obj/structure/closet/crate/grave) in interacting_with)
|
|
user.balloon_alert(user, "grave already present!")
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
user.balloon_alert(user, "digging grave...")
|
|
playsound(interacting_with, 'sound/effects/shovel_dig.ogg', 50, TRUE)
|
|
INVOKE_ASYNC(src, PROC_REF(perform_digging), user, interacting_with, source)
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
/datum/element/gravedigger/proc/perform_digging(mob/user, atom/dig_area, obj/item/our_tool)
|
|
if(our_tool.use_tool(dig_area, user, 10 SECONDS * (HAS_MIND_TRAIT(user, TRAIT_MORBID) ? 0.7 : 1) * our_tool.toolspeed))
|
|
new /obj/structure/closet/crate/grave/fresh(dig_area) //We don't get_turf for the location since this is guaranteed to be a turf at this point.
|