Getting Started with Region Modules/New

From OpenSimulator

Revision as of 11:41, 24 September 2009 by Fly-man- (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the new version, this is a basic version of a RegionModule

using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
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 the Resources:

<Addin id="YourNamespace" version="0.3">
 
    <Runtime>
        <Import assembly="YourDLL.dll"/>
    </Runtime>
 
    <Dependencies>
        <Addin id="OpenSim" version="0.5" />
    </Dependencies>
 
    <Extension path = "YourPath">
        <RegionModule id="YourModule" type="TypeOfYourModule" />    \
    </Extension>  
 
</Addin>
Personal tools
General
About This Wiki