Disabled the gold freeze
This commit is contained in:
@@ -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
@@ -477,11 +477,12 @@ const runGoldTick = (connection) => {
|
|||||||
connection.query(query, (err, results) => {
|
connection.query(query, (err, results) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|
||||||
|
//TODO: automatic "drain mode"
|
||||||
|
|
||||||
//determine the correct tick rate based on the current gold average
|
//determine the correct tick rate based on the current gold average
|
||||||
let tickRate = (() => {
|
let tickRate = (() => {
|
||||||
return -60; //TMP: semi-freeze the tick rate
|
if (results[0].goldAverage < 120) return 10;
|
||||||
if (results[0].goldAverage < 120) return 5;
|
if (results[0].goldAverage < 130) return 20;
|
||||||
if (results[0].goldAverage < 130) return 15;
|
|
||||||
if (results[0].goldAverage < 140) return 30;
|
if (results[0].goldAverage < 140) return 30;
|
||||||
return 60; //slow it way down
|
return 60; //slow it way down
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -18,9 +18,8 @@ const statisticsRequest = (connection) => (req, res) => {
|
|||||||
//determine the correct tick rate based on the current gold average
|
//determine the correct tick rate based on the current gold average
|
||||||
//NOTE: copy/pasted
|
//NOTE: copy/pasted
|
||||||
let tickRate = (() => {
|
let tickRate = (() => {
|
||||||
return -60; //TMP: semi-freeze the tick rate
|
if (results[0].goldAverage < 120) return 10;
|
||||||
if (results[0].goldAverage < 120) return 5;
|
if (results[0].goldAverage < 130) return 20;
|
||||||
if (results[0].goldAverage < 130) return 15;
|
|
||||||
if (results[0].goldAverage < 140) return 30;
|
if (results[0].goldAverage < 140) return 30;
|
||||||
return 60; //slow it way down
|
return 60; //slow it way down
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user