Formatting cleanup.

trunk
Jeff Ames 2009-07-01 23:37:09 +00:00
parent a0a44d8ebc
commit 1d01d6d919
10 changed files with 326 additions and 326 deletions

View File

@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
/// </returns> /// </returns>
internal static InventoryItem FromInterface(IInventoryItem i) internal static InventoryItem FromInterface(IInventoryItem i)
{ {
if(typeof(InventoryItem).IsAssignableFrom(i.GetType())) if (typeof(InventoryItem).IsAssignableFrom(i.GetType()))
{ {
return (InventoryItem)i; return (InventoryItem)i;
} }
@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
AssetBase a = m_rootSceene.AssetService.Get(AssetID.ToString()); AssetBase a = m_rootSceene.AssetService.Get(AssetID.ToString());
T result = new T(); T result = new T();
if((sbyte)result.AssetType != a.Type) if ((sbyte)result.AssetType != a.Type)
throw new ApplicationException("[MRM] The supplied asset class does not match the found asset"); throw new ApplicationException("[MRM] The supplied asset class does not match the found asset");
result.AssetData = a.Data; result.AssetData = a.Data;

View File

@ -57,8 +57,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
/// </description> /// </description>
private void SynchronizeDictionaries() private void SynchronizeDictionaries()
{ {
foreach(TaskInventoryItem privateItem in m_privateInventory.Values) foreach (TaskInventoryItem privateItem in m_privateInventory.Values)
if(!m_publicInventory.ContainsKey(privateItem.ItemID)) if (!m_publicInventory.ContainsKey(privateItem.ItemID))
m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem)); m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem));
} }
@ -85,13 +85,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
value = null; value = null;
bool result = false; bool result = false;
if(!m_publicInventory.TryGetValue(key, out value)) if (!m_publicInventory.TryGetValue(key, out value))
{ {
// wasn't found in the public inventory // wasn't found in the public inventory
TaskInventoryItem privateItem; TaskInventoryItem privateItem;
result = m_privateInventory.TryGetValue(key, out privateItem); result = m_privateInventory.TryGetValue(key, out privateItem);
if(result) if (result)
{ {
value = new InventoryItem(m_rootScene, privateItem); value = new InventoryItem(m_rootScene, privateItem);
m_publicInventory.Add(key, value); // add item, so we don't convert again m_publicInventory.Add(key, value); // add item, so we don't convert again
@ -179,7 +179,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
{ {
get { get {
IInventoryItem result; IInventoryItem result;
if(TryGetValue(key, out result)) if (TryGetValue(key, out result))
return result; return result;
else else
throw new KeyNotFoundException("[MRM] The requrested item ID could not be found"); throw new KeyNotFoundException("[MRM] The requrested item ID could not be found");
@ -199,10 +199,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
public IInventoryItem this[string name] public IInventoryItem this[string name]
{ {
get { get {
foreach(TaskInventoryItem i in m_privateInventory.Values) foreach (TaskInventoryItem i in m_privateInventory.Values)
if(i.Name == name) if (i.Name == name)
{ {
if(!m_publicInventory.ContainsKey(i.ItemID)) if (!m_publicInventory.ContainsKey(i.ItemID))
m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i)); m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i));
return m_publicInventory[i.ItemID]; return m_publicInventory[i.ItemID];

View File

@ -79,9 +79,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
List<IAvatarAttachment> attachments = new List<IAvatarAttachment>(); List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
Hashtable internalAttachments = GetSP().Appearance.GetAttachments(); Hashtable internalAttachments = GetSP().Appearance.GetAttachments();
if(internalAttachments != null) if (internalAttachments != null)
{ {
foreach(DictionaryEntry element in internalAttachments) foreach (DictionaryEntry element in internalAttachments)
{ {
Hashtable attachInfo = (Hashtable)element.Value; Hashtable attachInfo = (Hashtable)element.Value;
attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int)element.Key, new UUID((string)attachInfo["item"]), new UUID((string)attachInfo["asset"]))); attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int)element.Key, new UUID((string)attachInfo["item"]), new UUID((string)attachInfo["asset"])));
@ -95,7 +95,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
public void LoadUrl(IObject sender, string message, string url) public void LoadUrl(IObject sender, string message, string url)
{ {
IDialogModule dm = m_rootScene.RequestModuleInterface<IDialogModule>(); IDialogModule dm = m_rootScene.RequestModuleInterface<IDialogModule>();
if(dm != null) if (dm != null)
dm.SendUrlToUser(GetSP().UUID, sender.Name, sender.GlobalID, GetSP().UUID, false, message, url); dm.SendUrlToUser(GetSP().UUID, sender.Name, sender.GlobalID, GetSP().UUID, false, message, url);
} }
#endregion #endregion