EventManager.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSim Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections.Generic;
  29. using libsecondlife;
  30. using OpenSim.Framework;
  31. using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
  32. using OpenSim.Region.Environment;
  33. using OpenSim.Region;
  34. using OpenSim.Region.Environment.Scenes;
  35. using OpenSim.Region.Environment.Interfaces;
  36. namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
  37. {
  38. /// <summary>
  39. /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it.
  40. /// </summary>
  41. [Serializable]
  42. public class EventManager : ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule
  43. {
  44. //
  45. // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine".
  46. // This class needs a bit of explaining:
  47. //
  48. // This class it the link between an event inside OpenSim and the corresponding event in a user script being executed.
  49. //
  50. // For example when an user touches an object then the "myScriptEngine.World.EventManager.OnObjectGrab" event is fired inside OpenSim.
  51. // We hook up to this event and queue a touch_start in EventQueueManager with the proper LSL parameters.
  52. // It will then be delivered to the script by EventQueueManager.
  53. //
  54. // You can check debug C# dump of an LSL script if you need to verify what exact parameters are needed.
  55. //
  56. private ScriptEngine myScriptEngine;
  57. //public IScriptHost TEMP_OBJECT_ID;
  58. public EventManager(ScriptEngine _ScriptEngine, bool performHookUp)
  59. {
  60. myScriptEngine = _ScriptEngine;
  61. ReadConfig();
  62. // Hook up to events from OpenSim
  63. // We may not want to do it because someone is controlling us and will deliver events to us
  64. if (performHookUp)
  65. {
  66. myScriptEngine.Log.Info("[" + myScriptEngine.ScriptEngineName + "]: Hooking up to server events");
  67. myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
  68. myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end;
  69. myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
  70. myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
  71. myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
  72. myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target;
  73. myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target;
  74. myScriptEngine.World.EventManager.OnScriptControlEvent += control;
  75. myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
  76. myScriptEngine.World.EventManager.OnScriptColliding += collision;
  77. myScriptEngine.World.EventManager.OnScriptCollidingEnd += collision_end;
  78. // TODO: HOOK ALL EVENTS UP TO SERVER!
  79. IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>();
  80. if (money != null)
  81. {
  82. money.OnObjectPaid+=HandleObjectPaid;
  83. }
  84. }
  85. }
  86. public void ReadConfig()
  87. {
  88. }
  89. private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount)
  90. {
  91. SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID);
  92. if (part != null)
  93. {
  94. money(part.LocalId, agentID, amount);
  95. }
  96. }
  97. public void changed(uint localID, uint change)
  98. {
  99. // Add to queue for all scripts in localID, Object pass change.
  100. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(change) });
  101. }
  102. public void state_entry(uint localID)
  103. {
  104. // Add to queue for all scripts in ObjectID object
  105. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
  106. }
  107. public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
  108. {
  109. // Add to queue for all scripts in ObjectID object
  110. EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
  111. detstruct._key = new LSL_Types.key[1];
  112. detstruct._key2 = new LSL_Types.key[1];
  113. detstruct._string = new string[1];
  114. detstruct._Vector3 = new LSL_Types.Vector3[1];
  115. detstruct._Vector32 = new LSL_Types.Vector3[1];
  116. detstruct._Quaternion = new LSL_Types.Quaternion[1];
  117. detstruct._int = new int[1];
  118. ScenePresence av = myScriptEngine.World.GetScenePresence(remoteClient.AgentId);
  119. if (av != null)
  120. {
  121. detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  122. detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  123. detstruct._string[0] = remoteClient.Name;
  124. detstruct._int[0] = 0;
  125. detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x,av.Rotation.y,av.Rotation.z,av.Rotation.w);
  126. detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z);
  127. detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z);
  128. }
  129. else
  130. {
  131. detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  132. detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  133. detstruct._string[0] = remoteClient.Name;
  134. detstruct._int[0] = 0;
  135. detstruct._Quaternion[0] = new LSL_Types.Quaternion(0, 0, 0, 1);
  136. detstruct._Vector3[0] = new LSL_Types.Vector3(0, 0, 0);
  137. detstruct._Vector32[0] = new LSL_Types.Vector3(0, 0, 0);
  138. }
  139. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
  140. }
  141. public void touch_end(uint localID, IClientAPI remoteClient)
  142. {
  143. // Add to queue for all scripts in ObjectID object
  144. EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
  145. detstruct._key = new LSL_Types.key[1];
  146. detstruct._key2 = new LSL_Types.key[1];
  147. detstruct._string = new string[1];
  148. detstruct._Vector3 = new LSL_Types.Vector3[1];
  149. detstruct._Vector32 = new LSL_Types.Vector3[1];
  150. detstruct._Quaternion = new LSL_Types.Quaternion[1];
  151. detstruct._int = new int[1];
  152. ScenePresence av = myScriptEngine.World.GetScenePresence(remoteClient.AgentId);
  153. if (av != null)
  154. {
  155. detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  156. detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  157. detstruct._string[0] = remoteClient.Name;
  158. detstruct._int[0] = 0;
  159. detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w);
  160. detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z);
  161. detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z);
  162. }
  163. else
  164. {
  165. detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  166. detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
  167. detstruct._string[0] = remoteClient.Name;
  168. detstruct._int[0] = 0;
  169. detstruct._Quaternion[0] = new LSL_Types.Quaternion(0, 0, 0, 1);
  170. detstruct._Vector3[0] = new LSL_Types.Vector3(0, 0, 0);
  171. detstruct._Vector32[0] = new LSL_Types.Vector3(0, 0, 0);
  172. }
  173. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
  174. }
  175. public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez)
  176. {
  177. Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " +
  178. script.Length);
  179. myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez);
  180. }
  181. public void OnRemoveScript(uint localID, LLUUID itemID)
  182. {
  183. Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
  184. myScriptEngine.m_ScriptManager.StopScript(
  185. localID,
  186. itemID
  187. );
  188. }
  189. public void money(uint localID, LLUUID agentID, int amount)
  190. {
  191. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) });
  192. }
  193. // TODO: Replace placeholders below
  194. // NOTE! THE PARAMETERS FOR THESE FUNCTIONS ARE NOT CORRECT!
  195. // These needs to be hooked up to OpenSim during init of this class
  196. // then queued in EventQueueManager.
  197. // When queued in EventQueueManager they need to be LSL compatible (name and params)
  198. public void state_exit(uint localID)
  199. {
  200. // Add to queue for all scripts in ObjectID object
  201. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { });
  202. }
  203. public void touch(uint localID, LLUUID itemID)
  204. {
  205. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull);
  206. }
  207. public void touch_end(uint localID, LLUUID itemID)
  208. {
  209. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
  210. }
  211. public void collision_start(uint localID, ColliderArgs col)
  212. {
  213. EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
  214. detstruct._string = new string[col.Colliders.Count];
  215. detstruct._Quaternion = new LSL_Types.Quaternion[col.Colliders.Count];
  216. detstruct._int = new int[col.Colliders.Count];
  217. detstruct._key = new LSL_Types.key[col.Colliders.Count];
  218. detstruct._key2 = new LSL_Types.key[col.Colliders.Count];
  219. detstruct._Vector3 = new LSL_Types.Vector3[col.Colliders.Count];
  220. detstruct._Vector32 = new LSL_Types.Vector3[col.Colliders.Count];
  221. detstruct._bool = new bool[col.Colliders.Count];
  222. int i = 0;
  223. foreach (DetectedObject detobj in col.Colliders)
  224. {
  225. detstruct._key[i] = new LSL_Types.key(detobj.keyUUID.ToString());
  226. detstruct._key2[i] = new LSL_Types.key(detobj.ownerUUID.ToString());
  227. detstruct._Quaternion[i] = new LSL_Types.Quaternion(detobj.rotQuat.X, detobj.rotQuat.Y, detobj.rotQuat.Z, detobj.rotQuat.W);
  228. detstruct._string[i] = detobj.nameStr;
  229. detstruct._int[i] = detobj.colliderType;
  230. detstruct._Vector3[i] = new LSL_Types.Vector3(detobj.posVector.X, detobj.posVector.Y, detobj.posVector.Z);
  231. detstruct._Vector32[i] = new LSL_Types.Vector3(detobj.velVector.X, detobj.velVector.Y, detobj.velVector.Z);
  232. detstruct._bool[i] = true; // Apparently the script engine uses this to see if this is a valid entry...
  233. i++;
  234. }
  235. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_start", detstruct, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
  236. }
  237. public void collision(uint localID, ColliderArgs col)
  238. {
  239. EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
  240. detstruct._string = new string[col.Colliders.Count];
  241. detstruct._Quaternion = new LSL_Types.Quaternion[col.Colliders.Count];
  242. detstruct._int = new int[col.Colliders.Count];
  243. detstruct._key = new LSL_Types.key[col.Colliders.Count];
  244. detstruct._key2 = new LSL_Types.key[col.Colliders.Count];
  245. detstruct._Vector3 = new LSL_Types.Vector3[col.Colliders.Count];
  246. detstruct._Vector32 = new LSL_Types.Vector3[col.Colliders.Count];
  247. detstruct._bool = new bool[col.Colliders.Count];
  248. int i = 0;
  249. foreach (DetectedObject detobj in col.Colliders)
  250. {
  251. detstruct._key[i] = new LSL_Types.key(detobj.keyUUID.ToString());
  252. detstruct._key2[i] = new LSL_Types.key(detobj.ownerUUID.ToString());
  253. detstruct._Quaternion[i] = new LSL_Types.Quaternion(detobj.rotQuat.X, detobj.rotQuat.Y, detobj.rotQuat.Z, detobj.rotQuat.W);
  254. detstruct._string[i] = detobj.nameStr;
  255. detstruct._int[i] = detobj.colliderType;
  256. detstruct._Vector3[i] = new LSL_Types.Vector3(detobj.posVector.X, detobj.posVector.Y, detobj.posVector.Z);
  257. detstruct._Vector32[i] = new LSL_Types.Vector3(detobj.velVector.X, detobj.velVector.Y, detobj.velVector.Z);
  258. detstruct._bool[i] = true; // Apparently the script engine uses this to see if this is a valid entry... i++;
  259. }
  260. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision", detstruct, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
  261. }
  262. public void collision_end(uint localID, ColliderArgs col)
  263. {
  264. EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
  265. detstruct._string = new string[col.Colliders.Count];
  266. detstruct._Quaternion = new LSL_Types.Quaternion[col.Colliders.Count];
  267. detstruct._int = new int[col.Colliders.Count];
  268. detstruct._key = new LSL_Types.key[col.Colliders.Count];
  269. detstruct._key2 = new LSL_Types.key[col.Colliders.Count];
  270. detstruct._Vector3 = new LSL_Types.Vector3[col.Colliders.Count];
  271. detstruct._Vector32 = new LSL_Types.Vector3[col.Colliders.Count];
  272. detstruct._bool = new bool[col.Colliders.Count];
  273. int i = 0;
  274. foreach (DetectedObject detobj in col.Colliders)
  275. {
  276. detstruct._key[i] = new LSL_Types.key(detobj.keyUUID.ToString());
  277. detstruct._key2[i] = new LSL_Types.key(detobj.ownerUUID.ToString());
  278. detstruct._Quaternion[i] = new LSL_Types.Quaternion(detobj.rotQuat.X, detobj.rotQuat.Y, detobj.rotQuat.Z, detobj.rotQuat.W);
  279. detstruct._string[i] = detobj.nameStr;
  280. detstruct._int[i] = detobj.colliderType;
  281. detstruct._Vector3[i] = new LSL_Types.Vector3(detobj.posVector.X, detobj.posVector.Y, detobj.posVector.Z);
  282. detstruct._Vector32[i] = new LSL_Types.Vector3(detobj.velVector.X, detobj.velVector.Y, detobj.velVector.Z);
  283. detstruct._bool[i] = true; // Apparently the script engine uses this to see if this is a valid entry...
  284. i++;
  285. }
  286. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
  287. }
  288. public void land_collision_start(uint localID, LLUUID itemID)
  289. {
  290. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull);
  291. }
  292. public void land_collision(uint localID, ColliderArgs col)
  293. {
  294. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull);
  295. }
  296. public void land_collision_end(uint localID, LLUUID itemID)
  297. {
  298. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull);
  299. }
  300. // Handled by long commands
  301. public void timer(uint localID, LLUUID itemID)
  302. {
  303. //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty);
  304. }
  305. public void listen(uint localID, LLUUID itemID)
  306. {
  307. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull);
  308. }
  309. public void on_rez(uint localID, LLUUID itemID)
  310. {
  311. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull);
  312. }
  313. public void sensor(uint localID, LLUUID itemID)
  314. {
  315. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull);
  316. }
  317. public void no_sensor(uint localID, LLUUID itemID)
  318. {
  319. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull);
  320. }
  321. public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change)
  322. {
  323. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)});
  324. }
  325. public void email(uint localID, LLUUID itemID)
  326. {
  327. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull);
  328. }
  329. public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos)
  330. {
  331. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) });
  332. }
  333. public void not_at_target(uint localID)
  334. {
  335. myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull);
  336. }
  337. public void at_rot_target(uint localID, LLUUID itemID)
  338. {
  339. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull);
  340. }
  341. public void not_at_rot_target(uint localID, LLUUID itemID)
  342. {
  343. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull);
  344. }
  345. public void run_time_permissions(uint localID, LLUUID itemID)
  346. {
  347. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull);
  348. }
  349. public void changed(uint localID, LLUUID itemID)
  350. {
  351. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull);
  352. }
  353. public void attach(uint localID, LLUUID itemID)
  354. {
  355. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull);
  356. }
  357. public void dataserver(uint localID, LLUUID itemID)
  358. {
  359. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull);
  360. }
  361. public void link_message(uint localID, LLUUID itemID)
  362. {
  363. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull);
  364. }
  365. public void moving_start(uint localID, LLUUID itemID)
  366. {
  367. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull);
  368. }
  369. public void moving_end(uint localID, LLUUID itemID)
  370. {
  371. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull);
  372. }
  373. public void object_rez(uint localID, LLUUID itemID)
  374. {
  375. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull);
  376. }
  377. public void remote_data(uint localID, LLUUID itemID)
  378. {
  379. myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull);
  380. }
  381. // Handled by long commands
  382. public void http_response(uint localID, LLUUID itemID)
  383. {
  384. // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull);
  385. }
  386. /// <summary>
  387. /// If set to true then threads and stuff should try to make a graceful exit
  388. /// </summary>
  389. public bool PleaseShutdown
  390. {
  391. get { return _PleaseShutdown; }
  392. set { _PleaseShutdown = value; }
  393. }
  394. private bool _PleaseShutdown = false;
  395. }
  396. }