ah_sce_unpacked/unpacked/Bag Tarot Deck (Scripted) a230f9/Card The Devil · XV 8328fd.ttslua

71 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-08-27 21:09:46 -04: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)
__bundle_register("__root", function(require, _LOADED, __bundle_register, __bundle_modules)
require("playercards/Tarotcard")
end)
__bundle_register("playercards/Tarotcard", function(require, _LOADED, __bundle_register, __bundle_modules)
-- context menu to manually fix rotation
function onLoad()
self.addContextMenuItem("Rotate Preview", rotatePreview)
self.addContextMenuItem("Rotate Card+Preview", rotateSelfAndPreview)
end
-- rotates the alt_view_angle
function rotatePreview()
local angle = self.alt_view_angle
if angle.y == 0 then
angle.y = 180
else
angle.y = 0
end
self.alt_view_angle = angle
end
-- rotates this card and the preview
function rotateSelfAndPreview()
self.setRotationSmooth(self.getRotation() + Vector(0, 180, 0))
rotatePreview()
end
end)
return __bundle_require("__root")