Merge branch 'testing'
This commit is contained in:
commit
56d0b46b14
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user