mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Massive tab and trailing space cleanup
This commit is contained in:
@@ -33,7 +33,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
/// Describes where on the avatar the attachment is located
|
||||
/// </value>
|
||||
int Location { get ; }
|
||||
|
||||
|
||||
//// <value>
|
||||
/// Accessor to the rez'ed asset, representing the attachment
|
||||
/// </value>
|
||||
|
||||
@@ -30,7 +30,7 @@ using OpenMetaverse;
|
||||
using OpenMetaverse.Assets;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements the methods needed to operate on individual inventory items.
|
||||
/// </summary>
|
||||
|
||||
@@ -60,19 +60,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
/// <summary>
|
||||
/// Returns whether or not this object is still in the world.
|
||||
/// Eg, if you store an IObject reference, however the object
|
||||
/// is deleted before you use it, it will throw a NullReference
|
||||
/// is deleted before you use it, it will throw a NullReference
|
||||
/// exception. 'Exists' allows you to check the object is still
|
||||
/// in play before utilizing it.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// IObject deleteMe = World.Objects[0];
|
||||
///
|
||||
///
|
||||
/// if (deleteMe.Exists) {
|
||||
/// deleteMe.Say("Hello, I still exist!");
|
||||
/// }
|
||||
///
|
||||
///
|
||||
/// World.Objects.Remove(deleteMe);
|
||||
///
|
||||
///
|
||||
/// if (!deleteMe.Exists) {
|
||||
/// Host.Console.Info("I was deleted");
|
||||
/// }
|
||||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
/// Objects should be near-guarunteed to exist for any event which
|
||||
/// passes them as an argument. Storing an object for a longer period
|
||||
/// of time however will limit their reliability.
|
||||
///
|
||||
///
|
||||
/// It is a good practice to use Try/Catch blocks handling for
|
||||
/// NullReferenceException, when accessing remote objects.
|
||||
/// </remarks>
|
||||
@@ -118,8 +118,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
IObject[] Children { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of materials attached to this object. Each may contain unique texture
|
||||
/// and other visual information. For primitive based objects, this correlates with
|
||||
/// Returns a list of materials attached to this object. Each may contain unique texture
|
||||
/// and other visual information. For primitive based objects, this correlates with
|
||||
/// Object Faces. For mesh based objects, this correlates with Materials.
|
||||
/// </summary>
|
||||
IObjectMaterial[] Materials { get; }
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
String TouchText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Text to be associated with this object, in the
|
||||
/// Text to be associated with this object, in the
|
||||
/// Second Life(r) viewer, this is shown above the
|
||||
/// object.
|
||||
/// </summary>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
TaskInventoryItem m_privateItem;
|
||||
Scene m_rootScene;
|
||||
|
||||
|
||||
public InventoryItem(Scene rootScene, TaskInventoryItem internalItem)
|
||||
{
|
||||
m_rootScene = rootScene;
|
||||
@@ -77,10 +77,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Type { get { return m_privateItem.Type; } }
|
||||
public UUID AssetID { get { return m_privateItem.AssetID; } }
|
||||
|
||||
|
||||
// This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM.
|
||||
public T RetrieveAsset<T>() where T : OpenMetaverse.Assets.Asset, new()
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
|
||||
if ((sbyte)result.AssetType != a.Type)
|
||||
throw new ApplicationException("[MRM] The supplied asset class does not match the found asset");
|
||||
|
||||
|
||||
result.AssetData = a.Data;
|
||||
result.Decode();
|
||||
return result;
|
||||
|
||||
@@ -35,7 +35,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
public class MicroScheduler : System.MarshalByRefObject, IMicrothreader
|
||||
public class MicroScheduler : System.MarshalByRefObject, IMicrothreader
|
||||
{
|
||||
private readonly List<IEnumerator> m_threads = new List<IEnumerator>();
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
get { return GetSOP().Description; }
|
||||
set
|
||||
{
|
||||
if (CanEdit())
|
||||
if (CanEdit())
|
||||
GetSOP().Description = value;
|
||||
}
|
||||
}
|
||||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
rets = new IObject[total];
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
||||
foreach (SceneObjectPart part in my.ParentGroup.Parts)
|
||||
{
|
||||
rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security);
|
||||
@@ -273,8 +273,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
public Vector3 SitTarget
|
||||
{
|
||||
get { return GetSOP().SitTargetPosition; }
|
||||
set
|
||||
{
|
||||
set
|
||||
{
|
||||
if (CanEdit())
|
||||
{
|
||||
GetSOP().SitTargetPosition = value;
|
||||
@@ -285,8 +285,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
public string SitTargetText
|
||||
{
|
||||
get { return GetSOP().SitName; }
|
||||
set
|
||||
{
|
||||
set
|
||||
{
|
||||
if (CanEdit())
|
||||
{
|
||||
GetSOP().SitName = value;
|
||||
@@ -297,7 +297,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
public string TouchText
|
||||
{
|
||||
get { return GetSOP().TouchName; }
|
||||
set
|
||||
set
|
||||
{
|
||||
if (CanEdit())
|
||||
{
|
||||
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
public string Text
|
||||
{
|
||||
get { return GetSOP().Text; }
|
||||
set
|
||||
set
|
||||
{
|
||||
if (CanEdit())
|
||||
{
|
||||
@@ -382,11 +382,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
get { return this; }
|
||||
}
|
||||
|
||||
public IObjectInventory Inventory
|
||||
public IObjectInventory Inventory
|
||||
{
|
||||
get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); }
|
||||
}
|
||||
|
||||
|
||||
#region Public Functions
|
||||
|
||||
public void Say(string msg)
|
||||
@@ -406,7 +406,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
SceneObjectPart sop = GetSOP();
|
||||
m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
|
||||
}
|
||||
|
||||
|
||||
public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel)
|
||||
{
|
||||
if (!CanEdit())
|
||||
@@ -445,9 +445,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
dm.SendDialogToUser(
|
||||
avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID,
|
||||
message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
if (hasCut) ret += 2;
|
||||
if (hasDimple) ret += 2;
|
||||
if (hasHollow)
|
||||
ret += 1; // GOTCHA: LSL shows 2 additional sides here.
|
||||
ret += 1; // GOTCHA: LSL shows 2 additional sides here.
|
||||
// This has been fixed, but may cause porting issues.
|
||||
break;
|
||||
case (int) PrimType.Torus:
|
||||
|
||||
@@ -61,25 +61,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
if (!m_publicInventory.ContainsKey(privateItem.ItemID))
|
||||
m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem));
|
||||
}
|
||||
|
||||
|
||||
#region IDictionary<UUID, IInventoryItem> implementation
|
||||
public void Add (UUID key, IInventoryItem value)
|
||||
{
|
||||
m_publicInventory.Add(key, value);
|
||||
m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem());
|
||||
}
|
||||
|
||||
|
||||
public bool ContainsKey (UUID key)
|
||||
{
|
||||
return m_privateInventory.ContainsKey(key);
|
||||
}
|
||||
|
||||
|
||||
public bool Remove (UUID key)
|
||||
{
|
||||
m_publicInventory.Remove(key);
|
||||
return m_privateInventory.Remove(key);
|
||||
}
|
||||
|
||||
|
||||
public bool TryGetValue (UUID key, out IInventoryItem value)
|
||||
{
|
||||
value = null;
|
||||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
// wasn't found in the public inventory
|
||||
TaskInventoryItem privateItem;
|
||||
|
||||
|
||||
result = m_privateInventory.TryGetValue(key, out privateItem);
|
||||
if (result)
|
||||
{
|
||||
@@ -98,16 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
}
|
||||
} else
|
||||
return true;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public ICollection<UUID> Keys {
|
||||
get {
|
||||
return m_privateInventory.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ICollection<IInventoryItem> Values {
|
||||
get {
|
||||
SynchronizeDictionaries();
|
||||
@@ -139,41 +139,41 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
m_publicInventory.Clear();
|
||||
m_privateInventory.Clear();
|
||||
}
|
||||
|
||||
|
||||
public bool Contains (KeyValuePair<UUID, IInventoryItem> item)
|
||||
{
|
||||
return m_privateInventory.ContainsKey(item.Key);
|
||||
}
|
||||
|
||||
|
||||
public void CopyTo (KeyValuePair<UUID, IInventoryItem>[] array, int arrayIndex)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public bool Remove (KeyValuePair<UUID, IInventoryItem> item)
|
||||
{
|
||||
return Remove(item.Key);
|
||||
}
|
||||
|
||||
|
||||
public int Count {
|
||||
get {
|
||||
return m_privateInventory.Count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Explicit implementations
|
||||
IInventoryItem System.Collections.Generic.IDictionary<UUID, IInventoryItem>.this[UUID key]
|
||||
{
|
||||
@@ -189,13 +189,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<UUID, IInventoryItem>>.CopyTo(System.Collections.Generic.KeyValuePair<UUID,IInventoryItem>[] array, int offset)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public IInventoryItem this[string name]
|
||||
{
|
||||
get {
|
||||
@@ -204,7 +204,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
if (!m_publicInventory.ContainsKey(i.ItemID))
|
||||
m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i));
|
||||
|
||||
|
||||
return m_publicInventory[i.ItemID];
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
|
||||
@@ -70,18 +70,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
get { return GetSP().AbsolutePosition; }
|
||||
set { GetSP().Teleport(value); }
|
||||
}
|
||||
|
||||
|
||||
public bool IsChildAgent
|
||||
{
|
||||
get { return GetSP().IsChildAgent; }
|
||||
}
|
||||
|
||||
|
||||
#region IAvatar implementation
|
||||
public IAvatarAttachment[] Attachments
|
||||
{
|
||||
get {
|
||||
List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
|
||||
|
||||
|
||||
List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
|
||||
foreach (AvatarAttachment attach in internalAttachments)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
new UUID(attach.ItemID),
|
||||
new UUID(attach.AssetID), m_security));
|
||||
}
|
||||
|
||||
|
||||
return attachments.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
private readonly UUID m_assetId;
|
||||
|
||||
private readonly ISecurityCredential m_security;
|
||||
|
||||
|
||||
public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security)
|
||||
{
|
||||
m_rootScene = rootScene;
|
||||
@@ -51,9 +51,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
//m_itemId = itemId;
|
||||
m_assetId = assetId;
|
||||
}
|
||||
|
||||
|
||||
public int Location { get { return m_location; } }
|
||||
|
||||
|
||||
public IObject Asset
|
||||
{
|
||||
get
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenSim
|
||||
|
||||
public void Microthread(IEnumerable thread)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void RunMicrothread()
|
||||
@@ -92,7 +92,7 @@ namespace OpenSim
|
||||
|
||||
public override void Stop()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
public class World : System.MarshalByRefObject, IWorld, IWorldAudio
|
||||
public class World : System.MarshalByRefObject, IWorld, IWorldAudio
|
||||
{
|
||||
private readonly Scene m_internalScene;
|
||||
private readonly ISecurityCredential m_security;
|
||||
@@ -149,7 +149,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security);
|
||||
e.Text = chat.Message;
|
||||
e.Channel = chat.Channel;
|
||||
|
||||
|
||||
_OnChat(this, e);
|
||||
return;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
|
||||
e.Text = chat.Message;
|
||||
e.Channel = chat.Channel;
|
||||
|
||||
|
||||
_OnChat(this, e);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user