From ee1a858023303e9dae2ba1663dacaebdaa4399b1 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 8 Feb 2015 00:40:40 -0500 Subject: [PATCH] Added Pokemon stuff to statistics.js It's not everything, but it's a start. --- GameStartr/StatsHoldr/StatsHoldr.js | 5 ++-- settings/statistics.js | 36 ++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/GameStartr/StatsHoldr/StatsHoldr.js b/GameStartr/StatsHoldr/StatsHoldr.js index 73f25d94..f5256ff8 100644 --- a/GameStartr/StatsHoldr/StatsHoldr.js +++ b/GameStartr/StatsHoldr/StatsHoldr.js @@ -374,7 +374,8 @@ function StatsHoldr(settings) { * Retrieves a Value's value from localStorage, making sure not to try to * JSON.parse an undefined or null value. * - * + * @this {Value} + * @return {Mixed} */ Value.prototype.retrieveLocalStorage = function () { var value = localStorage.getItem(prefix + this.key); @@ -449,8 +450,6 @@ function StatsHoldr(settings) { * Toggles whether a value is 1 or 0. * * @param {String} key The key of the Value. - * @remarks Toggling requires the type to be a Boolean, since true becomes - * "true" becomes NaN. */ self.toggle = function (key) { checkExistence(key); diff --git a/settings/statistics.js b/settings/statistics.js index cb3f55d9..cc3f9ef3 100644 --- a/settings/statistics.js +++ b/settings/statistics.js @@ -1,3 +1,37 @@ FullScreenPokemon.prototype.settings.statistics = { - "prefix": "FullScreenPokemon" + "prefix": "FullScreenPokemon", + "defaults": { + "storeLocally": true + }, + "values": { + "badges": { + "valueDefault": { + "Brock": false, + "Misty": false, + "LtSurge": false, + "Erika": false, + "Koga": false, + "Sabrina": false, + "Blaine": false, + "Giovanni": false + } + }, + "items": { + "valueDefault": [] + }, + "money": { + "valueDefault": 0, + "minimum": 0 + }, + "name": {}, + "Pokedex": { + "valueDefault": [] + }, + "PokemonInParty": { + "valueDefault": [] + }, + "PokemonInPC": { + "valueDefault": [] + } + } }; \ No newline at end of file