From c0354b250f84d578b609a7f25d71dee7fc24e9ca Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 22 Aug 2023 15:01:03 +0200 Subject: currency, save/load --- resources/js/classes/Trainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'resources/js/classes/Trainer.js') 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; } -- cgit v1.2.3