ah_sce_unpacked/unpacked/Custom_Model_Bag Standalone Scenarios 77a5f9/Custom_Model Guardians of the Abyss ee987d.ttslua
2024-03-10 09:56:22 -04:00

90 lines
2.5 KiB
Plaintext

-- 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
loaded[name] = loadingPlaceholder
loadedModule = modules[name](require, loaded, register, modules)
loaded[name] = loadedModule
end
return loadedModule
end
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()
-- 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" or self.hasTag("LargeBox") 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)
end
function buttonClick_download(_, playerColor)
Global.call('placeholder_download', { url = self.getGMNotes(), player = Player[playerColor], replace = self.guid })
end
end)
return __bundle_require("__root")