aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs')
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs264
1 files changed, 132 insertions, 132 deletions
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 81a95c5..2626b14 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -1,132 +1,132 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 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 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 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 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. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28/* Original code: Tedd Hansen */ 28/* Original code: Tedd Hansen */
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34using OpenSim.Region.Environment.Scenes.Scripting; 34using OpenSim.Region.Environment.Scenes.Scripting;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
36using libsecondlife; 36using libsecondlife;
37 37
38namespace OpenSim.Grid.ScriptEngine.DotNetEngine 38namespace OpenSim.Grid.ScriptEngine.DotNetEngine
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// This is the root object for ScriptEngine 41 /// This is the root object for ScriptEngine
42 /// </summary> 42 /// </summary>
43 [Serializable] 43 [Serializable]
44 public class ScriptEngine :IRegionModule 44 public class ScriptEngine :IRegionModule
45 { 45 {
46 46
47 internal OpenSim.Region.Environment.Scenes.Scene World; 47 internal OpenSim.Region.Environment.Scenes.Scene World;
48 internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim 48 internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim
49 internal EventQueueManager m_EventQueueManager; // Executes events 49 internal EventQueueManager m_EventQueueManager; // Executes events
50 internal ScriptManager m_ScriptManager; // Load, unload and execute scripts 50 internal ScriptManager m_ScriptManager; // Load, unload and execute scripts
51 internal AppDomainManager m_AppDomainManager; 51 internal AppDomainManager m_AppDomainManager;
52 internal LSLLongCmdHandler m_LSLLongCmdHandler; 52 internal LSLLongCmdHandler m_LSLLongCmdHandler;
53 53
54 private OpenSim.Framework.Console.LogBase m_log; 54 private OpenSim.Framework.Console.LogBase m_log;
55 55
56 public ScriptEngine() 56 public ScriptEngine()
57 { 57 {
58 //Common.SendToDebug("ScriptEngine Object Initialized"); 58 //Common.SendToDebug("ScriptEngine Object Initialized");
59 Common.mySE = this; 59 Common.mySE = this;
60 } 60 }
61 61
62 public LogBase Log 62 public LogBase Log
63 { 63 {
64 get { return m_log; } 64 get { return m_log; }
65 } 65 }
66 66
67 public void InitializeEngine(OpenSim.Region.Environment.Scenes.Scene Sceneworld, OpenSim.Framework.Console.LogBase logger) 67 public void InitializeEngine(OpenSim.Region.Environment.Scenes.Scene Sceneworld, OpenSim.Framework.Console.LogBase logger)
68 { 68 {
69 69
70 World = Sceneworld; 70 World = Sceneworld;
71 m_log = logger; 71 m_log = logger;
72 72
73 Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing"); 73 Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing");
74 74
75 //m_logger.Status("ScriptEngine", "InitializeEngine"); 75 //m_logger.Status("ScriptEngine", "InitializeEngine");
76 76
77 // Create all objects we'll be using 77 // Create all objects we'll be using
78 m_EventQueueManager = new EventQueueManager(this); 78 m_EventQueueManager = new EventQueueManager(this);
79 m_EventManager = new EventManager(this); 79 m_EventManager = new EventManager(this);
80 m_ScriptManager = new ScriptManager(this); 80 m_ScriptManager = new ScriptManager(this);
81 m_AppDomainManager = new AppDomainManager(); 81 m_AppDomainManager = new AppDomainManager();
82 m_LSLLongCmdHandler = new LSLLongCmdHandler(this); 82 m_LSLLongCmdHandler = new LSLLongCmdHandler(this);
83 83
84 // Should we iterate the region for scripts that needs starting? 84 // Should we iterate the region for scripts that needs starting?
85 // Or can we assume we are loaded before anything else so we can use proper events? 85 // Or can we assume we are loaded before anything else so we can use proper events?
86 86
87 87
88 } 88 }
89 89
90 public void Shutdown() 90 public void Shutdown()
91 { 91 {
92 // We are shutting down 92 // We are shutting down
93 } 93 }
94 94
95 //// !!!FOR DEBUGGING ONLY!!! (for executing script directly from test app) 95 //// !!!FOR DEBUGGING ONLY!!! (for executing script directly from test app)
96 //[Obsolete("!!!FOR DEBUGGING ONLY!!!")] 96 //[Obsolete("!!!FOR DEBUGGING ONLY!!!")]
97 //public void StartScript(string ScriptID, IScriptHost ObjectID) 97 //public void StartScript(string ScriptID, IScriptHost ObjectID)
98 //{ 98 //{
99 // this.myEventManager.TEMP_OBJECT_ID = ObjectID; 99 // this.myEventManager.TEMP_OBJECT_ID = ObjectID;
100 // Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID); 100 // Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID);
101 // myScriptManager.StartScript(ScriptID, ObjectID); 101 // myScriptManager.StartScript(ScriptID, ObjectID);
102 //} 102 //}
103 103
104 #region IRegionModule 104 #region IRegionModule
105 105
106 public void Initialise(Scene scene) 106 public void Initialise(Scene scene)
107 { 107 {
108 this.InitializeEngine(scene, MainLog.Instance); 108 this.InitializeEngine(scene, MainLog.Instance);
109 } 109 }
110 110
111 public void PostInitialise() 111 public void PostInitialise()
112 { 112 {
113 113
114 } 114 }
115 115
116 public void CloseDown() 116 public void Close()
117 { 117 {
118 } 118 }
119 119
120 public string GetName() 120 public string Name
121 { 121 {
122 return "LSLScriptingModule"; 122 get { return "LSLScriptingModule"; }
123 } 123 }
124 124
125 public bool IsSharedModule() 125 public bool IsSharedModule
126 { 126 {
127 return false; 127 get { return false; }
128 } 128 }
129 129
130 #endregion 130 #endregion
131 } 131 }
132} 132}