diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-22 15:01:03 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-22 15:01:03 +0200 |
commit | c0354b250f84d578b609a7f25d71dee7fc24e9ca (patch) | |
tree | af586e0a4c44a2f2c8df956ca3b992be15daaba3 /resources/js/classes | |
parent | 54e5ffaeb79f989463c144e58dfcd677b752c5a9 (diff) |
currency, save/load
Diffstat (limited to 'resources/js/classes')
-rw-r--r-- | resources/js/classes/State.js | 2 | ||||
-rw-r--r-- | resources/js/classes/Trainer.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/resources/js/classes/State.js b/resources/js/classes/State.js index b7e9f5d..9a72a8f 100644 --- a/resources/js/classes/State.js +++ b/resources/js/classes/State.js @@ -5,6 +5,8 @@ class State { */ language: 'en_US', + currency: 'EUR', + colors: { player: '#00ff00', player: '#ff0000', diff --git a/resources/js/classes/Trainer.js b/resources/js/classes/Trainer.js index d63e52d..4f083dc 100644 --- a/resources/js/classes/Trainer.js +++ b/resources/js/classes/Trainer.js @@ -31,7 +31,8 @@ class Trainer { */ constructor (trainerData) { this.#monsters = trainerData.monsters; - this.#inventory = trainerData.inventory || []; + this.#inventory = trainerData.inventory || this.inventory; + this.type = trainerData.type || this.type; this.name = trainerData.name; this.sprite = trainerData.sprite; } |