aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv2012-09-22 17:44:48 +0100
committerJustin Clark-Casey (justincc)2012-09-24 22:44:37 +0100
commit1cfd63d0b4bfdd1318d55b8d1c70ab25d101328d (patch)
tree94a92c166ebc331cb9c614322c8baf7783898964 /OpenSim
parentRemove deprecated parameters for region_id. (diff)
downloadopensim-SC_OLD-1cfd63d0b4bfdd1318d55b8d1c70ab25d101328d.zip
opensim-SC_OLD-1cfd63d0b4bfdd1318d55b8d1c70ab25d101328d.tar.gz
opensim-SC_OLD-1cfd63d0b4bfdd1318d55b8d1c70ab25d101328d.tar.bz2
opensim-SC_OLD-1cfd63d0b4bfdd1318d55b8d1c70ab25d101328d.tar.xz
Documenting LSL script-related events
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs149
1 files changed, 147 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 96e9797..22d395c 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -460,36 +460,170 @@ namespace OpenSim.Region.Framework.Scenes
460 } 460 }
461 461
462 /// <summary> 462 /// <summary>
463 /// Triggered when some scene object properties change.
464 /// </summary>
465 /// <remarks>
463 /// ScriptChangedEvent is fired when a scene object property that a script might be interested 466 /// ScriptChangedEvent is fired when a scene object property that a script might be interested
464 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. 467 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event.
465 /// This is not an indication that the script has changed (see OnUpdateScript for that). 468 /// This is not an indication that the script has changed (see OnUpdateScript for that).
466 /// This event is sent to a script to tell it that some property changed on 469 /// This event is sent to a script to tell it that some property changed on
467 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . 470 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed .
468 /// </summary> 471 /// Triggered by <see cref="TriggerOnScriptChangedEvent"/>
472 /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>,
473 /// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/>
474 /// </remarks>
469 public event ScriptChangedEvent OnScriptChangedEvent; 475 public event ScriptChangedEvent OnScriptChangedEvent;
470 public delegate void ScriptChangedEvent(uint localID, uint change); 476 public delegate void ScriptChangedEvent(uint localID, uint change);
471 477
472 public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); 478 public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed);
479
480 /// <summary>
481 /// Triggered when a script receives control input from an agent.
482 /// </summary>
483 /// <remarks>
484 /// Triggered by <see cref="TriggerControlEvent"/>
485 /// in <see cref="ScenePresence.SendControlsToScripts"/>
486 /// via <see cref="ScenePresence.HandleAgentUpdate"/>
487 /// via <see cref="OpenSim.Framework.IClientAPI.OnAgentUpdate"/>
488 /// via <see cref="OpenSim.Region.ClientStack.LindenUDP.LLClientView.HandleAgentUpdate"/>
489 /// </remarks>
473 public event ScriptControlEvent OnScriptControlEvent; 490 public event ScriptControlEvent OnScriptControlEvent;
474 491
475 public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); 492 public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
493
494 /// <summary>
495 /// Triggered when an object has arrived within a tolerance distance
496 /// of a motion target.
497 /// </summary>
498 /// <remarks>
499 /// Triggered by <see cref="TriggerAtTargetEvent"/>
500 /// in <see cref="SceneObjectGroup.checkAtTargets"/>
501 /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>,
502 /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/>
503 /// </remarks>
476 public event ScriptAtTargetEvent OnScriptAtTargetEvent; 504 public event ScriptAtTargetEvent OnScriptAtTargetEvent;
477 505
478 public delegate void ScriptNotAtTargetEvent(uint localID); 506 public delegate void ScriptNotAtTargetEvent(uint localID);
507
508 /// <summary>
509 /// Triggered when an object has a motion target but has not arrived
510 /// within a tolerance distance.
511 /// </summary>
512 /// <remarks>
513 /// Triggered by <see cref="TriggerNotAtTargetEvent"/>
514 /// in <see cref="SceneObjectGroup.checkAtTargets"/>
515 /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>,
516 /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/>
517 /// </remarks>
479 public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; 518 public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent;
480 519
481 public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); 520 public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot);
521
522 /// <summary>
523 /// Triggered when an object has arrived within a tolerance rotation
524 /// of a rotation target.
525 /// </summary>
526 /// <remarks>
527 /// Triggered by <see cref="TriggerAtRotTargetEvent"/>
528 /// in <see cref="SceneObjectGroup.checkAtTargets"/>
529 /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>,
530 /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/>
531 /// </remarks>
482 public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; 532 public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent;
483 533
484 public delegate void ScriptNotAtRotTargetEvent(uint localID); 534 public delegate void ScriptNotAtRotTargetEvent(uint localID);
535
536 /// <summary>
537 /// Triggered when an object has a rotation target but has not arrived
538 /// within a tolerance rotation.
539 /// </summary>
540 /// <remarks>
541 /// Triggered by <see cref="TriggerNotAtRotTargetEvent"/>
542 /// in <see cref="SceneObjectGroup.checkAtTargets"/>
543 /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>,
544 /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/>
545 /// </remarks>
485 public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; 546 public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent;
486 547
487 public delegate void ScriptColliding(uint localID, ColliderArgs colliders); 548 public delegate void ScriptColliding(uint localID, ColliderArgs colliders);
549
550 /// <summary>
551 /// Triggered when a physical collision has started between a prim
552 /// and something other than the region terrain.
553 /// </summary>
554 /// <remarks>
555 /// Triggered by <see cref="TriggerScriptCollidingStart"/>
556 /// in <see cref="SceneObjectPart.SendCollisionEvent"/>
557 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
558 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
559 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
560 /// </remarks>
488 public event ScriptColliding OnScriptColliderStart; 561 public event ScriptColliding OnScriptColliderStart;
562
563 /// <summary>
564 /// Triggered when something that previously collided with a prim has
565 /// not stopped colliding with it.
566 /// </summary>
567 /// <remarks>
568 /// <seealso cref="OnScriptColliderStart"/>
569 /// Triggered by <see cref="TriggerScriptColliding"/>
570 /// in <see cref="SceneObjectPart.SendCollisionEvent"/>
571 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
572 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
573 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
574 /// </remarks>
489 public event ScriptColliding OnScriptColliding; 575 public event ScriptColliding OnScriptColliding;
576
577 /// <summary>
578 /// Triggered when something that previously collided with a prim has
579 /// stopped colliding with it.
580 /// </summary>
581 /// <remarks>
582 /// Triggered by <see cref="TriggerScriptCollidingEnd"/>
583 /// in <see cref="SceneObjectPart.SendCollisionEvent"/>
584 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
585 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
586 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
587 /// </remarks>
490 public event ScriptColliding OnScriptCollidingEnd; 588 public event ScriptColliding OnScriptCollidingEnd;
589
590 /// <summary>
591 /// Triggered when a physical collision has started between an object
592 /// and the region terrain.
593 /// </summary>
594 /// <remarks>
595 /// Triggered by <see cref="TriggerScriptLandCollidingStart"/>
596 /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
597 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
598 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
599 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
600 /// </remarks>
491 public event ScriptColliding OnScriptLandColliderStart; 601 public event ScriptColliding OnScriptLandColliderStart;
602
603 /// <summary>
604 /// Triggered when an object that previously collided with the region
605 /// terrain has not yet stopped colliding with it.
606 /// </summary>
607 /// <remarks>
608 /// Triggered by <see cref="TriggerScriptLandColliding"/>
609 /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
610 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
611 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
612 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
613 /// </remarks>
492 public event ScriptColliding OnScriptLandColliding; 614 public event ScriptColliding OnScriptLandColliding;
615
616 /// <summary>
617 /// Triggered when an object that previously collided with the region
618 /// terrain has stopped colliding with it.
619 /// </summary>
620 /// <remarks>
621 /// Triggered by <see cref="TriggerScriptLandCollidingEnd"/>
622 /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
623 /// via <see cref="SceneObjectPart.PhysicsCollision"/>
624 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
625 /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
626 /// </remarks>
493 public event ScriptColliding OnScriptLandColliderEnd; 627 public event ScriptColliding OnScriptLandColliderEnd;
494 628
495 public delegate void OnMakeChildAgentDelegate(ScenePresence presence); 629 public delegate void OnMakeChildAgentDelegate(ScenePresence presence);
@@ -550,6 +684,13 @@ namespace OpenSim.Region.Framework.Scenes
550 684
551 /* 685 /*
552 public delegate void ScriptTimerEvent(uint localID, double timerinterval); 686 public delegate void ScriptTimerEvent(uint localID, double timerinterval);
687 /// <summary>
688 /// Used to be triggered when the LSL timer event fires.
689 /// </summary>
690 /// <remarks>
691 /// Triggered by <see cref="TriggerTimerEvent"/>
692 /// via <see cref="SceneObjectPart.handleTimerAccounting"/>
693 /// </remarks>
553 public event ScriptTimerEvent OnScriptTimerEvent; 694 public event ScriptTimerEvent OnScriptTimerEvent;
554 */ 695 */
555 696
@@ -2293,7 +2434,11 @@ namespace OpenSim.Region.Framework.Scenes
2293 } 2434 }
2294 } 2435 }
2295 2436
2296 // this lets us keep track of nasty script events like timer, etc. 2437 /// <summary>
2438 /// this lets us keep track of nasty script events like timer, etc.
2439 /// </summary>
2440 /// <param name="objLocalID"></param>
2441 /// <param name="Interval"></param>
2297 public void TriggerTimerEvent(uint objLocalID, double Interval) 2442 public void TriggerTimerEvent(uint objLocalID, double Interval)
2298 { 2443 {
2299 throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak"); 2444 throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak");