From bfd36e2e836f92539e68bba077104d5016c5bf8b Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 4 Sep 2007 13:43:56 +0000 Subject: Some work on Module loading/management. Some more modules templates classes (hoping that someone will pick some of these and work on implementing them). Early version of the "Dynamic Texture Module", although currently there are no render modules included (so not really functional without them). Added osSetDynamicTextureURL script function, for attaching a dynamic texture to a prim. Some work on the console command handling. Added "change-region " and "exit-region" so that after the use of change-region, the commands entered will apply to that region only. Then use exit-region to return to the top level (so commands then function as they did before and either apply to all regions or to the first region) (Note: this hasn't been tested very much) --- .../Common/LSL_BuiltIn_Commands_Interface.cs | 3 +++ .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 5 +---- .../DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 6 ++++-- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 19 +++++++++++++++++++ 4 files changed, 27 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index f80898b..a7cce9f 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs @@ -628,5 +628,8 @@ namespace OpenSim.Region.ScriptEngine.Common int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); //wiki list llGetParcelDetails(vector pos, list params) List llGetParcelDetails(LSL_Types.Vector3 pos, List param); + + //OpenSim functions + string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); } } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 3b7bd7b..9495888 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -25,10 +25,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL DataTypes.Add("null", "null"); } - - - - + public string Convert(string Script) { string Return = ""; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 90004b5..63f7260 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs @@ -465,8 +465,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); } public List llGetParcelDetails(LSL_Types.Vector3 pos, List param) { return m_LSL_Functions.llGetParcelDetails(pos, param); } - - + // + // OpenSim Functions + // + public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer) { return m_LSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer); } // LSL CONSTANTS public const int TRUE = 1; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 493a063..5d34229 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -4,6 +4,7 @@ using System.Text; using libsecondlife; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes.Scripting; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; using OpenSim.Region.ScriptEngine.Common; using OpenSim.Framework.Console; @@ -650,6 +651,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { return 0; } public List llGetParcelDetails(LSL_Types.Vector3 pos, List param) { return new List(); } + // + // OpenSim functions + // + public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer) + { + if (dynamicID == "") + { + IDynamicTextureManager textureManager = this.World.RequestModuleInterface(); + LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer); + return createdTexture.ToStringHyphenated(); + } + else + { + //TODO update existing dynamic textures + } + + return LLUUID.Zero.ToStringHyphenated(); + } } } -- cgit v1.1