mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
0625b841c3
This PR "gently refactors" surgery doafter timers to be deterministic and variable. Instead of being simply a random number of seconds between an upper and lower bounds, surgeries now have a base amount of time they take to perform (in fractional seconds). This doafter time can then be modified via signal interactions, such as coming from components. The Morale component, Surgery skill, Anatomy skill, and Xenobiology skill all have had signal hooks for surgery speed added, while the latter two are uniquely conditional signal modifiers. Anatomy only provides its modifier if the target's species matches your own, while Xenobiology only applies its modifier if the target is an alien. Morale can situationally either give a bonus or a penalty depending on your current amount of morale points. So to offset that this is now significantly more variable and that 4 different sources of bonus surgical speed exist, I've actually made the base surgery times always on the upper end of what their previous doafter duration range was, so surgeries are in general slower if you aren't taking advantage of specializing in it. Signed-off-by: VMSolidus <evilexecutive@gmail.com>
97 lines
4.9 KiB
Plaintext
97 lines
4.9 KiB
Plaintext
//////////////////////////////////////////////////////////////////
|
|
// SLIME CORE EXTRACTION //
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
/singleton/surgery_step/slime/is_valid_target(mob/living/carbon/slime/target)
|
|
return istype(target, /mob/living/carbon/slime/)
|
|
|
|
/singleton/surgery_step/slime/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
return isslime(target) && target.stat == DEAD
|
|
|
|
/singleton/surgery_step/slime/cut_flesh
|
|
name = "Open Slime"
|
|
allowed_tools = list(
|
|
TOOL_SCALPEL = 100,
|
|
/obj/item/material/knife = 75,
|
|
/obj/item/material/shard = 50
|
|
)
|
|
base_surgery_time = 3.5 SECONDS
|
|
skill_requirements = alist(XENOBIOLOGY_SKILL_COMPONENT = SKILL_LEVEL_TRAINED)
|
|
|
|
/singleton/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
return ..() && istype(target) && target.core_removal_stage == ORGAN_CLOSED
|
|
|
|
/singleton/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
|
|
"You start cutting through [target]'s flesh with \the [tool].")
|
|
..()
|
|
|
|
/singleton/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message(SPAN_NOTICE("[user] cuts through [target]'s flesh with \the [tool]."), \
|
|
SPAN_NOTICE("You cut through [target]'s flesh with \the [tool], revealing its silky innards."))
|
|
target.core_removal_stage = ORGAN_OPEN_INCISION
|
|
|
|
/singleton/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message(SPAN_WARNING("[user]'s hand slips, tearing [target]'s flesh with \the [tool]!"), \
|
|
SPAN_WARNING("Your hand slips, tearing [target]'s flesh with \the [tool]!"))
|
|
|
|
/singleton/surgery_step/slime/cut_innards
|
|
name = "Cut Innards"
|
|
allowed_tools = list(
|
|
TOOL_SCALPEL = 100,
|
|
/obj/item/material/knife = 75,
|
|
/obj/item/material/shard = 50
|
|
)
|
|
base_surgery_time = 4.5 SECONDS
|
|
skill_requirements = alist(XENOBIOLOGY_SKILL_COMPONENT = SKILL_LEVEL_TRAINED)
|
|
|
|
/singleton/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
return ..() && istype(target) && target.core_removal_stage == ORGAN_OPEN_INCISION
|
|
|
|
/singleton/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
|
|
"You start cutting [target]'s silky innards apart with \the [tool].")
|
|
..()
|
|
|
|
/singleton/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message(SPAN_NOTICE("[user] cuts [target]'s innards apart with \the [tool], exposing the cores."), \
|
|
SPAN_NOTICE("You cut [target]'s innards apart with \the [tool], exposing the cores."))
|
|
target.core_removal_stage = ORGAN_OPEN_RETRACTED
|
|
|
|
/singleton/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message(SPAN_WARNING("[user]'s hand slips, tearing [target]'s innards with \the [tool]!"), \
|
|
SPAN_WARNING("Your hand slips, tearing [target]'s innards with \the [tool]!"))
|
|
|
|
/singleton/surgery_step/slime/saw_core
|
|
name = "Detach Core"
|
|
allowed_tools = list(
|
|
TOOL_SAW = 100, \
|
|
/obj/item/material/hatchet = 75
|
|
)
|
|
base_surgery_time = 5.5 SECONDS
|
|
skill_requirements = alist(XENOBIOLOGY_SKILL_COMPONENT = SKILL_LEVEL_TRAINED)
|
|
|
|
/singleton/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
return ..() && (istype(target) && target.core_removal_stage == ORGAN_OPEN_RETRACTED && target.cores > 0) //This is being passed a human as target, unsure why.
|
|
|
|
/singleton/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
|
|
"You start cutting out one of [target]'s cores with \the [tool].")
|
|
..()
|
|
|
|
/singleton/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
target.cores--
|
|
user.visible_message(SPAN_NOTICE("[user] cuts out one of [target]'s cores with \the [tool]."),, \
|
|
SPAN_NOTICE("You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left."))
|
|
|
|
if(target.cores >= 0)
|
|
new target.coretype(target.loc)
|
|
if(target.cores < 0)
|
|
target.icon_state = "[target.colour] baby slime dead-nocore"
|
|
|
|
|
|
/singleton/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
|
user.visible_message(SPAN_WARNING("[user]'s hand slips, causing [user.get_pronoun("him")] to miss the core!"), \
|
|
SPAN_WARNING("Your hand slips, causing you to miss the core!"))
|