回放录像包含设置数据
This commit is contained in:
@@ -6,6 +6,25 @@ local sub,find=string.sub,string.find
|
|||||||
local char,byte=string.char,string.byte
|
local char,byte=string.char,string.byte
|
||||||
local ins,rem=table.insert,table.remove
|
local ins,rem=table.insert,table.remove
|
||||||
|
|
||||||
|
local default_setting={
|
||||||
|
"das","arr",
|
||||||
|
"sddas","sdarr",
|
||||||
|
"ihs","irs","ims",
|
||||||
|
"maxNext",
|
||||||
|
"swap",
|
||||||
|
-- "face",
|
||||||
|
}
|
||||||
|
local function copyGameSetting()
|
||||||
|
local S={face={}}
|
||||||
|
for _,v in next,default_setting do
|
||||||
|
S[v]=setting[v]
|
||||||
|
end
|
||||||
|
for i=1,25 do
|
||||||
|
S.face[i]=setting.face[i]
|
||||||
|
end
|
||||||
|
return S
|
||||||
|
end
|
||||||
|
|
||||||
function destroyPlayers()
|
function destroyPlayers()
|
||||||
for i=#players,1,-1 do
|
for i=#players,1,-1 do
|
||||||
local P=players[i]
|
local P=players[i]
|
||||||
@@ -282,6 +301,7 @@ function resetGameData()
|
|||||||
game.warnLVL=0
|
game.warnLVL=0
|
||||||
game.recording=true
|
game.recording=true
|
||||||
game.replaying=false
|
game.replaying=false
|
||||||
|
game.setting=copyGameSetting()
|
||||||
game.rec={}
|
game.rec={}
|
||||||
math.randomseed(tm.getTime())
|
math.randomseed(tm.getTime())
|
||||||
game.seed=rnd(261046101471026)
|
game.seed=rnd(261046101471026)
|
||||||
@@ -333,6 +353,7 @@ function resetPartGameData(replaying)
|
|||||||
game.pauseCount=0
|
game.pauseCount=0
|
||||||
game.recording=true
|
game.recording=true
|
||||||
game.replaying=false
|
game.replaying=false
|
||||||
|
game.setting=copyGameSetting()
|
||||||
game.rec={}
|
game.rec={}
|
||||||
math.randomseed(tm.getTime())
|
math.randomseed(tm.getTime())
|
||||||
game.seed=rnd(1046101471,2662622626)
|
game.seed=rnd(1046101471,2662622626)
|
||||||
|
|||||||
@@ -2577,11 +2577,13 @@ local function loadGameEnv(P)--Load gameEnv
|
|||||||
--Load game settings
|
--Load game settings
|
||||||
for k,v in next,gameEnv0 do
|
for k,v in next,gameEnv0 do
|
||||||
if modeEnv[k]~=nil then
|
if modeEnv[k]~=nil then
|
||||||
v=modeEnv[k]
|
v=modeEnv[k] --Mode setting
|
||||||
|
elseif game.setting[k]~=nil then
|
||||||
|
v=game.setting[k] --Game setting
|
||||||
elseif setting[k]~=nil then
|
elseif setting[k]~=nil then
|
||||||
v=setting[k]
|
v=setting[k] --Global setting
|
||||||
end
|
end
|
||||||
ENV[k]=v
|
ENV[k]=v --Default setting
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function applyGameEnv(P)--Finish gameEnv processing
|
local function applyGameEnv(P)--Finish gameEnv processing
|
||||||
|
|||||||
Reference in New Issue
Block a user