mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-22 07:32:07 -05:00
Update CS
This commit is contained in:
parent
0a7060ac17
commit
54b2ba17e5
2 changed files with 10 additions and 10 deletions
|
@ -27,7 +27,6 @@ local legacyFiles = {
|
|||
-- Check for Missing Files
|
||||
local missingDependacyFiles = false
|
||||
for i = 1, #dependacyFiles do
|
||||
--log_to_console(dependacyFiles[i] .. " = " .. tostring(mod_file_exists(dependacyFiles[i])))
|
||||
if not mod_file_exists(dependacyFiles[i]) then
|
||||
log_to_console("Character Select file missing: '" .. dependacyFiles[i] .. "'", CONSOLE_MESSAGE_ERROR)
|
||||
missingDependacyFiles = true
|
||||
|
@ -42,7 +41,6 @@ end
|
|||
-- Check for Legacy Files
|
||||
local foundLegacyFiles = false
|
||||
for i = 1, #legacyFiles do
|
||||
--log_to_console(dependacyFiles[i] .. " = " .. tostring(mod_file_exists(dependacyFiles[i])))
|
||||
if mod_file_exists(legacyFiles[i]) then
|
||||
log_to_console("Character Select legacy file found: '" .. legacyFiles[i] .. "'", CONSOLE_MESSAGE_ERROR)
|
||||
foundLegacyFiles = true
|
||||
|
@ -54,10 +52,11 @@ if foundLegacyFiles then
|
|||
return 0
|
||||
end
|
||||
|
||||
-- Version Data --
|
||||
MOD_VERSION_API = 1
|
||||
MOD_VERSION_MAJOR = 12
|
||||
MOD_VERSION_MINOR = 0
|
||||
MOD_VERSION_INDEV = true
|
||||
MOD_VERSION_INDEV = false
|
||||
MOD_VERSION_STRING = tostring(MOD_VERSION_API) .. "." .. tostring(MOD_VERSION_MAJOR) .. (MOD_VERSION_MINOR > 0 and ("." .. tostring(MOD_VERSION_MINOR)) or "") .. (MOD_VERSION_INDEV and " (In-Dev)" or "")
|
||||
|
||||
ommActive = false
|
||||
|
|
|
@ -12,6 +12,8 @@ local SLEEP_TALK_SNORES = 8
|
|||
local STARTING_SNORE = 46
|
||||
local SLEEP_TALK_START = STARTING_SNORE + 49
|
||||
local SLEEP_TALK_END = SLEEP_TALK_START + SLEEP_TALK_SNORES
|
||||
local stallTimer = 0
|
||||
local stallSayLine = 5
|
||||
|
||||
local TYPE_TABLE = "table"
|
||||
local TYPE_USERDATA = "userdata"
|
||||
|
@ -77,13 +79,13 @@ 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
|
||||
if m.playerIndex == 0 then
|
||||
if stallTimer < stallSayLine - 1 then
|
||||
return NO_SOUND
|
||||
end
|
||||
end
|
||||
local index = m.playerIndex
|
||||
if check_sound_exists(playerSample[index]) and type(playerSample[index]) ~= TYPE_STRING then
|
||||
|
@ -207,13 +209,12 @@ 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
|
||||
if stallTimer == stallSayLine then
|
||||
play_character_sound(m, CHAR_SOUND_OKEY_DOKEY)
|
||||
stallTimer = stallTimer + 1
|
||||
elseif stallTimer < 10 then
|
||||
elseif stallTimer < stallSayLine then
|
||||
stallTimer = stallTimer + 1
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue