aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs91
1 files changed, 4 insertions, 87 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index aea433e..799cb41 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -39,115 +39,32 @@ namespace OpenSim.Region.Environment.Scenes
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 /// <summary> 41 /// <summary>
42 /// Start a given script.
43 /// </summary>
44 /// <param name="localID">
45 /// A <see cref="System.UInt32"/>
46 /// </param>
47 public void StartScript(uint localID, LLUUID itemID)
48 {
49 SceneObjectPart part = GetChildPart(localID);
50 if (part != null)
51 {
52
53 part.StartScript(itemID);
54
55 }
56 else
57 {
58 m_log.ErrorFormat(
59 "[PRIM INVENTORY]: " +
60 "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
61 localID, Name, UUID, itemID);
62 }
63 }
64
65// /// Start a given script.
66// /// </summary>
67// /// <param name="localID">
68// /// A <see cref="System.UInt32"/>
69// /// </param>
70// public void StartScript(LLUUID partID, LLUUID itemID)
71// {
72// SceneObjectPart part = GetChildPart(partID);
73// if (part != null)
74// {
75// part.StartScript(itemID);
76// }
77// else
78// {
79// m_log.ErrorFormat(
80// "[PRIM INVENTORY]: " +
81// "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
82// localID, Name, UUID, itemID);
83// }
84// }
85
86 /// <summary>
87 /// Start the scripts contained in all the prims in this group. 42 /// Start the scripts contained in all the prims in this group.
88 /// </summary> 43 /// </summary>
89 public void StartScripts() 44 public void CreateScriptInstances(int startParam, bool postOnRez)
90 { 45 {
91 // Don't start scripts if they're turned off in the region! 46 // Don't start scripts if they're turned off in the region!
92 if (!((m_scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) 47 if (!((m_scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts))
93 { 48 {
94 foreach (SceneObjectPart part in m_parts.Values) 49 foreach (SceneObjectPart part in m_parts.Values)
95 { 50 {
96 part.StartScripts(); 51 part.CreateScriptInstances(startParam, postOnRez);
97 } 52 }
98 } 53 }
99 } 54 }
100 55
101 /// <summary> 56 public void RemoveScriptInstances()
102 /// Start the scripts contained in all the prims in this group.
103 /// </summary>
104 public void StartScripts(int param)
105 {
106 // Don't start scripts if they're turned off in the region!
107 if (!((m_scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts))
108 {
109 foreach (SceneObjectPart part in m_parts.Values)
110 {
111 part.StartScripts(param);
112 }
113 }
114 }
115
116 public void StopScripts()
117 { 57 {
118 lock (m_parts) 58 lock (m_parts)
119 { 59 {
120 foreach (SceneObjectPart part in m_parts.Values) 60 foreach (SceneObjectPart part in m_parts.Values)
121 { 61 {
122 part.StopScripts(); 62 part.RemoveScriptInstances();
123 } 63 }
124 } 64 }
125 } 65 }
126 66
127 /// <summary> 67 /// <summary>
128 /// Start a given script.
129 /// </summary>
130 /// <param name="localID">
131 /// A <see cref="System.UInt32"/>
132 /// </param>
133 public void StopScript(uint partID, LLUUID itemID)
134 {
135 SceneObjectPart part = GetChildPart(partID);
136 if (part != null)
137 {
138 part.StopScript(itemID);
139 part.RemoveScriptEvents(itemID);
140 }
141 else
142 {
143 m_log.ErrorFormat(
144 "[PRIM INVENTORY]: " +
145 "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}",
146 partID, Name, UUID, itemID);
147 }
148 }
149
150 /// <summary>
151 /// 68 ///
152 /// </summary> 69 /// </summary>
153 /// <param name="remoteClient"></param> 70 /// <param name="remoteClient"></param>