aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
diff options
context:
space:
mode:
authorTedd Hansen2007-08-22 18:09:38 +0000
committerTedd Hansen2007-08-22 18:09:38 +0000
commit5a86fd2c31ce0ede9825657c969ccaa1ef423d5c (patch)
tree66e62accbaf1b20242b82920537d40d156f0bf00 /OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
parentAdded Scene.GetSceneObjectPart(uint localID) (diff)
downloadopensim-SC_OLD-5a86fd2c31ce0ede9825657c969ccaa1ef423d5c.zip
opensim-SC_OLD-5a86fd2c31ce0ede9825657c969ccaa1ef423d5c.tar.gz
opensim-SC_OLD-5a86fd2c31ce0ede9825657c969ccaa1ef423d5c.tar.bz2
opensim-SC_OLD-5a86fd2c31ce0ede9825657c969ccaa1ef423d5c.tar.xz
(Untested) Scripts are individually loaded into objects (on rez), and event fired likewise. Bugfixes coming in next commit.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs32
1 files changed, 13 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 2786943..77bd409 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -64,9 +64,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
64 64
65 public void InitializeEngine(OpenSim.Region.Environment.Scenes.Scene Sceneworld, OpenSim.Framework.Console.LogBase logger) 65 public void InitializeEngine(OpenSim.Region.Environment.Scenes.Scene Sceneworld, OpenSim.Framework.Console.LogBase logger)
66 { 66 {
67
67 World = Sceneworld; 68 World = Sceneworld;
68 m_log = logger; 69 m_log = logger;
69 70
71 Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing");
72
70 //m_logger.Status("ScriptEngine", "InitializeEngine"); 73 //m_logger.Status("ScriptEngine", "InitializeEngine");
71 74
72 // Create all objects we'll be using 75 // Create all objects we'll be using
@@ -78,30 +81,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
78 // Should we iterate the region for scripts that needs starting? 81 // Should we iterate the region for scripts that needs starting?
79 // Or can we assume we are loaded before anything else so we can use proper events? 82 // Or can we assume we are loaded before anything else so we can use proper events?
80 83
81 // Event hook for when scripts are dragged to script inventory
82 World.EventManager.OnRezScript += NewRezScriptHandler;
83 84
84 } 85 }
85 86
86 private void NewRezScriptHandler(uint localID, LLUUID itemID, string script)
87 {
88 // TODO: Add code to compile script and wire up script to object
89 // Either the script is a stand-alone entity with a reference to public host,
90 // Or the host has a reference to the script because it was in its inventory.
91 }
92
93 public void Shutdown() 87 public void Shutdown()
94 { 88 {
95 // We are shutting down 89 // We are shutting down
96 } 90 }
97 91
98 // !!!FOR DEBUGGING ONLY!!! (for executing script directly from test app) 92 //// !!!FOR DEBUGGING ONLY!!! (for executing script directly from test app)
99 [Obsolete("!!!FOR DEBUGGING ONLY!!!")] 93 //[Obsolete("!!!FOR DEBUGGING ONLY!!!")]
100 public void StartScript(string ScriptID, IScriptHost ObjectID) 94 //public void StartScript(string ScriptID, IScriptHost ObjectID)
101 { 95 //{
102 this.myEventManager.TEMP_OBJECT_ID = ObjectID; 96 // this.myEventManager.TEMP_OBJECT_ID = ObjectID;
103 Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID); 97 // Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID);
104 myScriptManager.StartScript(ScriptID, ObjectID); 98 // myScriptManager.StartScript(ScriptID, ObjectID);
105 } 99 //}
106 } 100 }
107} 101}