Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
irbizzelus authored Nov 7, 2022
1 parent b2e5035 commit 060b255
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 33 deletions.
2 changes: 1 addition & 1 deletion main.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<mod name="Music Volume Mixer" author="irbizzelus" color="Color(0.85,0,0.85)">
<AssetUpdates id="irbizzelus/Music-Volume-Mixer" provider="github" release="true" version="1.0.1"/>
<AssetUpdates id="irbizzelus/Music-Volume-Mixer" provider="github" release="true" version="1.0.2"/>
</mod>
34 changes: 18 additions & 16 deletions menus/VolumeMixerByirbimenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,24 @@ Hooks:Add('MenuManagerInitialize', 'VolumeMixerByirbi_init', function(menu_manag
end
end
else
if Global.music_manager.current_track == "stop_all_music" then
local CE = Global.music_manager.current_event
local switches = tweak_data.levels:get_music_switches()
if switches then -- fml stealth only heists are stupid
local selected_track = switches[math.random(1,#switches)]
managers.music:track_listen_start(CE, selected_track)
managers.music:post_event(selected_track)
managers.music:post_event(CE)
managers.music._skip_play = nil
Global.music_manager.current_track = selected_track
if VolumeMixerByirbi.settings.fullmute == true then
managers.user:set_setting("music_volume", 0)
elseif VolumeMixerByirbi.settings.tracks_data[selected_track.."_toggle"] == true then
managers.user:set_setting("music_volume", VolumeMixerByirbi.settings.tracks_data[selected_track.."_volume"])
else
managers.user:set_setting("music_volume", VolumeMixerByirbi.settings.defaultvolume)
if Global.music_manager.current_event ~= managers.music:jukebox_menu_track("loadout") then
if Global.music_manager.current_track == "stop_all_music" then
local CE = Global.music_manager.current_event
local switches = tweak_data.levels:get_music_switches()
if switches then -- fml stealth only heists are stupid
local selected_track = switches[math.random(1,#switches)]
managers.music:track_listen_start(CE, selected_track)
managers.music:post_event(selected_track)
managers.music:post_event(CE)
managers.music._skip_play = nil
Global.music_manager.current_track = selected_track
if VolumeMixerByirbi.settings.fullmute == true then
managers.user:set_setting("music_volume", 0)
elseif VolumeMixerByirbi.settings.tracks_data[selected_track.."_toggle"] == true then
managers.user:set_setting("music_volume", VolumeMixerByirbi.settings.tracks_data[selected_track.."_volume"])
else
managers.user:set_setting("music_volume", VolumeMixerByirbi.settings.defaultvolume)
end
end
end
end
Expand Down
5 changes: 0 additions & 5 deletions menus/lang/VolumeMixerByirbimenu_chs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"VMBI_title": "Music volume mixer",
"VMBI_desc": "统一音轨音量以保护你的耳朵免于被高音弄得瞬间爆炸",
"VMBI_empty": "",
"VMBI_track_header_desc": "你可以按下这个按钮开始/停止这个音轨",
"VMBI_fullmute": "静音全部音轨",
"VMBI_fullmute_desc": "把所有界面的音轨音量设置为0",
"VMBI_menus_title": "菜单音轨",
"VMBI_ingame_title": "劫案音轨",
"VMBI_ghosts_title": "潜入音轨",
"VMBI_track_toggle": "启用独立音量设置",
"VMBI_track_toggle_desc": "为这个音轨启用独立的音量设置",
"VMBI_track_volume": "音量",
"VMBI_locked_track_desc": "此音轨不可用。 请购买相关DLC以启用。",
"VMBI_menutracks_multichoice_desc": "选择任一菜单音轨以调整其音量或播放",
"VMBI_gametracks_multichoice_desc": "选择任一劫案音轨以调整其音量或播放",
"VMBI_ghosttracks_multichoice_desc": "选择任一潜入音轨以调整其音量或播放",
Expand Down
5 changes: 0 additions & 5 deletions menus/lang/VolumeMixerByirbimenu_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"VMBI_title": "Music volume mixer",
"VMBI_desc": "",
"VMBI_empty": "",
"VMBI_track_header_desc": "You can press this button to play/stop this music track.",
"VMBI_fullmute": "Mute all music",
"VMBI_fullmute_desc": "Change music volume to 0 in every menu.",
"VMBI_menus_title": "Menu tracks",
"VMBI_ingame_title": "Heist tracks",
"VMBI_ghosts_title": "Stealth tracks",
"VMBI_track_toggle": "Enabe custom volume",
"VMBI_track_toggle_desc": "Enabe custom volume for this track.",
"VMBI_track_volume": "Volume",
"VMBI_locked_track_desc": "This track is locked. Purchase corresponding dlc to customize it.",
"VMBI_menutracks_multichoice_desc": "Choose any menu track to adjust volume for or to start playing it.",
"VMBI_gametracks_multichoice_desc": "Choose any heist track to adjust volume for or to start playing it.",
"VMBI_ghosttracks_multichoice_desc": "Choose any stealth track to adjust volume for or to start playing it.",
Expand Down
5 changes: 0 additions & 5 deletions menus/lang/VolumeMixerByirbimenu_ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"VMBI_title": "Миксер громкости",
"VMBI_desc": "",
"VMBI_empty": "",
"VMBI_track_header_desc": "Нажмите на эту кнопку чтобы воспроизвести/остановить этот трек.",
"VMBI_fullmute": "Выключить всю музыку",
"VMBI_fullmute_desc": "Сменить громкость музыки во всех меню на 0.",
"VMBI_menus_title": "треки меню",
"VMBI_ingame_title": "треки ограблений",
"VMBI_ghosts_title": "треки стелсовых ограблений",
"VMBI_track_toggle": "Включить свою громкость",
"VMBI_track_toggle_desc": "Включить кастомную громкость для этого трека.",
"VMBI_track_volume": "Громкость",
"VMBI_locked_track_desc": "Этот трек вам недоступен. Купите соответствующее дополнение чтобы его кастомизировать.",
"VMBI_menutracks_multichoice_desc": "Выберите любой трек из меню чтобы настроить его громкость.",
"VMBI_gametracks_multichoice_desc": "Выберите любой трек для ограблений чтобы настроить его громкость.",
"VMBI_ghosttracks_multichoice_desc": "Выберите любой трек из стелсовых ограблений чтобы настроить его громкость.",
Expand Down
2 changes: 1 addition & 1 deletion mod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description" : "Allows you to set custom volume to any musical track, or to play them whenever you want.",
"author" : "irbizzelus",
"contact" : "Steam profile link is on my modworkshop account",
"version" : "1.0.1",
"version" : "1.0.2",
"hooks" : [
{ "hook_id": "lib/managers/menumanager", "script_path": "menus/VolumeMixerByirbimenu.lua"},
{ "hook_id": "lib/managers/musicmanager", "script_path": "lua/musicmanager.lua"},
Expand Down

0 comments on commit 060b255

Please sign in to comment.