Add files via upload
This commit is contained in:
parent
dee66113b3
commit
cf32b4395d
@ -1673,8 +1673,6 @@ control.prototype._doSL_save = function (id) {
|
|||||||
|
|
||||||
control.prototype._doSL_load = function (id, callback) {
|
control.prototype._doSL_load = function (id, callback) {
|
||||||
if (id == 'autoSave' && core.saves.autosave.data != null) {
|
if (id == 'autoSave' && core.saves.autosave.data != null) {
|
||||||
if(core.saves.autosave.now>0)
|
|
||||||
{
|
|
||||||
core.saves.autosave.now=core.saves.autosave.now-1;
|
core.saves.autosave.now=core.saves.autosave.now-1;
|
||||||
var data = core.saves.autosave.data.splice(core.saves.autosave.now,1)[0];
|
var data = core.saves.autosave.data.splice(core.saves.autosave.now,1)[0];
|
||||||
if(core.status.played && !core.status.gameOver)
|
if(core.status.played && !core.status.gameOver)
|
||||||
@ -1684,11 +1682,10 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
}
|
}
|
||||||
if(core.saves.autosave.now==0)
|
if(core.saves.autosave.now==0)
|
||||||
{
|
{
|
||||||
core.saves.autosave.data.unshift(data);
|
core.saves.autosave.data.unshift(core.clone(data));
|
||||||
core.saves.autosave.now=core.saves.autosave.now+1;
|
core.saves.autosave.now=core.saves.autosave.now+1;
|
||||||
}
|
}
|
||||||
callback(id, data);
|
callback(id, data);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.getLocalForage(id=='autoSave'?id:"save"+id, null, function(data) {
|
core.getLocalForage(id=='autoSave'?id:"save"+id, null, function(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user