From 9214ea72039813149b9157c2bece5ba6fbf3c64a Mon Sep 17 00:00:00 2001 From: Hanchin Hsieh Date: Mon, 3 Nov 2025 12:43:17 +0800 Subject: [PATCH] fix(gameplay/menu): hide exit on platform wasm --- .emmyrc.json | 17 +++++++++++++++++ gameplay/startmenu.lua | 7 +++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .emmyrc.json diff --git a/.emmyrc.json b/.emmyrc.json new file mode 100644 index 0000000..15865e5 --- /dev/null +++ b/.emmyrc.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json", + "diagnostics": { + "enable": true, + "disable": [ + "missing-fields" + ] + }, + "runtime": { + "version": "Lua5.5" + }, + "workspace": { + "library": [ + "./soluna/docs" + ] + } +} diff --git a/gameplay/startmenu.lua b/gameplay/startmenu.lua index ed8f100..c2848ce 100644 --- a/gameplay/startmenu.lua +++ b/gameplay/startmenu.lua @@ -3,6 +3,7 @@ local menu = require "gameplay.menu" local setting = require "core.setting" local loadsave = require "core.loadsave" local flow = require "core.flow" +local soluna = require "soluna" global print, print_r @@ -47,6 +48,8 @@ return function() MENU[#MENU+1] = "manual" MENU[#MENU+1] = "credits" - MENU[#MENU+1] = "exit" + if soluna.platform ~= "wasm" then + MENU[#MENU+1] = "exit" + end return menu(MENU) or flow.state.startmenu -end \ No newline at end of file +end