diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d9ee94c..e8ffe0e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -125,6 +125,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | } | 125 | } |
126 | } | 126 | } |
127 | } | 127 | } |
128 | |||
129 | public void StopScripts() | ||
130 | { | ||
131 | lock (m_taskInventory) | ||
132 | { | ||
133 | foreach (TaskInventoryItem item in m_taskInventory.Values) | ||
134 | { | ||
135 | if (10 == item.Type) | ||
136 | { | ||
137 | StopScript(item.ItemID); | ||
138 | } | ||
139 | } | ||
140 | } | ||
141 | } | ||
128 | 142 | ||
129 | /// <summary> | 143 | /// <summary> |
130 | /// Start a script which is in this prim's inventory. | 144 | /// Start a script which is in this prim's inventory. |
@@ -144,6 +158,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | { | 158 | { |
145 | string script = Helpers.FieldToUTF8String(rezAsset.Data); | 159 | string script = Helpers.FieldToUTF8String(rezAsset.Data); |
146 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); | 160 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); |
161 | |||
147 | } | 162 | } |
148 | else | 163 | else |
149 | { | 164 | { |
@@ -167,6 +182,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
167 | if (m_taskInventory.ContainsKey(itemId)) | 182 | if (m_taskInventory.ContainsKey(itemId)) |
168 | { | 183 | { |
169 | StartScript(m_taskInventory[itemId]); | 184 | StartScript(m_taskInventory[itemId]); |
185 | m_parentGroup.AddActiveScriptCount(1); | ||
170 | } | 186 | } |
171 | else | 187 | else |
172 | { | 188 | { |
@@ -187,6 +203,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
187 | if (m_taskInventory.ContainsKey(itemId)) | 203 | if (m_taskInventory.ContainsKey(itemId)) |
188 | { | 204 | { |
189 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); | 205 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); |
206 | m_parentGroup.AddActiveScriptCount(-1); | ||
190 | } | 207 | } |
191 | else | 208 | else |
192 | { | 209 | { |
@@ -295,6 +312,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
295 | return false; | 312 | return false; |
296 | } | 313 | } |
297 | 314 | ||
315 | public void AddScriptLPS(int count) | ||
316 | { | ||
317 | m_parentGroup.AddScriptLPS(count); | ||
318 | } | ||
319 | |||
298 | /// <summary> | 320 | /// <summary> |
299 | /// Remove an item from this prim's inventory | 321 | /// Remove an item from this prim's inventory |
300 | /// </summary> | 322 | /// </summary> |