Assert optional api results across the scenario modules

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassie
2026-08-07 15:31:43 +00:00
co-authored by Claude Opus 5
parent f9ce3c4145
commit 3c0b5069fc
6 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ SelectArea:on_selection(function(event)
if #chests > 0 then
for _, chest in pairs(chests) do
tile_count = tile_count + 1
if chest.get_inventory(defines.inventory.chest).is_empty() and tile_count <= item_count_total then
if assert(chest.get_inventory(defines.inventory.chest)).is_empty() and tile_count <= item_count_total then
tiles_to_make[tile_count] = { name = tile_to_apply, position = { chest.position.x, chest.position.y } }
chest.destroy()
else