Skip to content

Commit

Permalink
Merge pull request #739 from Javgarag/master
Browse files Browse the repository at this point in the history
Fix custom dialogs not playing
  • Loading branch information
Luffyyy authored Aug 15, 2024
2 parents e51d227 + 4204098 commit ff15405
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Hooks/Maps/Hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,18 @@ elseif F == "gameplaycentralmanager" then
unit_body:set_enabled(not unit_body:enabled())
end
end
----------------------------------------------------------------
elseif F == "dialogmanager" then
Hooks:PreHook(DialogManager, "queue_dialog", "BeardLibQueueDialogFixIds", function(self, id)
if id and not managers.dialog._dialog_list[id] then
local sound = BeardLib.Managers.Sound:GetSound(id)
if sound then
managers.dialog._dialog_list[id] = {
id = id,
sound = id,
priority = sound.priority and tonumber(sound.priority) or tweak_data.dialog.DEFAULT_PRIORITY
}
end
end
end)
end
3 changes: 2 additions & 1 deletion supermod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<post hook_id="lib/managers/mission/elementvehiclespawner"/>
<post hook_id="lib/managers/mission/elementfilter"/>
<post hook_id="core/lib/managers/viewport/environment/coreenvironmentmanager"/>
<post hook_id="lib/managers/dialogmanager"/>
</group>
<group :script_path="NetworkHooks.lua">
<post hook_id="lib/managers/crimenetmanager"/>
Expand Down Expand Up @@ -117,4 +118,4 @@
</group>
</hooks>
<wren scripts-root="Wren" init-file="AssetLoader"/>
</mod>
</mod>

0 comments on commit ff15405

Please sign in to comment.