From 8663efccf7432e71f8eaa646c2d1d2988e0f5ce7 Mon Sep 17 00:00:00 2001 From: hppeng Date: Fri, 1 Jul 2022 01:35:20 -0700 Subject: [PATCH] HOTFIX: fix computeNode bad behavior with markDirty was always doing dusty update --- js/builder_graph.js | 1 - js/computation_graph.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/builder_graph.js b/js/builder_graph.js index cff072a..325694a 100644 --- a/js/builder_graph.js +++ b/js/builder_graph.js @@ -441,7 +441,6 @@ class PlayerClassNode extends ValueCheckComputeNode { compute_func(input_map) { if (input_map.size !== 1) { throw "PlayerClassNode accepts exactly one input (build)"; } const [build] = input_map.values(); // Extract values, pattern match it into size one list and bind to first element - return wep_to_class.get(build.weapon.statMap.get('type')); } } diff --git a/js/computation_graph.js b/js/computation_graph.js index bf45564..1f13851 100644 --- a/js/computation_graph.js +++ b/js/computation_graph.js @@ -151,7 +151,7 @@ class ValueCheckComputeNode extends ComputeNode { } let val = this.compute_func(calc_inputs); if (val !== this.value) { - this.mark_dirty(2); + super.mark_dirty(2); } else { console.log("soft update");