Skip to content

Commit 2aeff73

Browse files
committed
temporary workaround
1 parent aa822d2 commit 2aeff73

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

scen_edit/command/project/save_project_info_command.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function SaveCommand.GenerateScript()
6161
-- we ignore SB's teamIDs and make sure they make a no-gap array
6262
local teamIDCount = 1
6363
for _, team in pairs(SB.model.teamManager:getAllTeams()) do
64-
if not team.gaia then
64+
if not team.gaia and #players + #ais < 2 then
6565
local t = {
6666
-- TeamID = team.id, ID is implicit as index-1
6767
teamLeader = 0,
@@ -87,11 +87,10 @@ function SaveCommand.GenerateScript()
8787
host = 0,
8888
})
8989
else
90-
local spectator = true
9190
table.insert(players, {
9291
name = team.name,
9392
team = teamIDCount,
94-
spectator = spectator,
93+
spectator = true,
9594
isFromDemo = true,
9695
})
9796
end
@@ -141,7 +140,7 @@ local function ModInfoSave(path)
141140
end
142141

143142
local function MapInfoSave(name, path)
144-
local mapInfoTable = {
143+
local mapInfo = {
145144
name = name,
146145
version = "1.0",
147146
description = "",
@@ -151,10 +150,9 @@ local function MapInfoSave(name, path)
151150
"cursors.sdz",
152151
}
153152
}
154-
local mapInfoStr = table.show(mapInfoTable)
155-
local mapInfoFile = assert(io.open(path, "w"))
156-
mapInfoFile:write(mapInfoStr)
157-
mapInfoFile:close()
153+
local file = assert(io.open(path, "w"))
154+
file:write(table.show(mapInfo))
155+
file:close()
158156
end
159157

160158
function SaveProjectInfoCommand:execute()

0 commit comments

Comments
 (0)