From e6e5f5ce36120fe4d73540088f9b2ba810b53fed Mon Sep 17 00:00:00 2001 From: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Date: Mon, 25 Aug 2025 13:51:27 -0400 Subject: [PATCH] Xenobiology QOL tweaks (#30062) * Xenobiology QOL tweaks * fixes * Update generic.dm * name tweak * Update code/__HELPERS/trait_helpers.dm Co-authored-by: warriorstar-orion Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> --------- Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Co-authored-by: warriorstar-orion --- code/__HELPERS/trait_helpers.dm | 3 +++ code/modules/mob/living/simple_animal/slime/slime_life.dm | 4 ++++ code/modules/mob/living/simple_animal/slime/slime_mob.dm | 5 ++++- code/modules/research/xenobiology/xenobiology_dissections.dm | 1 + code/modules/surgery/generic.dm | 1 - code/modules/surgery/surgery.dm | 3 +++ 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 9ccd329f429..b30e1f20ed0 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -316,6 +316,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// A surgical tool; If a surgical tool has this flag it can be used as an alternative to an open hand in surgery #define TRAIT_SURGICAL_OPEN_HAND "surgical_hand_alternative" +/// Surgical tools with this trait have their prob_success set to 100 (but is still able to fail from other factors) +#define TRAIT_SURGICAL_CANNOT_FAIL "surgical_cannot_fail" + /// A wearable item that protects the covered areas from viral infection #define TRAIT_ANTI_VIRAL "anti_viral" diff --git a/code/modules/mob/living/simple_animal/slime/slime_life.dm b/code/modules/mob/living/simple_animal/slime/slime_life.dm index 49ba9217207..ae1d826b1b9 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -446,6 +446,10 @@ phrases += "What happened?" if(!slimes_near) phrases += "Lonely..." + if(trained && prob(3)) + phrases += "Treat? Have treat?" + phrases += "Can have treat?" + phrases += "Treat?..." if(stat == CONSCIOUS) say (pick(phrases)) diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm index 503f0f21eeb..bee8406c789 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm @@ -417,6 +417,7 @@ S.use(5) if(Discipline) trained = TRUE + name = "tamed [name]" else discipline_slime(user, positive_reinforcement = TRUE) return ITEM_INTERACT_COMPLETE @@ -431,7 +432,8 @@ Discipline = 0 return ITEM_INTERACT_COMPLETE if(trained && prob(20)) // trained slimes are more resistant to losing discipline - trained = 0 + trained = FALSE + name = initial(name) visible_message("[src] gets spooked and cowers from [user]!") /mob/living/simple_animal/slime/attacked_by(obj/item/I, mob/living/user) @@ -455,6 +457,7 @@ if(trained && prob(75)) say("Ow! HEY!!!", pick(speak_emote)) trained = FALSE + name = initial(name) rabid = TRUE if(!client && Target && volume >= 3) // Like cats Target = null diff --git a/code/modules/research/xenobiology/xenobiology_dissections.dm b/code/modules/research/xenobiology/xenobiology_dissections.dm index 8c98c1649b1..dfbf605fff0 100644 --- a/code/modules/research/xenobiology/xenobiology_dissections.dm +++ b/code/modules/research/xenobiology/xenobiology_dissections.dm @@ -26,6 +26,7 @@ /obj/item/dissector/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_SURGICAL, ROUNDSTART_TRAIT) + ADD_TRAIT(src, TRAIT_SURGICAL_CANNOT_FAIL, ROUNDSTART_TRAIT) AddComponent(/datum/component/surgery_initiator) RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit)) RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(remove_bit)) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index deaffda320a..73a8d46ae67 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -12,7 +12,6 @@ allowed_tools = list( TOOL_SCALPEL = 100, /obj/item/kitchen/knife = 90, - TOOL_DISSECTOR = 75, /obj/item/kitchen/knife/shiv = 70, /obj/item/shard = 60, TOOL_WIRECUTTER = 35, diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index b8871bafdd8..b0d3b5e881e 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -375,6 +375,9 @@ surgery.step_in_progress = FALSE return SURGERY_INITIATE_INTERRUPTED + if(HAS_TRAIT(tool, TRAIT_SURGICAL_CANNOT_FAIL)) + prob_success = 100 // going to snowflake this in otherwise dissections fail repeatedtly with "proper" tools. + var/chem_check_result = chem_check(target) var/pain_mod = deal_pain(user, target, target_zone, tool, surgery) prob_success *= pain_mod