diff --git a/src/update.ts b/src/update.ts index 437e8a1..055a3f0 100644 --- a/src/update.ts +++ b/src/update.ts @@ -30,6 +30,9 @@ export default function update(timestamp: number) { if (V.resources[resource] > storage[resource]) { V.resources[resource] = storage[resource]; } + else if (V.resources[resource] < 0) { + V.resources[resource] = 0; + } }); return V;