aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie2013-01-16 15:47:55 +0000
committerMelanie2013-01-16 15:47:55 +0000
commit818254916cb562422b3a3301b9f35fafd64ee3fe (patch)
treee8655f6472b305d43a2f23059c375c90e7004a2b /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-818254916cb562422b3a3301b9f35fafd64ee3fe.zip
opensim-SC-818254916cb562422b3a3301b9f35fafd64ee3fe.tar.gz
opensim-SC-818254916cb562422b3a3301b9f35fafd64ee3fe.tar.bz2
opensim-SC-818254916cb562422b3a3301b9f35fafd64ee3fe.tar.xz
JustinCC's core re-merge
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 65c50bf..9f0a0e2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1783,6 +1783,21 @@ namespace OpenSim.Region.Framework.Scenes
1783 /// <returns>The part where the script was rezzed if successful. False otherwise.</returns> 1783 /// <returns>The part where the script was rezzed if successful. False otherwise.</returns>
1784 public SceneObjectPart RezNewScript(UUID agentID, InventoryItemBase itemBase) 1784 public SceneObjectPart RezNewScript(UUID agentID, InventoryItemBase itemBase)
1785 { 1785 {
1786 return RezNewScript(
1787 agentID,
1788 itemBase,
1789 "default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}");
1790 }
1791
1792 /// <summary>
1793 /// Rez a new script from nothing with given script text.
1794 /// </summary>
1795 /// <param name="remoteClient"></param>
1796 /// <param name="itemBase">Template item.</param>
1797 /// <param name="scriptText"></param>
1798 /// <returns>The part where the script was rezzed if successful. False otherwise.</returns>
1799 public SceneObjectPart RezNewScript(UUID agentID, InventoryItemBase itemBase, string scriptText)
1800 {
1786 // The part ID is the folder ID! 1801 // The part ID is the folder ID!
1787 SceneObjectPart part = GetSceneObjectPart(itemBase.Folder); 1802 SceneObjectPart part = GetSceneObjectPart(itemBase.Folder);
1788 if (part == null) 1803 if (part == null)
@@ -1802,9 +1817,14 @@ namespace OpenSim.Region.Framework.Scenes
1802 return null; 1817 return null;
1803 } 1818 }
1804 1819
1805 AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, 1820 AssetBase asset
1806 Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n\n touch_start(integer num)\n {\n }\n}"), 1821 = CreateAsset(
1807 agentID); 1822 itemBase.Name,
1823 itemBase.Description,
1824 (sbyte)itemBase.AssetType,
1825 Encoding.ASCII.GetBytes(scriptText),
1826 agentID);
1827
1808 AssetService.Store(asset); 1828 AssetService.Store(asset);
1809 1829
1810 TaskInventoryItem taskItem = new TaskInventoryItem(); 1830 TaskInventoryItem taskItem = new TaskInventoryItem();