From 7f524270713a558c0538c7d728271121928a60ec Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 5 Sep 2017 02:17:01 +0200 Subject: Map config filepath is now added to map config table; used by debug mode --- config/menus/host.lua | 1 + not/World.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/menus/host.lua b/config/menus/host.lua index 1ac4b0f..5595f8b 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -19,6 +19,7 @@ do if love.filesystem.isFile(path) and filename ~= "readme.md" then local map = love.filesystem.load(path)() local i, name = map.portrait, map.name + map.filepath = path if i then table.insert(icons, love.graphics.newQuad((i-1)*76, 0, 76, 37, 532, 37)) table.insert(maps, map) diff --git a/not/World.lua b/not/World.lua index b2dc0e7..c4606dd 100644 --- a/not/World.lua +++ b/not/World.lua @@ -358,7 +358,8 @@ end -- Controller callbacks function World:controlpressed (set, action, key) if key == "f6" and debug then - local map = self:getMapName() + local map = love.filesystem.load(self.map.filepath)() + map.filepath = self.map.filepath local nauts = {} for _,naut in pairs(self:getNautsAll()) do table.insert(nauts, {naut.name, naut:getControllerSet()}) -- cgit v1.1