Skip to content

Commit aa822d2

Browse files
committed
save team info in mapinfo.lua so script.txt works during dev
1 parent d5365de commit aa822d2

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

scen_edit/command/project/save_project_info_command.lua

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,19 @@ local function ModInfoSave(path)
141141
end
142142

143143
local function MapInfoSave(name, path)
144-
local mapInfo = [[
145-
local mapinfo = {
146-
name = "$NAME",
147-
version = "1.0",
148-
description = "",
149-
modtype = 3,
150-
depend = {
151-
"cursors.sdz",
144+
local mapInfoTable = {
145+
name = name,
146+
version = "1.0",
147+
description = "",
148+
modtype = 3,
149+
teams = ExportMapInfoCommand.GetTeams(),
150+
depend = {
151+
"cursors.sdz",
152+
}
152153
}
153-
}
154-
155-
return mapinfo
156-
]]
157-
mapInfo = mapInfo:gsub("$NAME", name)
154+
local mapInfoStr = table.show(mapInfoTable)
158155
local mapInfoFile = assert(io.open(path, "w"))
159-
mapInfoFile:write(mapInfo)
156+
mapInfoFile:write(mapInfoStr)
160157
mapInfoFile:close()
161158
end
162159

0 commit comments

Comments
 (0)