From 95751a8ba1a2881972ab50fabc72526ee989a29f Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 31 Jul 2016 09:00:57 +0200 Subject: Map restart --- main.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 95ce865..445ed6f 100644 --- a/main.lua +++ b/main.lua @@ -106,7 +106,12 @@ function love.keypressed(key) love.event.quit() end if key == "f6" and debug then - local new = World:new("default", {"link", Controllers[1]}, {"weed", Controllers[2]}) + local map = Scene:getMapName() + local nauts = {} + for _,naut in pairs(Scene:getNautsAll()) do + table.insert(nauts, {naut.name, naut.controller}) + end + local new = World:new(map, nauts) Scene:delete() changeScene(new) end -- cgit v1.1