Fixes inserting sheets with no defined material (like tiles) into machines

This commit is contained in:
Heroman
2022-10-30 05:39:20 +10:00
parent 66623a564b
commit f6d78e4ccf
@@ -152,6 +152,11 @@
to_chat(user, "<span class='warning'>[parent] cannot contain [material].</span>")
return
// Our sheet had no material. Whoops.
if(!material_per_sheet)
to_chat(user, "<span class='warning'>[S] does not contain any matter acceptable by [parent].</span>")
return
// If we can't fit the material for one sheet, we're full.
if(!has_space(matter_per_sheet))
to_chat(user, "<span class='warning'>[parent] is full. Please remove materials from [parent] in order to insert more.</span>")