File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
scen_edit/command/project Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff 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)
141140end
142141
143142local 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 ()
158156end
159157
160158function SaveProjectInfoCommand :execute ()
You can’t perform that action at this time.
0 commit comments