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}
|
|
|
|
|
|
|
|
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)
|
2024-02-17 19:48:30 -05:00
|
|
|
__bundle_register("__root", function(require, _LOADED, __bundle_register, __bundle_modules)
|
|
|
|
require("util/Trashcan")
|
|
|
|
end)
|
2023-04-22 16:56:01 -04:00
|
|
|
__bundle_register("util/Trashcan", function(require, _LOADED, __bundle_register, __bundle_modules)
|
|
|
|
-- adds a context menu entry to trigger the emptying
|
|
|
|
function onLoad()
|
|
|
|
self.addContextMenuItem("Empty Trash", emptyTrash)
|
2021-01-02 22:49:38 -05:00
|
|
|
end
|
|
|
|
|
2023-04-22 16:56:01 -04:00
|
|
|
-- removes all objects by taking them out and then destructing them
|
|
|
|
function emptyTrash()
|
|
|
|
for _, trash in ipairs(self.getObjects()) do
|
|
|
|
self.takeObject().destruct()
|
|
|
|
end
|
|
|
|
end
|
2022-12-13 14:02:30 -05:00
|
|
|
end)
|
|
|
|
return __bundle_require("__root")
|