Prevent ModMgr from deleting backend setting in world.mt
authorSfan5 <sfan5@live.de>
Mon, 9 Sep 2013 18:26:46 +0000 (20:26 +0200)
committerSfan5 <sfan5@live.de>
Mon, 9 Sep 2013 20:50:51 +0000 (22:50 +0200)
builtin/modmgr.lua

index 9f5f68a48df4a3a7fb26a9a94f9f5faa19f1168e..6562c77a81210b2a7066df5e1c365d2a5df70b9c 100644 (file)
@@ -513,6 +513,8 @@ function modmgr.get_worldconfig(worldpath)
 
                        if key == "gameid" then
                                worldconfig.id = parts[2]:trim()
+                       elseif key == "backend" then
+                               worldconfig.backend = parts[2]:trim()
                        else
                                local key = parts[1]:trim():sub(10)
                                if parts[2]:trim() == "true" then
@@ -729,7 +731,7 @@ function modmgr.handle_configure_world_buttons(fields)
                local worldfile = io.open(filename,"w")
                
                if worldfile then
-                       worldfile:write("gameid = " .. modmgr.worldconfig.id .. "\n")
+                       worldfile:write("gameid = " .. modmgr.worldconfig.id .. "\nbackend = " .. modmgr.worldconfig.backend .. "\n")
                        
                        local rawlist = filterlist.get_raw_list(modmgr.modlist)