Commented out networking functionality
This commit is contained in:
parent
4e94621da4
commit
ba44238f8f
|
@ -571,8 +571,12 @@ export class GameData {
|
||||||
|
|
||||||
public async getRunHistoryData(scene: BattleScene): Promise<Object> {
|
public async getRunHistoryData(scene: BattleScene): Promise<Object> {
|
||||||
if (!Utils.isLocal) {
|
if (!Utils.isLocal) {
|
||||||
|
/**
|
||||||
|
* Networking Code
|
||||||
|
*
|
||||||
const response = await Utils.apiFetch("savedata/runHistory", true);
|
const response = await Utils.apiFetch("savedata/runHistory", true);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
*/
|
||||||
if (localStorage.hasOwnProperty(`runHistoryData_${loggedInUser.username}`)) {
|
if (localStorage.hasOwnProperty(`runHistoryData_${loggedInUser.username}`)) {
|
||||||
let cachedResponse = localStorage.getItem(`runHistoryData_${loggedInUser.username}`);
|
let cachedResponse = localStorage.getItem(`runHistoryData_${loggedInUser.username}`);
|
||||||
if (cachedResponse) {
|
if (cachedResponse) {
|
||||||
|
@ -622,6 +626,9 @@ export class GameData {
|
||||||
|
|
||||||
localStorage.setItem(`runHistoryData_${loggedInUser.username}`, encrypt(JSON.stringify(runHistoryData), true));
|
localStorage.setItem(`runHistoryData_${loggedInUser.username}`, encrypt(JSON.stringify(runHistoryData), true));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Networking Code
|
||||||
|
*
|
||||||
if (!Utils.isLocal) {
|
if (!Utils.isLocal) {
|
||||||
try {
|
try {
|
||||||
Utils.apiPost("savedata/runHistory", JSON.stringify(runHistoryData), undefined, true);
|
Utils.apiPost("savedata/runHistory", JSON.stringify(runHistoryData), undefined, true);
|
||||||
|
@ -631,6 +638,7 @@ export class GameData {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
parseSystemData(dataStr: string): SystemSaveData {
|
parseSystemData(dataStr: string): SystemSaveData {
|
||||||
|
|
Loading…
Reference in New Issue