2025-08-11 04:09:20 +02:00
|
|
|
// This file is used for global shit thats useful for os-gui
|
|
|
|
|
|
2025-08-09 17:22:25 +02:00
|
|
|
function setDisplayURL(newURL) {
|
|
|
|
|
window.history.pushState(null, '', newURL);
|
|
|
|
|
}
|
2025-08-11 04:09:20 +02:00
|
|
|
|
|
|
|
|
var yourFuckingSavefile = {
|
|
|
|
|
debugMode: false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var globalSaveid = 5;
|
|
|
|
|
|
|
|
|
|
function save(saveid) {
|
|
|
|
|
console.log("Saving...");
|
|
|
|
|
const savefile = saveid || 1;
|
|
|
|
|
window.localStorage.setItem("__LAMINAXOS:SAVEFILE_".concat(savefile.toString()),
|
|
|
|
|
JSON.stringify(yourFuckingSavefile));
|
|
|
|
|
console.log("Saved to SAVE#".concat(savefile.toString()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function load(saveid) {
|
|
|
|
|
console.log("Loaded...");
|
|
|
|
|
const savefile = saveid || 1;
|
|
|
|
|
const eee = window.localStorage.getItem("__LAMINAXOS:SAVEFILE_".concat(savefile.toString()));
|
|
|
|
|
if (eee === "undefined") {
|
|
|
|
|
throw new Error(`Key "${key}" not found in localStorage.`);
|
|
|
|
|
}
|
|
|
|
|
yourFuckingSavefile = JSON.parse(
|
|
|
|
|
eee
|
|
|
|
|
)
|
|
|
|
|
console.log("Loaded from SAVE#".concat(savefile.toString()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add stuff that would make David cry
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < 10; i++) {
|
|
|
|
|
console.log("%c" + "Hold Up!", "color: #7289DA; -webkit-text-stroke: 2px black; font-size: 72px; font-weight: bold;");
|
|
|
|
|
console.warn("IF YOU USE THIS CONSOLE YOUR SAVE IS NOT CANON!!");
|
|
|
|
|
console.log("... Also dont edit your savefile like an idiot. Btw its at the var yourFuckingSavefile");
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
load(globalSaveid);
|
|
|
|
|
} catch (eee) {
|
|
|
|
|
console.log(eee);
|
|
|
|
|
save(globalSaveid);
|
|
|
|
|
}
|