Prevents TGUI crash when slime tries to feed with 0 valid targets (#28031)

* Prevents TGUI Crush when 0 targets was found.

* !

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>

---------

Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Drsmail
2025-01-26 09:32:40 +03:00
committed by GitHub
parent e214704b34
commit fc2e10fc3c
@@ -29,6 +29,10 @@
if(C!=src && Adjacent(C))
choices += C
if(!length(choices))
to_chat(src, "<span class='warning'>No subjects nearby to feed on!</span>")
return
var/mob/living/M = tgui_input_list(src, "Who do you wish to feed on?", "Feeding Selection", choices)
if(!M)
return FALSE