Plugin Description
#16
How were you planning on doing the processor. I started on it, but then we had dinner. Maybe you had a different approach in mind:
m_PluginManager = nil
m_Plugin = nil
m_ShouldReload = false

function Initialize(Plugin)
	m_Plugin = Plugin
	Plugin:SetName("DocumentPlugin")
	Plugin:SetVersion(1)
	
	m_PluginManager = cRoot:Get():GetPluginManager()
	cPluginManager.AddHook(cPluginManager.HOOK_TICK, OnTick)
	
	return true
end

function OnTick()
	if m_ShouldReload then
		m_PluginManager:DisablePlugin(m_Plugin:GetName())
		m_PluginManager:LoadPlugin(m_Plugin:GetDirectory())
	end
end

function DocumentPlugin(Plugin, FileName)
	local Folder = Plugin:GetLocalFolder()
	dofile(Folder .. "/" .. FileName)
	
	-- Process the g_PluginInfo table

	m_ShouldReload = true
	return true
end

I'm still using the explicit commands because I can now easily create aliases. Or should I do it like
["/ascend"] = 
{
   Alias = "/asc",
   -- etc
},
instead of
Ascend =
{
   Command = "/ascend;/asc",
   -- etc
},
Reply
Thanks given by:


Messages In This Thread
Plugin Description - by ThuGie - 12-29-2013, 06:48 AM
RE: Plugin Description - by xoft - 12-29-2013, 06:52 AM
RE: Plugin Description - by ThuGie - 12-29-2013, 06:54 AM
RE: Plugin Description - by NiLSPACE - 12-29-2013, 07:00 AM
RE: Plugin Description - by xoft - 12-29-2013, 07:53 AM
RE: Plugin Description - by NiLSPACE - 12-29-2013, 08:44 AM
RE: Plugin Description - by SamJBarney - 12-29-2013, 08:02 AM
RE: Plugin Description - by xoft - 12-29-2013, 06:21 PM
RE: Plugin Description - by NiLSPACE - 12-29-2013, 10:48 PM
RE: Plugin Description - by xoft - 12-29-2013, 10:54 PM
RE: Plugin Description - by NiLSPACE - 12-29-2013, 10:57 PM
RE: Plugin Description - by xoft - 12-29-2013, 11:43 PM
RE: Plugin Description - by NiLSPACE - 12-29-2013, 11:51 PM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 01:20 AM
RE: Plugin Description - by xoft - 12-30-2013, 03:31 AM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 03:57 AM
RE: Plugin Description - by xoft - 12-30-2013, 04:33 AM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 04:38 AM
RE: Plugin Description - by xoft - 12-30-2013, 05:36 AM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 05:38 AM
RE: Plugin Description - by xoft - 12-30-2013, 05:42 AM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 05:45 AM
RE: Plugin Description - by xoft - 12-30-2013, 06:08 AM
RE: Plugin Description - by NiLSPACE - 12-30-2013, 06:15 AM
RE: Plugin Description - by xoft - 12-30-2013, 06:19 AM
RE: Plugin Description - by ThuGie - 12-30-2013, 08:31 PM
RE: Plugin Description - by xoft - 01-05-2014, 05:33 AM
RE: Plugin Description - by ThuGie - 01-05-2014, 08:14 AM
RE: Plugin Description - by NiLSPACE - 01-05-2014, 08:41 AM
RE: Plugin Description - by ThuGie - 01-05-2014, 09:17 AM
RE: Plugin Description - by xoft - 01-05-2014, 11:55 PM
RE: Plugin Description - by xoft - 01-06-2014, 01:21 AM
RE: Plugin Description - by NiLSPACE - 01-12-2014, 01:42 AM
RE: Plugin Description - by xoft - 01-12-2014, 02:53 AM
RE: Plugin Description - by NiLSPACE - 01-12-2014, 03:05 AM
RE: Plugin Description - by NiLSPACE - 01-12-2014, 07:19 AM
RE: Plugin Description - by xoft - 01-12-2014, 08:12 AM
RE: Plugin Description - by NiLSPACE - 01-12-2014, 08:19 AM
RE: Plugin Description - by xoft - 01-12-2014, 08:23 AM
RE: Plugin Description - by NiLSPACE - 01-12-2014, 08:25 AM
RE: Plugin Description - by xoft - 01-12-2014, 08:28 AM



Users browsing this thread: 3 Guest(s)