Upload files to "/"

This commit is contained in:
threememories 2026-05-07 20:45:14 +00:00
parent 3c5347092a
commit 55bb7c37ba
1 changed files with 16 additions and 0 deletions

View File

@ -5495,10 +5495,18 @@ Gamestate.renderInventory = function () {
Gamestate.start = async function () {
// --- NEW: REQUEST FULL SCREEN ON START (MOBILE ONLY) ---
if (window.innerWidth <= 950) {
let elem = document.documentElement;
if (elem.requestFullscreen) { elem.requestFullscreen().catch(e => console.log(e)); }
else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen().catch(e => console.log(e)); }
}
// --- APPLY VISUAL THEME AT GAME START ---
Gamestate.applyUITheme();
// --- NEW: SET INITIAL RADIO TRACK BASED ON THEME ---
const themeDropdown = document.getElementById('chosen-theme');
const selectedTheme = themeDropdown ? themeDropdown.value : "fo3";
@ -12804,7 +12812,15 @@ Gamestate.triggerEncounterCheck = async function (triggerType, territoryName = n
// --- FIX: Tell the function to accept the 'jsonString' we pass from the file button ---
Gamestate.loadGame = async function (jsonString) {
try {
// --- NEW: REQUEST FULL SCREEN ON LOAD (MOBILE ONLY) ---
if (window.innerWidth <= 950) {
let elem = document.documentElement;
if (elem.requestFullscreen) { elem.requestFullscreen().catch(e => console.log(e)); }
else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen().catch(e => console.log(e)); }
}
// 1. Check if we actually received file data
if (!jsonString) {
if (this.showToast) this.showToast("Error: No save data found in file.", "red");
return false;