mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user