summaryrefslogtreecommitdiffhomepage
path: root/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'world.lua')
-rw-r--r--world.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/world.lua b/world.lua
index 98d0c0b..6ef294c 100644
--- a/world.lua
+++ b/world.lua
@@ -60,9 +60,9 @@ end
-- Load map from file
function World:loadMap(name)
local name = name or "default"
- name = "maps/" .. name
- local map = require(name)
- self.map = map
+ name = "maps/" .. name .. ".lua"
+ local map = love.filesystem.load(name)
+ self.map = map()
for _,platform in pairs(self.map.platforms) do
self:createPlatform(platform.x, platform.y, platform.shape, platform.sprite)
end