From 8bfc19fcfabd208f9f44d405bf1edeeb2b66db4f Mon Sep 17 00:00:00 2001 From: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:01:55 +0100 Subject: [PATCH 1/4] Should fix slimes not damaging IPCs --- .../mob/living/simple_animal/slime/slime_life.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 b8d659c6b40c1..50c83daf4888f 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -155,7 +155,7 @@ if(prob(30) && stat == CONSCIOUS) adjustBruteLoss(-1) -/mob/living/simple_animal/slime/proc/handle_feeding() +/mob/living/simple_animal/slime/proc/handle_feeding() // This is where slime feeding is actually done. if(!ismob(buckled)) return var/mob/M = buckled @@ -174,10 +174,14 @@ Feedstop() return - if(iscarbon(M)) + if(iscarbon(M)) // This is where damage done by slime feeding is done. var/mob/living/carbon/C = M - C.adjustCloneLoss(rand(2, 4)) - C.adjustToxLoss(rand(1, 2)) + if(!(C.dna.species.reagent_tag & PROCESS_SYN)) // Ensure slimes deal organic type damage to organics. + C.adjustCloneLoss(rand(2, 4)) + C.adjustToxLoss(rand(1, 2)) + else + C.adjustBrainLoss(rand(2, 4), robotic = TRUE) // The IPC equivalent of Clone damage would be Brain damage. + C.adjustFireLoss(rand(1, 2), robotic = TRUE) // Poison can make you numb and feel on fire, also IPCs can't take Toxin damage. if(prob(10) && C.client) to_chat(C, "[pick("You can feel your body becoming weak!", \ From 154cdc1532fe417953dd82f8d40ede6f1515f3a0 Mon Sep 17 00:00:00 2001 From: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:51:45 +0100 Subject: [PATCH 2/4] Makes it work on non-human type mobs --- .../mob/living/simple_animal/slime/slime_life.dm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 50c83daf4888f..52733b1d12a99 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -176,12 +176,17 @@ if(iscarbon(M)) // This is where damage done by slime feeding is done. var/mob/living/carbon/C = M - if(!(C.dna.species.reagent_tag & PROCESS_SYN)) // Ensure slimes deal organic type damage to organics. + var/mob/living/carbon/human/D = M // I don't want to accidentally break feeding on Xenos or something. + if(C.dna) // Ensures there is DNA for the Synthetic check + if(C.dna.species.reagent_tag & PROCESS_SYN) + D.adjustBrainLoss(rand(2, 4)) // The IPC equivalent of Clone damage would be Brain damage. + D.adjustFireLoss(rand(1, 2), robotic = TRUE) // Poison can make you numb and feel on fire, also IPCs can't take Toxin damage. + else // Ensure slimes deal organic type damage to organics. + C.adjustCloneLoss(rand(2, 4)) + C.adjustToxLoss(rand(1, 2)) + else C.adjustCloneLoss(rand(2, 4)) C.adjustToxLoss(rand(1, 2)) - else - C.adjustBrainLoss(rand(2, 4), robotic = TRUE) // The IPC equivalent of Clone damage would be Brain damage. - C.adjustFireLoss(rand(1, 2), robotic = TRUE) // Poison can make you numb and feel on fire, also IPCs can't take Toxin damage. if(prob(10) && C.client) to_chat(C, "[pick("You can feel your body becoming weak!", \ From 7dda6e11a98988af2cba67d26fdc6dc9404b1b5b Mon Sep 17 00:00:00 2001 From: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:33:42 +0100 Subject: [PATCH 3/4] 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> --- code/modules/mob/living/simple_animal/slime/slime_life.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 52733b1d12a99..14e919a95b763 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -155,7 +155,8 @@ if(prob(30) && stat == CONSCIOUS) adjustBruteLoss(-1) -/mob/living/simple_animal/slime/proc/handle_feeding() // This is where slime feeding is actually done. +// This is where slime feeding is handled. +/mob/living/simple_animal/slime/proc/handle_feeding() if(!ismob(buckled)) return var/mob/M = buckled @@ -174,7 +175,8 @@ Feedstop() return - if(iscarbon(M)) // This is where damage done by slime feeding is done. +// This is where damage dealt by slime feeding is handled. + if(iscarbon(M)) var/mob/living/carbon/C = M var/mob/living/carbon/human/D = M // I don't want to accidentally break feeding on Xenos or something. if(C.dna) // Ensures there is DNA for the Synthetic check From 13cdd051e293eea2cfa55af8aa238839200df10c Mon Sep 17 00:00:00 2001 From: WenlockTheBritishHobo <168675688+WenlockTheBritishHobo@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:36:46 +0100 Subject: [PATCH 4/4] Prevents the IPC damage affecting Vox --- code/modules/mob/living/simple_animal/slime/slime_life.dm | 2 +- 1 file changed, 1 insertion(+), 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 52733b1d12a99..2c27aa5dd4604 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_life.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_life.dm @@ -178,7 +178,7 @@ var/mob/living/carbon/C = M var/mob/living/carbon/human/D = M // I don't want to accidentally break feeding on Xenos or something. if(C.dna) // Ensures there is DNA for the Synthetic check - if(C.dna.species.reagent_tag & PROCESS_SYN) + if(!(C.dna.species.reagent_tag & PROCESS_ORG)) D.adjustBrainLoss(rand(2, 4)) // The IPC equivalent of Clone damage would be Brain damage. D.adjustFireLoss(rand(1, 2), robotic = TRUE) // Poison can make you numb and feel on fire, also IPCs can't take Toxin damage. else // Ensure slimes deal organic type damage to organics.