mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Make use of LazyReloads setting
This commit is contained in:
parent
c1873cdb56
commit
a8449833a5
@ -955,6 +955,18 @@ export function setRow(keyword: string, newLine: string, floor: integer, slot: i
|
|||||||
}
|
}
|
||||||
localStorage.setItem(logs[logKeys.indexOf(keyword)][1], data.slice(0, idx).join("\n") + "\n" + newLine + (data.slice(idx).length == 0 ? "" : "\n") + data.slice(idx).join("\n"));
|
localStorage.setItem(logs[logKeys.indexOf(keyword)][1], data.slice(0, idx).join("\n") + "\n" + newLine + (data.slice(idx).length == 0 ? "" : "\n") + data.slice(idx).join("\n"));
|
||||||
}
|
}
|
||||||
|
export function flagReset(scene: BattleScene, floor: integer = undefined) {
|
||||||
|
if (floor == undefined)
|
||||||
|
floor = scene.currentBattle.waveIndex;
|
||||||
|
if (localStorage.getItem(getLogID(scene)) == null)
|
||||||
|
localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
|
var drpd: DRPD = JSON.parse(localStorage.getItem(getLogID(scene))) as DRPD;
|
||||||
|
drpd = updateLog(drpd);
|
||||||
|
var wv = getWave(drpd, floor, scene)
|
||||||
|
wv.reload = true;
|
||||||
|
console.log(drpd)
|
||||||
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Prints a DRPD as a string, for saving it to your device.
|
* Prints a DRPD as a string, for saving it to your device.
|
||||||
* @param inData The data to add on to.
|
* @param inData The data to add on to.
|
||||||
|
@ -1362,6 +1362,9 @@ export class EncounterPhase extends BattlePhase {
|
|||||||
LoggerTools.logPlayerTeam(this.scene)
|
LoggerTools.logPlayerTeam(this.scene)
|
||||||
}
|
}
|
||||||
LoggerTools.resetWaveActions(this.scene)
|
LoggerTools.resetWaveActions(this.scene)
|
||||||
|
if (this.scene.lazyReloads) {
|
||||||
|
LoggerTools.flagReset(this.scene)
|
||||||
|
}
|
||||||
|
|
||||||
if (this.scene.currentBattle.battleType === BattleType.WILD) {
|
if (this.scene.currentBattle.battleType === BattleType.WILD) {
|
||||||
enemyField.forEach(enemyPokemon => {
|
enemyField.forEach(enemyPokemon => {
|
||||||
|
Loading…
Reference in New Issue
Block a user