Merge pull request 'fix: clamp negative resources + add tutorial focus trap' (#220) from sprint/issue-resource-clamp-focus-trap into main
Some checks failed
Smoke Test / smoke (push) Has been cancelled
Some checks failed
Smoke Test / smoke (push) Has been cancelled
This commit was merged in pull request #220.
This commit is contained in:
@@ -142,6 +142,11 @@ function tick() {
|
||||
G.harmony += G.harmonyRate * dt;
|
||||
G.harmony = Math.max(0, Math.min(100, G.harmony));
|
||||
|
||||
// Clamp resources to prevent negative values from debuffs/Fenrir drain
|
||||
G.ops = Math.max(0, G.ops);
|
||||
G.trust = Math.max(0, G.trust);
|
||||
G.compute = Math.max(0, G.compute);
|
||||
|
||||
// Track totals
|
||||
G.totalCode += G.codeRate * dt;
|
||||
G.totalCompute += G.computeRate * dt;
|
||||
|
||||
Reference in New Issue
Block a user