mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
* Slime core removal surgery changes (#84241) ## About The Pull Request Fixed an issue with incorrect slime dead icon after core removal surgery. Made the surgery yield all cores in case if the slime had a steroid potion applied. ## Why It's Good For The Game The icon was broken. Less clicks for surgery. ## Changelog 🆑 fix: Fixed dead slime icon not showing when cores are extracted qol: Slime core removal surgery extracts all cores on completion /🆑 * Slime core removal surgery changes --------- Co-authored-by: Andrew <mt.forspam@gmail.com>
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
/datum/surgery/core_removal
|
|
name = "Core removal"
|
|
target_mobtypes = list(/mob/living/basic/slime)
|
|
surgery_flags = SURGERY_IGNORE_CLOTHES
|
|
possible_locs = list(
|
|
BODY_ZONE_R_ARM,
|
|
BODY_ZONE_L_ARM,
|
|
BODY_ZONE_R_LEG,
|
|
BODY_ZONE_L_LEG,
|
|
BODY_ZONE_CHEST,
|
|
BODY_ZONE_HEAD,
|
|
)
|
|
steps = list(
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/extract_core,
|
|
)
|
|
|
|
/datum/surgery/core_removal/can_start(mob/user, mob/living/target)
|
|
return target.stat == DEAD && ..()
|
|
|
|
//extract brain
|
|
/datum/surgery_step/extract_core
|
|
name = "extract core (hemostat/crowbar)"
|
|
implements = list(
|
|
TOOL_HEMOSTAT = 100,
|
|
TOOL_CROWBAR = 100)
|
|
time = 16
|
|
|
|
/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("You begin to extract a core from [target]..."),
|
|
span_notice("[user] begins to extract a core from [target]."),
|
|
span_notice("[user] begins to extract a core from [target]."),
|
|
)
|
|
|
|
/datum/surgery_step/extract_core/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
|
|
var/mob/living/basic/slime/target_slime = target
|
|
var/core_count = target_slime.cores
|
|
if(core_count && target_slime.try_extract_cores(count = core_count))
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("You successfully extract [core_count] core\s from [target]."),
|
|
span_notice("[user] successfully extracts [core_count] core\s from [target]!"),
|
|
span_notice("[user] successfully extracts [core_count] core\s from [target]!"),
|
|
)
|
|
return TRUE
|
|
to_chat(user, span_warning("There aren't any cores left in [target]!"))
|
|
return ..()
|