import "Thurallor.SequenceBars";
--Puts("--------------------------------------");
math.randomseed(Turbine.Engine.GetGameTime());
theManager = Manager();
AddCallback(Turbine.Plugin, "Unload", function()
theManager:Unload();
Puts(L:GetText("/GoodbyeMessage"));
end);
local hello = L:GetText("/HelloMessage");
hello = string.gsub(hello, "<version>", plugin:GetVersion());
Turbine.Shell.WriteLine(hello);
_G.PutsPrefix = L:GetText("/PutsPrefix");
if (L:GetLanguage() ~= Turbine.Language.English) then
Puts(L:GetText("/TranslationHelpWanted"));
end
sbCmd = Turbine.ShellCommand();
function sbCmd:Execute(cmd, args)
if ((args == "help") or (not theManager:ShellCommand(cmd, args))) then
Turbine.Shell.WriteLine(sbCmd.GetHelp());
end
end
sbCmd.GetHelp = function()
return L:GetText("/ShellCommand/LongHelp");
end
sbCmd.GetShortHelp = function()
return L:GetText("/ShellCommand/ShortHelp");
end
Turbine.Shell.AddCommand(L:GetText("/ShellCommand/Command"), sbCmd);
--[[
Turbine.Plugin.Load = function()
import "Equendil.Utils";
import "Equendil.LuaExplorer.Browser";
function BrowseTable(name, t)
local b = Equendil.LuaExplorer.Browser("Browsing: " .. name);
b:Add(name, t, true, false);
b:SetVisible( true );
b:SetPosition(0, 0);
b:Activate();
end
BrowseTable("_G", _G);
end
]]
--[[
-- Display a nice matte for screencaps of windows
win = Turbine.UI.Lotro.Window();
win:SetVisible(true);
win:SetResizable(true);
win:SetZOrder(-1);
win.border = Turbine.UI.Control();
win.border:SetParent(win);
win.border:SetBackColor(Turbine.UI.Color(74/255, 79/255, 87/255))
win.border:SetMouseVisible(false);
win.bg = Turbine.UI.Control();
win.bg:SetParent(win.border);
win.bg:SetBackColor(Turbine.UI.Color.Black);
win.bg:SetPosition(50, 50);
win.bg:SetMouseVisible(false);
function win:SizeChanged()
local w, h = self:GetSize();
win.border:SetSize(w, h);
win.bg:SetSize(w - 100, h - 100);
end
win:SetSize(300, 300);
CenterWindow(win);
]]