Assert row lookups and the position shorthand

spawn_area accepts both position forms on purpose, so it asserts that
one of the two is present rather than narrowing the type.

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 b75e283fc0
commit 7d8de94c2f
3 changed files with 9 additions and 9 deletions
@@ -16,7 +16,7 @@ end
--- Replace a tile with the next tile in the degrade chain
--- @param surface LuaSurface
--- @param position MapPosition
--- @param position MapPosition.struct
local function degrade_tile(surface, position)
local tile = surface.get_tile(position)
local tile_name = tile.name
@@ -58,7 +58,7 @@ end
--- Gets the average tile strengths around position
--- @param surface LuaSurface
--- @param position MapPosition
--- @param position MapPosition.struct
--- @return number?
local function get_tile_strength(surface, position)
local tile = surface.get_tile(position)