tas录像在录像列表会有标记
This commit is contained in:
@@ -366,6 +366,7 @@ do--function DATA.saveReplay()
|
|||||||
seed=GAME.seed,
|
seed=GAME.seed,
|
||||||
setting=GAME.setting,
|
setting=GAME.setting,
|
||||||
mod=getModList(),
|
mod=getModList(),
|
||||||
|
tasUsed=GAME.tasUsed,
|
||||||
}.."\n"..
|
}.."\n"..
|
||||||
DATA.dumpRecording(GAME.rep)
|
DATA.dumpRecording(GAME.rep)
|
||||||
)
|
)
|
||||||
@@ -414,6 +415,7 @@ function DATA.parseReplayData(fileName,fileData,ifFull)
|
|||||||
seed=metaData.seed,
|
seed=metaData.seed,
|
||||||
setting=metaData.setting,
|
setting=metaData.setting,
|
||||||
mod=metaData.mod,
|
mod=metaData.mod,
|
||||||
|
tasUsed=metaData.tasUsed,
|
||||||
}
|
}
|
||||||
if ifFull then rep.data=fileData end
|
if ifFull then rep.data=fileData end
|
||||||
do return rep end
|
do return rep end
|
||||||
|
|||||||
@@ -480,7 +480,6 @@ do--function resetGameData(args)
|
|||||||
if not args then args=""end
|
if not args then args=""end
|
||||||
trySave()
|
trySave()
|
||||||
|
|
||||||
GAME.tasUsed=false
|
|
||||||
GAME.result=false
|
GAME.result=false
|
||||||
GAME.rank=0
|
GAME.rank=0
|
||||||
GAME.warnLVL0=0
|
GAME.warnLVL0=0
|
||||||
@@ -496,6 +495,7 @@ do--function resetGameData(args)
|
|||||||
GAME.pauseCount=0
|
GAME.pauseCount=0
|
||||||
GAME.saved=false
|
GAME.saved=false
|
||||||
GAME.setting=copyGameSetting()
|
GAME.setting=copyGameSetting()
|
||||||
|
GAME.tasUsed=false
|
||||||
GAME.rep={}
|
GAME.rep={}
|
||||||
GAME.recording=true
|
GAME.recording=true
|
||||||
GAME.statSaved=false
|
GAME.statSaved=false
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ local listBox=WIDGET.newListBox{name="list",x=50,y=50,w=1200,h=520,lineH=40,draw
|
|||||||
setFont(30)
|
setFont(30)
|
||||||
gc_setColor(.8,.8,.8)
|
gc_setColor(.8,.8,.8)
|
||||||
gc_print(id,10,-2)
|
gc_print(id,10,-2)
|
||||||
|
if rep.tasUsed then
|
||||||
|
gc_setColor(COLOR.R)
|
||||||
|
gc_print("TAS",680,-2)
|
||||||
|
end
|
||||||
|
|
||||||
if rep.available then
|
if rep.available then
|
||||||
gc_setColor(.9,.9,1)
|
gc_setColor(.9,.9,1)
|
||||||
@@ -25,7 +29,7 @@ local listBox=WIDGET.newListBox{name="list",x=50,y=50,w=1200,h=520,lineH=40,draw
|
|||||||
gc_print(rep.date,80,6)
|
gc_print(rep.date,80,6)
|
||||||
gc_setColor(1,.4,.4,.6)
|
gc_setColor(1,.4,.4,.6)
|
||||||
gc_printf(rep.version,0,6,1190,'right')
|
gc_printf(rep.version,0,6,1190,'right')
|
||||||
gc_setColor(1,1,1)
|
gc_setColor(COLOR.Z)
|
||||||
gc_printf(rep.player,0,6,960,'right')
|
gc_printf(rep.player,0,6,960,'right')
|
||||||
else
|
else
|
||||||
gc_setColor(.6,.6,.6)
|
gc_setColor(.6,.6,.6)
|
||||||
@@ -37,7 +41,7 @@ local scene={}
|
|||||||
|
|
||||||
local sure
|
local sure
|
||||||
|
|
||||||
local function replay(fileName)
|
local function playRep(fileName)
|
||||||
local rep=DATA.parseReplay(fileName,true)
|
local rep=DATA.parseReplay(fileName,true)
|
||||||
if not rep.available then
|
if not rep.available then
|
||||||
MES.new('error',text.replayBroken)
|
MES.new('error',text.replayBroken)
|
||||||
@@ -59,6 +63,7 @@ local function replay(fileName)
|
|||||||
GAME.init=false
|
GAME.init=false
|
||||||
GAME.saved=true
|
GAME.saved=true
|
||||||
GAME.fromRepMenu=true
|
GAME.fromRepMenu=true
|
||||||
|
GAME.tasUsed=rep.tasUsed
|
||||||
else
|
else
|
||||||
MES.new('error',("No mode id: [%s]"):format(rep.mode))
|
MES.new('error',("No mode id: [%s]"):format(rep.mode))
|
||||||
end
|
end
|
||||||
@@ -77,7 +82,7 @@ function scene.keyDown(key)
|
|||||||
if key=="return"then
|
if key=="return"then
|
||||||
local rep=listBox:getSel()
|
local rep=listBox:getSel()
|
||||||
if rep then
|
if rep then
|
||||||
replay(rep.fileName)
|
playRep(rep.fileName)
|
||||||
end
|
end
|
||||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||||
local rep=listBox:getSel()
|
local rep=listBox:getSel()
|
||||||
|
|||||||
Reference in New Issue
Block a user