From 1d4eb5533e2859124fdc140e04be0a68edfa5a27 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Fri, 1 Jun 2012 17:53:21 +0200 Subject: [PATCH] Worked around "set global function xx" warnings in jukebox mod + fixed long comment ends. --- .../_mods/jukebox/scripts/jukeboxinclude.lua | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/game_scripts/_mods/jukebox/scripts/jukeboxinclude.lua b/game_scripts/_mods/jukebox/scripts/jukeboxinclude.lua index 7355601..e8b799b 100644 --- a/game_scripts/_mods/jukebox/scripts/jukeboxinclude.lua +++ b/game_scripts/_mods/jukebox/scripts/jukeboxinclude.lua @@ -83,14 +83,14 @@ DEFAULT_WATERLEVEL = 0 OVERRIDE_WATERLEVEL = { ["ancienttest"] = -2700, } ---]] +]] -function jukebox_initButton(me) +rawset(_G, "jukebox_initButton", function(me) node_setCursorActivation(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 getNodeToActivate() == me and state == 1 then local name = transitions[action] @@ -110,13 +110,13 @@ function jukebox_doButtonAction(me, action, state, transitions, isdefault) return false end return true -end +end) -function jukebox_getSong() +rawset(_G, "jukebox_getSong", function() return getStory() -end +end) -function jukebox_playSong(index) +rawset(_G, "jukebox_playSong", function(index) setStory(index) local songName = SONG_LIST[index] setControlHint("Now playing: "..songName) @@ -126,5 +126,5 @@ function jukebox_playSong(index) local waterLevel = getWaterLevel() local newWaterLevel = OVERRIDE_WATERLEVEL[songName] or DEFAULT_WATERLEVEL if newWaterLevel ~= waterLevel then setWaterLevel(newWaterLevel) end - --]] -end + ]] +end)