Merge pull request #14009 from Heroman3003/material-runtime

Fixes inserting sheets with no defined material (like tiles) into machines
This commit is contained in:
Casey
2022-10-30 11:25:23 -04:00
committed by CHOMPStation2
parent 4157a6dc1b
commit 5232e9cd2d
@@ -152,6 +152,11 @@
to_chat(user, "<span class='warning'>[parent] cannot contain [material].</span>")
return
// Our sheet had no material. Whoops.
if(!matter_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>")