From 6e3ba97f57399d382ad627d9077f4c8726eb3d00 Mon Sep 17 00:00:00 2001 From: Daniel Asher Resnick Date: Thu, 29 Dec 2022 19:51:35 -0600 Subject: [PATCH] Fixed some code referencing starting starts --- src/lib/data/gold.rb | 3 --- src/lib/data/troll.rb | 4 ---- src/public/js/burning-service.js | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lib/data/gold.rb b/src/lib/data/gold.rb index b98f9dd..ff7ec28 100644 --- a/src/lib/data/gold.rb +++ b/src/lib/data/gold.rb @@ -24,9 +24,6 @@ module Charred file = File.read("data/gold/resources/#{stock}.json") resources[stock] = JSON.parse(file) - file = File.read("data/gold/starting_stat_pts/#{stock}.json") - stat_pts[stock] = JSON.parse(file) - file = File.read("data/gold/stocks/#{stock}.json") stock_objs[stock] = Stock.new(JSON.parse(file)) end diff --git a/src/lib/data/troll.rb b/src/lib/data/troll.rb index 3842318..a98c72d 100644 --- a/src/lib/data/troll.rb +++ b/src/lib/data/troll.rb @@ -22,10 +22,6 @@ module Charred resources = JSON.parse(file) data[:resources]['troll'] = resources - file = File.read("data/troll/starting_stat_pts.json") - stats = JSON.parse(file) - data[:stat_pts]['troll'] = stats - file = File.read("data/troll/stock.json") stock = JSON.parse(file) data[:stock_objs]['troll'] = Stock.new(stock) diff --git a/src/public/js/burning-service.js b/src/public/js/burning-service.js index 819e677..ba306b6 100644 --- a/src/public/js/burning-service.js +++ b/src/public/js/burning-service.js @@ -334,7 +334,7 @@ function BurningDataService($http) { console.log("Loading starting stat points failed: asked to load pts for invalid stock " + stock); return } - myself.startingStatPts[stock] = new StartingStatPoints(myself.stock_objs[stock]); + myself.startingStatPts[stock] = new StartingStatPoints(myself.stock_objs[stock].starting_stats); } /* Load resources from server */