Sfoglia il codice sorgente

plan: switch to sum_traded_7d / 7

raylu 2 giorni fa
parent
commit
568f869ca1
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      ts/plan.ts

+ 2 - 2
ts/plan.ts

@@ -65,7 +65,7 @@ async function _render(shareUUID: string, cx: string) {
 	const buildingExpertise = new Map<string, Expertise>(buildings.map(b => [b.building_ticker, b.expertise]));
 	const recipes = new Map<string, Recipe>(recipeList.map(r => [r.recipe_id, r]));
 	const dailyTraded = new Map<string, number>(exchanges.filter((ex) => ex.exchange_code === cx)
-			.map((ex) => [ex.ticker, ex.avg_traded_7d]));
+			.map((ex) => [ex.ticker, ex.sum_traded_7d / 7]));
 
 	const planInput = new Counter();
 	const planOutput = new Counter();
@@ -202,7 +202,7 @@ interface Recipe {
 interface Exchange {
 	ticker: string
 	exchange_code: string
-	avg_traded_7d: number
+	sum_traded_7d: number // avg_traded_7d is nonsense
 }
 
 interface Planet {