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