aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs89
1 files changed, 88 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
index 2be5ab9..47dd0bc 100644
--- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Scenes
582 582
583 #endregion 583 #endregion
584 584
585 #region RUN SCRIPT 585 #region RUN SCRIPT (When Script Placed in Object)
586 public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); 586 public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene);
587 private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>(); 587 private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>();
588 588
@@ -611,6 +611,93 @@ namespace OpenSim.Region.Environment.Scenes
611 611
612 #endregion 612 #endregion
613 613
614 #region START SCRIPT (When Script run box is Checked after placed in object)
615 public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene);
616 private List<CanStartScript> CanStartScriptCheckFunctions = new List<CanStartScript>();
617
618 public void addCheckStartScript(CanStartScript delegateFunc)
619 {
620 if (!CanStartScriptCheckFunctions.Contains(delegateFunc))
621 CanStartScriptCheckFunctions.Add(delegateFunc);
622 }
623 public void removeCheckStartScript(CanStartScript delegateFunc)
624 {
625 if (CanStartScriptCheckFunctions.Contains(delegateFunc))
626 CanStartScriptCheckFunctions.Remove(delegateFunc);
627 }
628
629 public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user)
630 {
631 foreach (CanStartScript check in CanStartScriptCheckFunctions)
632 {
633 if (check(script, user, m_scene) == false)
634 {
635 return false;
636 }
637 }
638 return true;
639 }
640
641 #endregion
642
643 #region STOP SCRIPT (When Script run box is unchecked after placed in object)
644 public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene);
645 private List<CanStopScript> CanStopScriptCheckFunctions = new List<CanStopScript>();
646
647 public void addCheckStopScript(CanStopScript delegateFunc)
648 {
649 if (!CanStopScriptCheckFunctions.Contains(delegateFunc))
650 CanStopScriptCheckFunctions.Add(delegateFunc);
651 }
652 public void removeCheckStopScript(CanStopScript delegateFunc)
653 {
654 if (CanStopScriptCheckFunctions.Contains(delegateFunc))
655 CanStopScriptCheckFunctions.Remove(delegateFunc);
656 }
657
658 public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user)
659 {
660 foreach (CanStopScript check in CanStopScriptCheckFunctions)
661 {
662 if (check(script, user, m_scene) == false)
663 {
664 return false;
665 }
666 }
667 return true;
668 }
669
670 #endregion
671
672 #region RESET SCRIPT
673 public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene);
674 private List<CanResetScript> CanResetScriptCheckFunctions = new List<CanResetScript>();
675
676 public void addCheckResetScript(CanResetScript delegateFunc)
677 {
678 if (!CanResetScriptCheckFunctions.Contains(delegateFunc))
679 CanResetScriptCheckFunctions.Add(delegateFunc);
680 }
681 public void removeCheckResetScript(CanResetScript delegateFunc)
682 {
683 if (CanResetScriptCheckFunctions.Contains(delegateFunc))
684 CanResetScriptCheckFunctions.Remove(delegateFunc);
685 }
686
687 public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user)
688 {
689 foreach (CanResetScript check in CanResetScriptCheckFunctions)
690 {
691 if (check(script, user, m_scene) == false)
692 {
693 return false;
694 }
695 }
696 return true;
697 }
698
699 #endregion
700
614 #region TERRAFORM LAND 701 #region TERRAFORM LAND
615 public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); 702 public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene);
616 private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>(); 703 private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>();