Disabled the gold freeze

This commit is contained in:
2019-06-23 18:00:54 +10:00
parent b667fdb3b8
commit d4da2b6d09
3 changed files with 14 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
Time For A Thaw
---
_23 June 2019_
I've unfrozen the gold tick, since the supply dropped enough to keep it even. This "drain mode" is still coded in, but needs to be activated manually by tweaking the code. For now, that's fine. I've also adjusted the default tick rates to 10, 20, 30 and 60 minutes based on the global gold supply.
As for backend stuff, It's going really well! There's like 1200+ lines that I need to refactor, plus I need to write tests for pretty much everything, so it's going to take a long time. I'm going to power through for the next week in hopes that I can finish it sooner rather than later.
+4 -3
View File
@@ -477,11 +477,12 @@ const runGoldTick = (connection) => {
connection.query(query, (err, results) => {
if (err) throw err;
//TODO: automatic "drain mode"
//determine the correct tick rate based on the current gold average
let tickRate = (() => {
return -60; //TMP: semi-freeze the tick rate
if (results[0].goldAverage < 120) return 5;
if (results[0].goldAverage < 130) return 15;
if (results[0].goldAverage < 120) return 10;
if (results[0].goldAverage < 130) return 20;
if (results[0].goldAverage < 140) return 30;
return 60; //slow it way down
})();
+2 -3
View File
@@ -18,9 +18,8 @@ const statisticsRequest = (connection) => (req, res) => {
//determine the correct tick rate based on the current gold average
//NOTE: copy/pasted
let tickRate = (() => {
return -60; //TMP: semi-freeze the tick rate
if (results[0].goldAverage < 120) return 5;
if (results[0].goldAverage < 130) return 15;
if (results[0].goldAverage < 120) return 10;
if (results[0].goldAverage < 130) return 20;
if (results[0].goldAverage < 140) return 30;
return 60; //slow it way down
})();