From d5b4943eb82506f30c9d7216608adde5c390b809 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:43:13 +0300 Subject: [PATCH] [MIRROR] Fixes some issues with slime feeding (#708) (#1772) * Fixes some issues with slime feeding (#81166) ## About The Pull Request Using feed while feeding on someone will now unbuckle you rather than prompt you to buckle to someone else like it's supposed to The list of people to buckle to no longer includes dead people (which is beneficial for the last fix) If there's only one person to buckle to then it will skip the UI and eat that person. ## Why It's Good For The Game Fixes to slime. ## Changelog :cl: fix: Slimes using Feed while buckled now stops feeding. fix: Slimes are no longer prompted to feed off of dead people. fix: Slimes that can only feed onto one person now immediately feeds off of them. /:cl: --------- * Fixes some issues with slime feeding --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/mob/living/simple_animal/slime/powers.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index f129482eb24..a99a79a311a 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -30,11 +30,19 @@ if(stat) return FALSE + if(buckled) + stop_feeding() + return TRUE + var/list/choices = list() for(var/mob/living/nearby_mob in view(1,src)) - if(nearby_mob != src && Adjacent(nearby_mob)) + if(nearby_mob != src && Adjacent(nearby_mob) && nearby_mob.appears_alive()) choices += nearby_mob + if(length(choices) == 1) + start_feeding(choices[1]) + return TRUE + var/choice = tgui_input_list(src, "Who do you wish to feed on?", "Slime Feed", sort_names(choices)) if(isnull(choice)) return FALSE