From ed54d98b631ad0f61b28187dc34bc019319a992d Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Mon, 23 Aug 2021 09:16:45 -0500 Subject: [PATCH] switch target to ES5 --- TODO.md | 6 ++++++ public/index.html | 2 +- src/model/GameState.ts | 7 ++++--- tsconfig.json | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index af2abcd..7068033 100644 --- a/TODO.md +++ b/TODO.md @@ -35,6 +35,9 @@ - higher makes recruitment harder - political influence - affects credibility, needed to enact policies + - global birth/death rates + - religious fanaticism + - affects follower growth/loss - consumable resource type - one-off actions that cost money - ad blitz to improve credibility @@ -44,3 +47,6 @@ - policies - can affect a wide range of stuff - costs political influence to enact and maintain +- inter-religion relationships + - hostility between religiions + - holy wars (affects birth/death rate) diff --git a/public/index.html b/public/index.html index 11da3d2..80ec16e 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ irreligio.us - +
diff --git a/src/model/GameState.ts b/src/model/GameState.ts index d0e0948..cf388a5 100644 --- a/src/model/GameState.ts +++ b/src/model/GameState.ts @@ -112,9 +112,10 @@ class GameState { { value: 1e18, symbol: 'E' } ]; const rx: RegExp = /\.0+$|(\.[0-9]*[1-9])0+$/; - const item: vlookup = - lookup.slice().reverse() - .find((i: vlookup): boolean => num >= i.value); + let item: vlookup; + for (item of lookup.slice().reverse()) { + if (num >= item.value) break; + } return item ? (num / item.value).toFixed(this.numberFormatDigits) .replace(rx, '$1') + item.symbol diff --git a/tsconfig.json b/tsconfig.json index dc50e43..d0e2d28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "ES6", + "target": "ES5", "module": "none" } }