From bc0537a649bec8ed2fe36a5dc8015f13989de51d Mon Sep 17 00:00:00 2001 From: Neckrat Date: Sat, 30 Aug 2025 02:13:19 +0300 Subject: [PATCH] initial get --- lib/level/level.lua | 3 +++ lib/level/map.lua | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/level/level.lua b/lib/level/level.lua index 4ebffa8..2918cf0 100644 --- a/lib/level/level.lua +++ b/lib/level/level.lua @@ -45,7 +45,10 @@ function level:update(dt) end mposCache = tostring(mpos) -- path = (require "lib.pathfinder")(charPos, mpos) + else + mposCache = nil end + self.camera:update(dt) self.selector:update(dt) end diff --git a/lib/level/map.lua b/lib/level/map.lua index 07ee49c..f8b72cd 100644 --- a/lib/level/map.lua +++ b/lib/level/map.lua @@ -23,4 +23,8 @@ function map:draw() end end +function map:get(x, y) + return self[x][y] +end + return { new = new }