-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.lua
More file actions
39 lines (32 loc) · 1.24 KB
/
main.lua
File metadata and controls
39 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARGS = ...
DOC_DIR = system.pathForFile('', system.DocumentsDirectory)
display.setStatusBar(display.HiddenStatusBar)
display.setStatusBar(display.TranslucentStatusBar)
display.setStatusBar(display.HiddenStatusBar)
table.insert(package.loaders, 2, function(modulename)
local path = (DOC_DIR .. '/Live/' .. modulename):gsub('%.', '/') .. '.lua'
local file = io.open(path, 'r')
if file then
local data = tostring(file:read('*a'))
io.close(file) return assert(loadstring(data, modulename))
end
end)
original_require = require
require = function(module, isSingle)
if isSingle then package.loaded[module] = nil end
return original_require(module)
end
timer.performWithDelay(system.getInfo 'environment' == 'simulator' and 0 or 100, function()
display.setStatusBar(display.HiddenStatusBar)
display.setStatusBar(display.TranslucentStatusBar)
display.setStatusBar(display.HiddenStatusBar)
GLOBAL = require 'Data.global'
MENU = require 'Interfaces.menu'
ROBODOG = require 'Interfaces.robodog'
if (not LIVE) and (system.getInfo('deviceID') == 'ad086e7885c038ac78cc320bee71fdab' or not IS_SIM) then
require 'starter'
else
MENU.create()
MENU.group.isVisible = true
end
end)