2023-01-29 19:31:52 -05:00
|
|
|
-- Bundled by luabundle {"version":"1.6.0"}
|
|
|
|
local __bundle_require, __bundle_loaded, __bundle_register, __bundle_modules = (function(superRequire)
|
|
|
|
local loadingPlaceholder = {[{}] = true}
|
|
|
|
|
|
|
|
local register
|
|
|
|
local modules = {}
|
|
|
|
|
|
|
|
local require
|
|
|
|
local loaded = {}
|
|
|
|
|
|
|
|
register = function(name, body)
|
|
|
|
if not modules[name] then
|
|
|
|
modules[name] = body
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
require = function(name)
|
|
|
|
local loadedModule = loaded[name]
|
|
|
|
|
|
|
|
if loadedModule then
|
|
|
|
if loadedModule == loadingPlaceholder then
|
|
|
|
return nil
|
|
|
|
end
|
|
|
|
else
|
|
|
|
if not modules[name] then
|
|
|
|
if not superRequire then
|
|
|
|
local identifier = type(name) == 'string' and '\"' .. name .. '\"' or tostring(name)
|
|
|
|
error('Tried to require ' .. identifier .. ', but no such module has been registered')
|
|
|
|
else
|
|
|
|
return superRequire(name)
|
|
|
|
end
|
|
|
|
end
|
2022-12-13 14:02:30 -05:00
|
|
|
|
2023-01-29 19:31:52 -05:00
|
|
|
loaded[name] = loadingPlaceholder
|
|
|
|
loadedModule = modules[name](require, loaded, register, modules)
|
|
|
|
loaded[name] = loadedModule
|
|
|
|
end
|
2022-12-13 14:02:30 -05:00
|
|
|
|
2023-01-29 19:31:52 -05:00
|
|
|
return loadedModule
|
|
|
|
end
|
2022-12-13 14:02:30 -05:00
|
|
|
|
2023-01-29 19:31:52 -05:00
|
|
|
return require, loaded, register, modules
|
|
|
|
end)(nil)
|
|
|
|
__bundle_register("__root", function(require, _LOADED, __bundle_register, __bundle_modules)
|
|
|
|
require("core/DownloadBox")
|
|
|
|
end)
|
|
|
|
__bundle_register("core/DownloadBox", function(require, _LOADED, __bundle_register, __bundle_modules)
|
|
|
|
function onLoad()
|
|
|
|
local notes = self.getGMNotes()
|
2022-12-13 14:02:30 -05:00
|
|
|
|
2023-01-29 19:31:52 -05:00
|
|
|
-- default parameters (e.g. scenarios)
|
|
|
|
local buttonParameters = {
|
|
|
|
label = "Download",
|
|
|
|
click_function = "buttonClick_download",
|
|
|
|
function_owner = self,
|
|
|
|
position = { x = 0, y = 0.1, z = 2.1 },
|
|
|
|
height = 250,
|
|
|
|
width = 800,
|
|
|
|
font_size = 150,
|
|
|
|
color = { 0, 0, 0 },
|
|
|
|
font_color = { 1, 1, 1 }
|
|
|
|
}
|
|
|
|
|
|
|
|
-- return to boxes
|
|
|
|
if string.match(notes, "................") == "campaigns/return" then
|
|
|
|
buttonParameters.position.z = 2
|
|
|
|
|
|
|
|
-- official campaign boxes
|
|
|
|
elseif string.match(notes, ".........") == "campaigns" then
|
|
|
|
buttonParameters.position.z = 6
|
|
|
|
buttonParameters.height = 500
|
|
|
|
buttonParameters.width = 1700
|
|
|
|
buttonParameters.font_size = 350
|
|
|
|
|
|
|
|
-- investigator boxes
|
|
|
|
elseif string.match(notes, ".............") == "investigators" then
|
|
|
|
buttonParameters.position.z = 7
|
|
|
|
buttonParameters.height = 850
|
|
|
|
buttonParameters.width = 3400
|
|
|
|
buttonParameters.font_size = 700
|
|
|
|
end
|
|
|
|
|
|
|
|
self.createButton(buttonParameters)
|
2022-12-13 14:02:30 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
function buttonClick_download()
|
2023-01-29 19:31:52 -05:00
|
|
|
Global.call('placeholder_download', { url = self.getGMNotes(), replace = self.guid })
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
return __bundle_require("__root")
|