Formatting cleanup.
parent
a0a44d8ebc
commit
1d01d6d919
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue