Allowed Dynos to use geo_mario_cap_display_list (#337)

* Allowed Dynos to use geo_mario_cap_display_list

* Fixed [CS] Extra Characters breaking voices in other CS mods
This commit is contained in:
xLuigiGamerx 2024-09-24 03:04:50 +03:00 committed by GitHub
parent 7a9d690305
commit 49be9d159b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View file

@ -1398,6 +1398,7 @@ static const void* sDynosBuiltinFuncs[] = {
define_builtin(geo_movtex_draw_water_regions_ext),
define_builtin(lvl_init_or_update),
define_builtin(geo_choose_area_ext),
define_builtin(geo_mario_cap_display_list),
// Behaviors
define_builtin(bhv_cap_switch_loop),

View file

@ -3,11 +3,19 @@
if not _G.charSelectExists then return end
local voiceTables = {
[VOICETABLE_TOADETTE] = true,
[VOICETABLE_YOSHI] = true,
[VOICETABLE_PEACH] = true,
[VOICETABLE_DAISY] = true,
[VOICETABLE_BIRDO] = true
}
--- @param m MarioState
local function mario_update(m)
if is_player_active(m) == 0 then return end
local voiceTable = charSelect.character_get_voice(m)
if voiceTable then
if voiceTables[voiceTable] then
return charSelect.voice.snore(m)
end
end
@ -16,7 +24,7 @@ end
--- @param sound CharacterSound
local function character_sound(m, sound)
local voiceTable = charSelect.character_get_voice(m)
if voiceTable then
if voiceTables[voiceTable] then
return charSelect.voice.sound(m, sound)
end
end