Getting Started with Region Modules/New
From OpenSimulator
(Difference between revisions)
(Fixing an inaccuracy in my example) |
(more help parts to make this make a bit more sense) |
||
Line 53: | Line 53: | ||
</source> | </source> | ||
− | In | + | In Your Source project folder there should also be a Resources folder with a module.addins.xml like the following: (remember the Type of your module is; namespace.classname) |
<source lang=ini> | <source lang=ini> |
Revision as of 14:07, 24 September 2009
In the new version, this is a basic version of a RegionModule
using System; using System.Collections.Generic; using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; namespace YouNameSpaceHere public class YourModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string Name { get { return "YourModuleName"; } } public Type ReplaceableInterface { get { return null; } } public void Initialise(IConfigSource source) { } public void Close() { } public void AddRegion(Scene scene) { } public void RemoveRegion(Scene scene) { } public void RegionLoaded(Scene scene) { } public void PostInitialise() { } }
In Your Source project folder there should also be a Resources folder with a module.addins.xml like the following: (remember the Type of your module is; namespace.classname)
<Addin id="YourNamespace" version="0.3"> <Runtime> <Import assembly="YourDLL.dll"/> </Runtime> <Dependencies> <Addin id="OpenSim" version="0.5" /> </Dependencies> <Extension path = "/OpenSim/RegionModules"> <RegionModule id="YourModule" type="TypeOfYourModule" /> \ </Extension> </Addin>