From 7315be6be17e12526502b107ad2fdbfd216dd0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 7 Dec 2017 00:51:25 +0100 Subject: [PATCH] Fixed shop buying/selling not working --- TODO.md | 1 - src/core/Shop.ts | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 5638ebf..11533b4 100644 --- a/TODO.md +++ b/TODO.md @@ -13,7 +13,6 @@ Map/story --------- * Add sound effects and more visual effects (jumps...) -* Fix quickly zooming in twice preventing to display some UI parts * Add factions and reputation * Allow to cancel secondary missions * Forbid to end up with more than 5 ships in the fleet because of escorts diff --git a/src/core/Shop.ts b/src/core/Shop.ts index 02f8872..44cdb53 100644 --- a/src/core/Shop.ts +++ b/src/core/Shop.ts @@ -31,6 +31,11 @@ module TK.SpaceTac { this.onchange = onchange || (stock => stock); } + postUnserialize() { + // functions are not serializable + this.onchange = (stock => stock); + } + /** * Get available stock to display (sorted by level then price by default) */