Merge branch 'testing'

This commit is contained in:
Allanis 2013-06-10 21:16:22 +01:00
commit 56d0b46b14
2 changed files with 7 additions and 3 deletions

View File

@ -7,7 +7,7 @@
-- combat - Player just got a hostile on screen.
-- idle - Current playing music ran out.
--]]--
last = "idle"
function choose(str)
if str == "load" then
music.load("machina")
@ -25,10 +25,12 @@ function choose(str)
music.load("galacticbattle")
music.play()
elseif str == "idle" then
elseif str == "idle" and last ~= "idle" then
choose(last) -- This should be smarter in the future.
end
if last ~= "idle" then
last = str -- Save the last string so we can use it.
end
end

View File

@ -371,6 +371,8 @@ static int music_luaInit(void) {
music_lua = luaL_newstate();
luaL_openlibs(music_lua);
lua_loadSpace(music_lua, 1); // Space and time are readonly.
lua_loadTime(music_lua, 1);
lua_loadRnd(music_lua);