Fix updator.bat casing bug, swap update-alert sound for a popup

updator.bat's assume-unchanged step compared "cosmic rage\worlds\cosmic
rage\cosmic rage.mcl" against git's actual tracked casing
(worlds\Cosmic Rage\cosmic rage.MCL) - git's index is case-sensitive
even on a case-insensitive filesystem, so `if exist` found the file
fine but `git update-index --assume-unchanged` couldn't match it,
producing the "Could not mark ... as assume-unchanged" warning. Fixed
the casing.

Also replaced the full-volume (100) announcement.ogg alert on an
outdated soundpack with a utils.msgbox popup - it was startling people
with no way to turn it down. Bonus: a native Windows dialog gets read
by screen readers automatically, which is arguably better for
accessibility than an unskippable sound cue anyway.
This commit is contained in:
OlegTheSnowman
2026-07-11 01:00:05 +03:00
parent d3b58283dd
commit e38ab9e463
2 changed files with 8 additions and 2 deletions

View File

@@ -115,7 +115,13 @@ Note("You are currently running version " .. tostring(CURRENT_SP_VERSION).." of
if version_diff > 0 then
ColourNote("yellow", "", "Warning: Your soundpack is " .. version_diff .. " version(s) out of date. We are now on version " .. user_version .. " of the soundpack.")
ColourNote("yellow", "", "Launching the updater...")
ppi.play(dir.."sounds/ogg/general/comms/announcement.ogg", 0, 0, 100)
-- A popup instead of an audio alert here - the announcement sound
-- played at full volume (100) with no way to tune it down, which
-- startled people. This only fires once per outdated connect, so a
-- blocking dialog is fine.
utils.msgbox(
"Your soundpack is " .. version_diff .. " version(s) out of date.\n\nThe updater will now launch in a separate window. Once it finishes, restart MUSHclient to apply the update.",
"Soundpack update available", "ok", "!")
-- dir is the world's own folder (cosmic rage\worlds\Cosmic Rage\);
-- updator.bat lives at the repo root, three levels up from there.
local bat_path = dir .. "..\\..\\..\\updator.bat"

View File

@@ -38,7 +38,7 @@ if %errorlevel%==0 (
)
:: --------- Mark user-specific files as 'assume unchanged' ---------
set "MCL_FILE=cosmic rage\worlds\cosmic rage\cosmic rage.mcl"
set "MCL_FILE=cosmic rage\worlds\Cosmic Rage\cosmic rage.MCL"
if exist "%MAIN_REPO_DIR%\%MCL_FILE%" (
%GIT_CMD% -C "%MAIN_REPO_DIR%" update-index --assume-unchanged "%MCL_FILE%"
echo [%DATE% %TIME%] Marked %MCL_FILE% as assume-unchanged. >> "%LOG_FILE%"