Initiated update-mechanic, minor fixes

This commit is contained in:
2025-06-20 18:06:57 +02:00
parent caa4142aa7
commit 2ac79b66db
6 changed files with 978 additions and 868 deletions

12
state.php Normal file
View File

@ -0,0 +1,12 @@
<?php
define('THOS_STATE_FILE', '/home/surillya/.thos_state.json');
function thos_load_state() {
if (!file_exists(THOS_STATE_FILE)) return null;
return json_decode(file_get_contents(THOS_STATE_FILE), true);
}
function thos_save_state($data) {
file_put_contents(THOS_STATE_FILE, json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
}
?>