This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
local _screens = {}
|
||||
|
||||
function Screen.get_screens_array()
|
||||
local screens_array = {}
|
||||
for _, screen_data in pairs(_screens) do
|
||||
table.insert(screens_array, screen_data)
|
||||
end
|
||||
return screens_array
|
||||
end
|
||||
|
||||
function Screen.register(screen_data)
|
||||
if _screens[screen_data.id] then
|
||||
trace("Warning: Overwriting screen with id: " .. screen_data.id)
|
||||
end
|
||||
if not screen_data.situations then
|
||||
screen_data.situations = {}
|
||||
end
|
||||
_screens[screen_data.id] = screen_data
|
||||
end
|
||||
|
||||
|
||||
@@ -6,5 +6,9 @@ Screen.register({
|
||||
"play_rhythm",
|
||||
"play_ddr",
|
||||
"go_to_walking_to_home",
|
||||
}
|
||||
"have_a_coffee",
|
||||
},
|
||||
situations = {
|
||||
"drink_coffee",
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user