Skip to content

Instantly share code, notes, and snippets.

@chunkof
Created December 13, 2015 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chunkof/a650fb4d00cae7194631 to your computer and use it in GitHub Desktop.
Save chunkof/a650fb4d00cae7194631 to your computer and use it in GitHub Desktop.
//=============================================================================
// chunkof_SaveControl.js
//=============================================================================
(function() {
DataManager.isThisGameFile = function(savefileId) {
var savefile = this.loadSavefileInfo(savefileId);
if (!savefile) {
return false;
}
if (StorageManager.isLocalMode()) {
return true;
}
var CHECK_CHAR_NUM = 2; // タイトルを先頭何文字までチェックするか
return (savefile.globalId === this._globalId &&
savefile.title.substr(0,CHECK_CHAR_NUM) === $dataSystem.gameTitle.substr(0,CHECK_CHAR_NUM));
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment