From 2668bd4c9ec9846cdab9716afb98928f387dc08a Mon Sep 17 00:00:00 2001 From: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:57:26 +0000 Subject: [PATCH] [FIX] Slimes no longer gain nutrition from IPCs (#28389) * Should fix slimes not damaging IPCs * Makes it work on non-human type mobs * Apply suggestions from code review Moves the comments above the code block. Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> * Prevents the IPC damage affecting Vox * Change it from dealing damage to all species to instead stop gaining nutrition from IPCs. * Hopefully fix the empty block. Realised that slimes were also able to heal by absorbing IPCs. * Cast so that it doesn't break Xenos. Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> * Make CI happy. Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> * To make slimes stop feeding if they can't gain nutrition. Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> --------- Signed-off-by: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> --- .../modules/mob/living/simple_animal/slime/slime_life.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 b8d659c6b40..e22ee2a5a54 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -155,6 +155,7 @@ if(prob(30) && stat == CONSCIOUS) adjustBruteLoss(-1) +// This is where slime feeding is handled. /mob/living/simple_animal/slime/proc/handle_feeding() if(!ismob(buckled)) return @@ -174,6 +175,7 @@ Feedstop() return + // This is where damage dealt by slime feeding is handled. if(iscarbon(M)) var/mob/living/carbon/C = M C.adjustCloneLoss(rand(2, 4)) @@ -203,8 +205,13 @@ Feedstop(0, 0) return + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.dna.species.tox_mod && !H.dna.species.clone_mod) + Feedstop(0, 0) + return + add_nutrition(rand(7, 15)) - //Heal yourself. adjustBruteLoss(-3)