mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Update CS
This commit is contained in:
parent
261dfe0d76
commit
3fad60f725
2 changed files with 23 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
@ -200,3 +205,16 @@ local function config_character_sounds()
|
|||
hook_event(HOOK_MARIO_UPDATE, custom_character_snore)
|
||||
end
|
||||
_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)
|
||||
Loading…
Add table
Reference in a new issue