diff --git a/init.lua b/init.lua index 300806f..567e989 100644 --- a/init.lua +++ b/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])