refactor(audit-M2): drop nil-fallback workaround branch (consumes maps tile_at fix)
This commit is contained in:
9
init.lua
9
init.lua
@@ -29,14 +29,7 @@ function M.draw_map(map_id)
|
||||
local count = 0
|
||||
for ty = 0, size.h - 1 do
|
||||
for tx = 0, size.w - 1 do
|
||||
-- maps.tile_at uses arity-dispatch: 2-arg form falls back to current map,
|
||||
-- 3-arg form requires non-nil map_id. Branch to keep both call-shapes happy.
|
||||
local t
|
||||
if map_id == nil then
|
||||
t = maps.tile_at(tx, ty)
|
||||
else
|
||||
t = maps.tile_at(map_id, tx, ty)
|
||||
end
|
||||
local t = maps.tile_at(map_id, tx, ty)
|
||||
if t ~= nil then
|
||||
local c = tile_color(t)
|
||||
local color = engine.render.rgb(c[1], c[2], c[3])
|
||||
|
||||
Reference in New Issue
Block a user