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>
internal static InventoryItem FromInterface(IInventoryItem i)
{
if(typeof(InventoryItem).IsAssignableFrom(i.GetType()))
if (typeof(InventoryItem).IsAssignableFrom(i.GetType()))
{
return (InventoryItem)i;
}
@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
AssetBase a = m_rootSceene.AssetService.Get(AssetID.ToString());
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");
result.AssetData = a.Data;

View File

@ -57,8 +57,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
/// </description>
private void SynchronizeDictionaries()
{
foreach(TaskInventoryItem privateItem in m_privateInventory.Values)
if(!m_publicInventory.ContainsKey(privateItem.ItemID))
foreach (TaskInventoryItem privateItem in m_privateInventory.Values)
if (!m_publicInventory.ContainsKey(privateItem.ItemID))
m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem));
}
@ -85,13 +85,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
value = null;
bool result = false;
if(!m_publicInventory.TryGetValue(key, out value))
if (!m_publicInventory.TryGetValue(key, out value))
{
// wasn't found in the public inventory
TaskInventoryItem privateItem;
result = m_privateInventory.TryGetValue(key, out privateItem);
if(result)
if (result)
{
value = new InventoryItem(m_rootScene, privateItem);
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 {
IInventoryItem result;
if(TryGetValue(key, out result))
if (TryGetValue(key, out result))
return result;
else
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]
{
get {
foreach(TaskInventoryItem i in m_privateInventory.Values)
if(i.Name == name)
foreach (TaskInventoryItem i in m_privateInventory.Values)
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));
return m_publicInventory[i.ItemID];

View File

@ -79,9 +79,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
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;
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)
{
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);
}
#endregion