Add World Update script

This commit is contained in:
2026-03-19 22:49:22 -04:00
parent 8028668346
commit 6e233dd020

13
scripts/update_world.ts Normal file
View File

@@ -0,0 +1,13 @@
import { readFileSync, writeFileSync } from 'fs';
function updateWorld() {
const state = JSON.parse(readFileSync('world_state.json', 'utf8'));
state.tower.energy = Math.min(100, state.tower.energy + 5);
state.matrix.stability = Math.min(1.0, state.matrix.stability + 0.01);
state.last_updated = new Date().toISOString();
writeFileSync('world_state.json', JSON.stringify(state, null, 2));
console.log('World state updated successfully.');
}
updateWorld();