mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Massive tab and trailing space cleanup
This commit is contained in:
@@ -53,12 +53,12 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
|
||||
|
||||
protected Scene m_scene;
|
||||
protected IDialogModule m_dialogMod;
|
||||
|
||||
public string Name { get { return "DAExample Module"; } }
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
|
||||
public string Name { get { return "DAExample Module"; } }
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
|
||||
public void Initialise(IConfigSource source) {}
|
||||
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (ENABLED)
|
||||
@@ -70,22 +70,22 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
|
||||
m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (ENABLED)
|
||||
{
|
||||
m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void RegionLoaded(Scene scene) {}
|
||||
|
||||
public void Close()
|
||||
|
||||
public void Close()
|
||||
{
|
||||
RemoveRegion(m_scene);
|
||||
}
|
||||
|
||||
|
||||
protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
|
||||
{
|
||||
OSDMap attrs = null;
|
||||
@@ -96,28 +96,28 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
|
||||
|
||||
if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs))
|
||||
attrs = new OSDMap();
|
||||
|
||||
|
||||
OSDInteger newValue;
|
||||
|
||||
// We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code.
|
||||
lock (sop.DynAttrs)
|
||||
lock (sop.DynAttrs)
|
||||
{
|
||||
if (!attrs.ContainsKey("moves"))
|
||||
newValue = new OSDInteger(1);
|
||||
else
|
||||
newValue = new OSDInteger(attrs["moves"].AsInteger() + 1);
|
||||
|
||||
|
||||
attrs["moves"] = newValue;
|
||||
|
||||
sop.DynAttrs.SetStore(Namespace, StoreName, attrs);
|
||||
}
|
||||
|
||||
sop.ParentGroup.HasGroupChanged = true;
|
||||
|
||||
|
||||
string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue);
|
||||
m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg);
|
||||
m_dialogMod.SendGeneralAlert(msg);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
|
||||
private Scene m_scene;
|
||||
private IDialogModule m_dialogMod;
|
||||
|
||||
public string Name { get { return "DO"; } }
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
public string Name { get { return "DO"; } }
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
|
||||
public void Initialise(IConfigSource source) {}
|
||||
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (ENABLED)
|
||||
@@ -80,18 +80,18 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
|
||||
m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (ENABLED)
|
||||
{
|
||||
m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void RegionLoaded(Scene scene) {}
|
||||
|
||||
public void Close()
|
||||
|
||||
public void Close()
|
||||
{
|
||||
RemoveRegion(m_scene);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
|
||||
|
||||
rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar));
|
||||
}
|
||||
|
||||
|
||||
private bool OnSceneGroupMove(UUID groupId, Vector3 delta)
|
||||
{
|
||||
SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId);
|
||||
@@ -129,11 +129,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
|
||||
if (rawObj != null)
|
||||
{
|
||||
MyObject myObj = (MyObject)rawObj;
|
||||
|
||||
|
||||
m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves));
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user