diff --git a/README.md b/README.md index 4873785..93dce30 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ It includes: * python server source code for LS2009Chat * lua source code for LS2009Chat * lua source code for HideHUD +* lua source code for menuMusicChanger * original + unpacked dataS and decompiled scripts from Traktor Zetor Simulátor * original + unpacked dataS and decompiled scripts from Farming Simulator 2009 Gold * original + unpacked dataS and decompiled scripts from Symulator-Farmy 2009 diff --git a/menuMusicChanger/menuMusicChanger.lua b/menuMusicChanger/menuMusicChanger.lua new file mode 100644 index 0000000..cbe10fc --- /dev/null +++ b/menuMusicChanger/menuMusicChanger.lua @@ -0,0 +1,38 @@ +-- menuMusicChanger.lua +-- @author Richard Gráčik (mailto:r.gracik@gmail.com) +-- @date 8.8.2024 + +print("[musicMenuChanger] Saving and patching original menuMusic functions") +originalLoadStreamedSample = loadStreamedSample + +function patchedLoadStreamedSample() + originalLoadStreamedSample(g_menuMusic, g_modsDirectory .. "/menuMusicChanger/menu.ogg") +end + +_G.loadStreamedSample = patchedLoadStreamedSample + +modClassEventListener = {}; + +function modClassEventListener:loadMap(name) + + print("[musicMenuChanger] Reverting back to the original menuMusic function") + _G.loadStreamedSample = originalLoadStreamedSample + +end; + +function modClassEventListener:deleteMap() +end; + +function modClassEventListener:mouseEvent(posX, posY, isDown, isUp, button) +end; + +function modClassEventListener:keyEvent(unicode, sym, modifier, isDown) +end; + +function modClassEventListener:update(dt) +end; + +function modClassEventListener:draw() +end; + +addModEventListener(modClassEventListener); \ No newline at end of file diff --git a/menuMusicChanger/modDesc.xml b/menuMusicChanger/modDesc.xml new file mode 100644 index 0000000..7444365 --- /dev/null +++ b/menuMusicChanger/modDesc.xml @@ -0,0 +1,9 @@ + + + Morc, Benzinly, GIANTS + 0.2 + + + + + \ No newline at end of file