mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-08 09:31:58 +00:00
Worked around "set global function xx" warnings in jukebox mod + fixed long comment ends.
This commit is contained in:
parent
6dc1c1e8d1
commit
1d4eb5533e
1 changed files with 10 additions and 10 deletions
|
@ -83,14 +83,14 @@ DEFAULT_WATERLEVEL = 0
|
||||||
OVERRIDE_WATERLEVEL = {
|
OVERRIDE_WATERLEVEL = {
|
||||||
["ancienttest"] = -2700,
|
["ancienttest"] = -2700,
|
||||||
}
|
}
|
||||||
--]]
|
]]
|
||||||
|
|
||||||
function jukebox_initButton(me)
|
rawset(_G, "jukebox_initButton", function(me)
|
||||||
node_setCursorActivation(me, true)
|
node_setCursorActivation(me, true)
|
||||||
node_setCatchActions(me, true)
|
node_setCatchActions(me, true)
|
||||||
end
|
end)
|
||||||
|
|
||||||
function jukebox_doButtonAction(me, action, state, transitions, isdefault)
|
rawset(_G, "jukebox_doButtonAction", function(me, action, state, transitions, isdefault)
|
||||||
if isNestedMain() then return end
|
if isNestedMain() then return end
|
||||||
if getNodeToActivate() == me and state == 1 then
|
if getNodeToActivate() == me and state == 1 then
|
||||||
local name = transitions[action]
|
local name = transitions[action]
|
||||||
|
@ -110,13 +110,13 @@ function jukebox_doButtonAction(me, action, state, transitions, isdefault)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end)
|
||||||
|
|
||||||
function jukebox_getSong()
|
rawset(_G, "jukebox_getSong", function()
|
||||||
return getStory()
|
return getStory()
|
||||||
end
|
end)
|
||||||
|
|
||||||
function jukebox_playSong(index)
|
rawset(_G, "jukebox_playSong", function(index)
|
||||||
setStory(index)
|
setStory(index)
|
||||||
local songName = SONG_LIST[index]
|
local songName = SONG_LIST[index]
|
||||||
setControlHint("Now playing: "..songName)
|
setControlHint("Now playing: "..songName)
|
||||||
|
@ -126,5 +126,5 @@ function jukebox_playSong(index)
|
||||||
local waterLevel = getWaterLevel()
|
local waterLevel = getWaterLevel()
|
||||||
local newWaterLevel = OVERRIDE_WATERLEVEL[songName] or DEFAULT_WATERLEVEL
|
local newWaterLevel = OVERRIDE_WATERLEVEL[songName] or DEFAULT_WATERLEVEL
|
||||||
if newWaterLevel ~= waterLevel then setWaterLevel(newWaterLevel) end
|
if newWaterLevel ~= waterLevel then setWaterLevel(newWaterLevel) end
|
||||||
--]]
|
]]
|
||||||
end
|
end)
|
||||||
|
|
Loading…
Add table
Reference in a new issue