ah_sce_unpacked/unpacked/Custom_Model_Bag Standalone Scenarios 77a5f9/Custom_Model Machinations Through Time 3c4f3c.ttslua

90 lines
2.5 KiB
Plaintext
Raw Normal View History

2022-12-13 14:02:30 -05:00
-- Bundled by luabundle {"version":"1.6.0"}
local __bundle_require, __bundle_loaded, __bundle_register, __bundle_modules = (function(superRequire)
local loadingPlaceholder = {[{}] = true}
2021-10-18 15:54:27 -04:00
2022-12-13 14:02:30 -05:00
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]
2021-10-18 15:54:27 -04:00
2022-12-13 14:02:30 -05:00
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
2021-10-18 15:54:27 -04:00
2022-12-13 14:02:30 -05:00
loaded[name] = loadingPlaceholder
loadedModule = modules[name](require, loaded, register, modules)
loaded[name] = loadedModule
end
2021-10-18 15:54:27 -04:00
2022-12-13 14:02:30 -05:00
return loadedModule
end
2021-10-18 15:54:27 -04:00
2022-12-13 14:02:30 -05:00
return require, loaded, register, modules
end)(nil)
2024-02-04 10:51:51 -05:00
__bundle_register("__root", function(require, _LOADED, __bundle_register, __bundle_modules)
require("core/DownloadBox")
end)
2022-12-13 14:02:30 -05:00
__bundle_register("core/DownloadBox", function(require, _LOADED, __bundle_register, __bundle_modules)
function onLoad()
2023-01-29 19:31:52 -05:00
local notes = self.getGMNotes()
-- default parameters (e.g. scenarios)
local buttonParameters = {
2022-12-13 14:02:30 -05:00
label = "Download",
click_function = "buttonClick_download",
function_owner = self,
2023-01-29 19:31:52 -05:00
position = { x = 0, y = 0.1, z = 2.1 },
height = 250,
2022-12-13 14:02:30 -05:00
width = 800,
font_size = 150,
color = { 0, 0, 0 },
font_color = { 1, 1, 1 }
2023-01-29 19:31:52 -05:00
}
-- return to boxes
if string.match(notes, "................") == "campaigns/return" then
buttonParameters.position.z = 2
-- official campaign boxes
2023-04-22 16:56:01 -04:00
elseif string.match(notes, ".........") == "campaigns" or self.hasTag("LargeBox") then
2023-01-29 19:31:52 -05:00
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)
2021-10-18 15:54:27 -04:00
end
2024-03-10 09:56:22 -04:00
function buttonClick_download(_, playerColor)
Global.call('placeholder_download', { url = self.getGMNotes(), player = Player[playerColor], replace = self.guid })
2021-10-18 15:54:27 -04:00
end
2022-12-13 14:02:30 -05:00
end)
return __bundle_require("__root")