rpjs/engine/game.js
/**
     * Restores data persisted to the players save slot to the main
     * data for this game.  Returns FALSE if there is no data (then you
     * should create default data.)
     */
Restores data persisted to the players save slot to the main
data for this game.  Returns FALSE if there is no data (then you
should create default data.)
Restores data persisted to the players save slot to the main data for this game . Returns FALSE if there is no data ( then you should create default data . )
restorePersistedData()
    {
        let item=window.localStorage.getItem(this.getSaveSlotName('saveSlot'));
        if (item===null) return(false);
        if (this.urlParams.get('eraseSlot')!==null) {
            window.localStorage.removeItem(this.getSaveSlotName('eraseSlot'));
            return(false);
        }
        this.data=new Map(JSON.parse(item));
        return(true);
    }
restorePersistedData ( ) { let item = window . localStorage . getItem ( this . getSaveSlotName ( 'saveSlot' ) ) ; if ( item === null ) return ( false ) ; if ( this . urlParams . get ( 'eraseSlot' ) !== null ) { window . localStorage . removeItem ( this . getSaveSlotName ( 'eraseSlot' ) ) ; return ( false ) ; } this . data = new Map ( JSON . parse ( item ) ) ; return ( true ) ; }
Restores data persisted to the players save slot to the main
 data for this game.
Restores data persisted to the players save slot to the main data for this game .
// if the clear save spot is on, never load // any data and erase any save // otherwise reload the data