diff --git a/mods/character-select-coop/main.lua b/mods/character-select-coop/main.lua index a5ae757fb..6867467b9 100644 --- a/mods/character-select-coop/main.lua +++ b/mods/character-select-coop/main.lua @@ -466,7 +466,10 @@ end local function boot_note() if #characterTable > 1 then - djui_chat_message_create("Character Select has " .. (#characterTable - 1) .. " character" .. (#characterTable > 2 and "s" or "") .. " available!\nYou can use \\#ffff33\\/char-select \\#ffffff\\to open the menu!") + djui_chat_message_create("Character Select has " .. (#characterTable - 1) .. " character" .. (#characterTable > 2 and "s" or "") .." available!\nYou can use \\#ffff33\\/char-select \\#ffffff\\to open the menu!") + if #characterTable > 32 and network_is_server() then + djui_chat_message_create("\\#FFAAAA\\Warning: Having more than 32 Characters\nmay be unstable, For a better experience please\ndisable a few packs!") + end else djui_chat_message_create("Character Select is active!\nYou can use \\#ffff33\\/char-select \\#ffffff\\to open the menu!") end diff --git a/mods/character-select-coop/z-voice.lua b/mods/character-select-coop/z-voice.lua index cdc283a43..1b185fe78 100644 --- a/mods/character-select-coop/z-voice.lua +++ b/mods/character-select-coop/z-voice.lua @@ -77,9 +77,14 @@ for i = 0, MAX_PLAYERS - 1 do playerSample[i] = nil end +local joinSoundPlayed = false --- @param m MarioState --- @param sound CharacterSound local function custom_character_sound(m, sound) + if not joinSoundPlayed then + joinSoundPlayed = true + return NO_SOUND + end local index = m.playerIndex if check_sound_exists(playerSample[index]) and type(playerSample[index]) ~= TYPE_STRING then audio_sample_stop(playerSample[index]) @@ -199,4 +204,17 @@ local function config_character_sounds() hook_event(HOOK_CHARACTER_SOUND, custom_character_sound) hook_event(HOOK_MARIO_UPDATE, custom_character_snore) end -_G.charSelect.config_character_sounds = config_character_sounds \ No newline at end of file +_G.charSelect.config_character_sounds = config_character_sounds + +-- Join sound +local stallTimer = 0 +local function mario_update(m) + if m.playerIndex ~= 0 then return end + if stallTimer == 3 then + play_character_sound(m, CHAR_SOUND_OKEY_DOKEY) + stallTimer = stallTimer + 1 + elseif stallTimer < 10 then + stallTimer = stallTimer + 1 + end +end +hook_event(HOOK_MARIO_UPDATE, mario_update) \ No newline at end of file