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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user