* Library scripts can now be dragged into prims
* Unfortunately, they show us as non modify, though they will run * We're probably hitting unimplement permissions stuffThreadPoolClientBranch
parent
2df8918aed
commit
0325e6ee6a
|
@ -549,7 +549,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//group.AddInventoryItem(remoteClient, primLocalID, null);
|
//group.AddInventoryItem(remoteClient, primLocalID, null);
|
||||||
MainLog.Instance.Verbose(
|
MainLog.Instance.Verbose(
|
||||||
"PRIMINVENTORY",
|
"PRIMINVENTORY",
|
||||||
"UpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}",
|
"Non script prim inventory not yet implemented!"
|
||||||
|
+ "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}",
|
||||||
itemID, folderID, primLocalID, remoteClient.Name);
|
itemID, folderID, primLocalID, remoteClient.Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -569,13 +570,23 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="localID"></param>
|
/// <param name="localID"></param>
|
||||||
public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
||||||
{
|
{
|
||||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
|
||||||
LLUUID copyID = LLUUID.Random();
|
LLUUID copyID = LLUUID.Random();
|
||||||
if (userInfo != null)
|
|
||||||
|
if (itemID != LLUUID.Zero)
|
||||||
{
|
{
|
||||||
if (userInfo.RootFolder != null)
|
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||||
|
|
||||||
|
if (userInfo != null && userInfo.RootFolder != null)
|
||||||
{
|
{
|
||||||
InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
|
InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
|
||||||
|
|
||||||
|
// Try library
|
||||||
|
// XXX clumsy, possibly should be one call
|
||||||
|
if (null == item)
|
||||||
|
{
|
||||||
|
item = CommsManager.UserProfileCacheService.libraryRoot.HasItem(itemID);
|
||||||
|
}
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(localID);
|
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||||
|
@ -584,11 +595,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
group.AddInventoryItem(remoteClient, localID, item, copyID);
|
group.AddInventoryItem(remoteClient, localID, item, copyID);
|
||||||
group.StartScript(localID, copyID);
|
group.StartScript(localID, copyID);
|
||||||
group.GetProperites(remoteClient);
|
group.GetProperites(remoteClient);
|
||||||
|
|
||||||
MainLog.Instance.Verbose(
|
// MainLog.Instance.Verbose(
|
||||||
"PRIMINVENTORY",
|
// "PRIMINVENTORY",
|
||||||
"Rezzed script {0} into prim local ID {1} for user {2}",
|
// "Rezzed script {0} into prim local ID {1} for user {2}",
|
||||||
item.inventoryName, localID, remoteClient.Name);
|
// item.inventoryName, localID, remoteClient.Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -607,6 +618,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else // If the itemID is zero then the script has been rezzed directly in an object's inventory
|
||||||
|
{
|
||||||
|
// not yet implemented
|
||||||
|
// TODO Need to get more details from original RezScript packet
|
||||||
|
// XXX jc tmp
|
||||||
|
// AssetBase asset = CreateAsset("chimney sweep", "sailor.lsl", 10, 10, null);
|
||||||
|
// AssetCache.AddAsset(asset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue