diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ccbbeb9..800fc67 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2997,7 +2997,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2997 | public void llRemoveInventory(string name) | 2997 | public void llRemoveInventory(string name) |
2998 | { | 2998 | { |
2999 | m_host.AddScriptLPS(1); | 2999 | m_host.AddScriptLPS(1); |
3000 | NotImplemented("llRemoveInventory"); | 3000 | foreach (TaskInventoryItem item in m_host.TaskInventory.Values) |
3001 | { | ||
3002 | if (item.Name == name) | ||
3003 | { | ||
3004 | m_host.RemoveInventoryItem(item.ItemID); | ||
3005 | return; | ||
3006 | } | ||
3007 | } | ||
3001 | } | 3008 | } |
3002 | 3009 | ||
3003 | public void llSetText(string text, LSL_Types.Vector3 color, double alpha) | 3010 | public void llSetText(string text, LSL_Types.Vector3 color, double alpha) |
@@ -3384,7 +3391,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3384 | // except that it refers to scripting constants | 3391 | // except that it refers to scripting constants |
3385 | private int getScriptPrimType(PrimitiveBaseShape primShape) | 3392 | private int getScriptPrimType(PrimitiveBaseShape primShape) |
3386 | { | 3393 | { |
3387 | if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0) | 3394 | if (primShape.SculptEntry) |
3388 | return ScriptBaseClass.PRIM_TYPE_SCULPT; | 3395 | return ScriptBaseClass.PRIM_TYPE_SCULPT; |
3389 | if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) | 3396 | if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) |
3390 | { | 3397 | { |
@@ -5082,7 +5089,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5082 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | 5089 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) |
5083 | { | 5090 | { |
5084 | m_host.AddScriptLPS(1); | 5091 | m_host.AddScriptLPS(1); |
5085 | NotImplemented("llRemoteLoadScriptPin"); | 5092 | bool found = false; |
5093 | LLUUID destId = LLUUID.Zero; | ||
5094 | LLUUID srcId = LLUUID.Zero; | ||
5095 | |||
5096 | if (!LLUUID.TryParse(target, out destId)) | ||
5097 | { | ||
5098 | llSay(0, "Could not parse key " + target); | ||
5099 | return; | ||
5100 | } | ||
5101 | |||
5102 | // target must be a different prim than the one containing the script | ||
5103 | if (m_host.UUID == destId) | ||
5104 | { | ||
5105 | return; | ||
5106 | } | ||
5107 | |||
5108 | // copy the first script found with this inventory name | ||
5109 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
5110 | { | ||
5111 | if (inv.Value.Name == name) | ||
5112 | { | ||
5113 | // make sure the object is a script | ||
5114 | if (10 == inv.Value.Type) | ||
5115 | { | ||
5116 | found = true; | ||
5117 | srcId = inv.Key; | ||
5118 | break; | ||
5119 | } | ||
5120 | } | ||
5121 | } | ||
5122 | |||
5123 | if (!found) | ||
5124 | { | ||
5125 | llSay(0, "Could not find script " + name); | ||
5126 | return; | ||
5127 | } | ||
5128 | |||
5129 | // the rest of the permission checks are done in RezScript, so check the pin there as well | ||
5130 | World.RezScript(srcId, m_host, destId, pin, running, start_param); | ||
5131 | // this will cause the delay even if the script pin or permissions were wrong - seems ok | ||
5086 | ScriptSleep(3000); | 5132 | ScriptSleep(3000); |
5087 | } | 5133 | } |
5088 | 5134 | ||
@@ -6150,7 +6196,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6150 | if (remain < 1) | 6196 | if (remain < 1) |
6151 | return res; | 6197 | return res; |
6152 | 6198 | ||
6153 | int face = Convert.ToInt32("" + rules.Data[idx++]); | 6199 | int face = Convert.ToInt32(rules.Data[idx++].ToString()); |
6154 | if (face == -1) | 6200 | if (face == -1) |
6155 | face = 0; | 6201 | face = 0; |
6156 | 6202 | ||
@@ -6171,7 +6217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6171 | if (remain < 1) | 6217 | if (remain < 1) |
6172 | return res; | 6218 | return res; |
6173 | 6219 | ||
6174 | face=Convert.ToInt32("" + rules.Data[idx++]); | 6220 | face=Convert.ToInt32(rules.Data[idx++].ToString()); |
6175 | 6221 | ||
6176 | tex = m_host.Shape.Textures; | 6222 | tex = m_host.Shape.Textures; |
6177 | LLColor texcolor; | 6223 | LLColor texcolor; |