Skip to content

Commit

Permalink
[MIRROR] Removes the vestigial slime reagent system [MDB IGNORE] (#25…
Browse files Browse the repository at this point in the history
…397) (#937)

* Removes the vestigial slime reagent system (#80068)

## About The Pull Request

Slimes, unique among simple and basic mobs, had a reagent holder. During
life, they removed some of the reagents in the holder, but they never
actually metabolized them. Two reagents, frostoil and capsaicin did not
know this, and checked every time in on mob life if the mob they were in
was a slime, which was never the case.

Slimes also checked if they had morphine or frostoil in them when they
detected a change in their reagents, on_reagent_change, and applied a
slowdown. There are not many ways to put these reagents in slimes in the
first place. Chempuffs, syringes (but not hyposprays) work, and I assume
smoke too. I removed this dead code.

I did see this comment _"Should be moved to the reagents at some point
in the future. As it is I'm in a hurry."_ and I did try to move the
effects to reagents' onExpose(), creating a status effect that only
applies to mobs without reagents, lasts as long as it would have lasted
based on reagents, and respects that morphine and frostoil doesn't
stack. However, while doing this I realized I would be making reagents
2, in a much worse, overcomplicated manner.

In the end, I have decided to completely remove the reagent holder of
slimes, and the morphine and frostoil effects.

## Why It's Good For The Game

These systems are rather vestigial, and there isn't really much to gain
from them. The interaction with heat and gas types is a much more unique
system, so perhaps it will be better if we focus on them.

Also makes it easier to convert them to basic mobs, and also, keeps them
consistent with the rest of our mobs.

## Changelog

:cl:
del: Removes the slime's reagent holder. This will make them not slow
down from somehow imbibing morphine or frostoil.
/:cl:

* Removes the vestigial slime reagent system

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Profakos <[email protected]>
  • Loading branch information
3 people authored Dec 3, 2023
1 parent 17a7832 commit f6d89ce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
1 change: 0 additions & 1 deletion code/modules/mob/living/simple_animal/slime/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
handle_nutrition(seconds_per_tick, times_fired)
if(QDELETED(src)) // Stop if the slime split during handle_nutrition()
return
reagents.remove_all(0.5 * REAGENTS_METABOLISM * reagents.reagent_list.len * seconds_per_tick) //Slimes are such snowflakes
handle_targets(seconds_per_tick, times_fired)
if(ckey)
return
Expand Down
29 changes: 0 additions & 29 deletions code/modules/mob/living/simple_animal/slime/slime.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
else
var/datum/action/innate/slime/evolve/evolve_action = new
evolve_action.Grant(src)
create_reagents(100)
set_slime_type(new_type)
. = ..()
set_nutrition(700)
Expand All @@ -147,17 +146,6 @@
/mob/living/simple_animal/slime/pet
docile = TRUE

/mob/living/simple_animal/slime/create_reagents(max_vol, flags)
. = ..()
RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(on_reagent_change))
RegisterSignal(reagents, COMSIG_QDELETING, PROC_REF(on_reagents_del))

/// Handles removing signal hooks incase someone is crazy enough to reset the reagents datum.
/mob/living/simple_animal/slime/proc/on_reagents_del(datum/reagents/reagents)
SIGNAL_HANDLER
UnregisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_QDELETING))
return NONE

/mob/living/simple_animal/slime/proc/set_slime_type(new_type)
slime_type = new new_type
update_name()
Expand Down Expand Up @@ -188,23 +176,6 @@
icon_state = icon_dead
..()

/**
* Snowflake handling of reagent movespeed modifiers
*
* Should be moved to the reagents at some point in the future. As it is I'm in a hurry.
*/
/mob/living/simple_animal/slime/proc/on_reagent_change(datum/reagents/holder, ...)
SIGNAL_HANDLER
remove_movespeed_modifier(/datum/movespeed_modifier/slime_reagentmod)
var/amount = 0
if(reagents.has_reagent(/datum/reagent/medicine/morphine)) // morphine slows slimes down
amount = 2
if(reagents.has_reagent(/datum/reagent/consumable/frostoil)) // Frostoil also makes them move VEEERRYYYYY slow
amount = 5
if(amount)
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/slime_reagentmod, multiplicative_slowdown = amount)
return NONE

/mob/living/simple_animal/slime/updatehealth()
. = ..()
var/mod = 0
Expand Down
16 changes: 0 additions & 16 deletions code/modules/reagents/chemistry/reagents/food_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -352,20 +352,12 @@
heating = 5
if(holder.has_reagent(/datum/reagent/cryostylane))
holder.remove_reagent(/datum/reagent/cryostylane, 5 * REM * seconds_per_tick)
if(isslime(affected_mob))
heating = rand(5, 20)
if(15 to 25)
heating = 10
if(isslime(affected_mob))
heating = rand(10, 20)
if(25 to 35)
heating = 15
if(isslime(affected_mob))
heating = rand(15, 20)
if(35 to INFINITY)
heating = 20
if(isslime(affected_mob))
heating = rand(20, 25)
affected_mob.adjust_bodytemperature(heating * TEMPERATURE_DAMAGE_COEFFICIENT * REM * seconds_per_tick)

/datum/reagent/consumable/frostoil
Expand All @@ -387,24 +379,16 @@
cooling = -10
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
holder.remove_reagent(/datum/reagent/consumable/capsaicin, 5 * REM * seconds_per_tick)
if(isslime(affected_mob))
cooling = -rand(5, 20)
if(15 to 25)
cooling = -20
if(isslime(affected_mob))
cooling = -rand(10, 20)
if(25 to 35)
cooling = -30
if(prob(1))
affected_mob.emote("shiver")
if(isslime(affected_mob))
cooling = -rand(15, 20)
if(35 to INFINITY)
cooling = -40
if(prob(5))
affected_mob.emote("shiver")
if(isslime(affected_mob))
cooling = -rand(20, 25)
affected_mob.adjust_bodytemperature(cooling * TEMPERATURE_DAMAGE_COEFFICIENT * REM * seconds_per_tick, 50)

/datum/reagent/consumable/frostoil/expose_turf(turf/exposed_turf, reac_volume)
Expand Down

0 comments on commit f6d89ce

Please sign in to comment.