Skip to content

Commit

Permalink
[MIRROR] Fixes some issues with slime feeding (#708) (#1772)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: John Willard <[email protected]>
Co-authored-by: Ghom <[email protected]>
  • Loading branch information
4 people authored Feb 6, 2024
1 parent dc85592 commit d5b4943
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code/modules/mob/living/simple_animal/slime/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5b4943

Please sign in to comment.