diff options
author | Charles Krinke | 2009-03-31 02:33:19 +0000 |
---|---|---|
committer | Charles Krinke | 2009-03-31 02:33:19 +0000 |
commit | 54a27f9f5c556e518c2ba18b9a5494d517dfd041 (patch) | |
tree | 5da9db44878c217e0c1872da0f963d88575ef8ff /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Update svn properties, add copyright header, formatting cleanup. (diff) | |
download | opensim-SC-54a27f9f5c556e518c2ba18b9a5494d517dfd041.zip opensim-SC-54a27f9f5c556e518c2ba18b9a5494d517dfd041.tar.gz opensim-SC-54a27f9f5c556e518c2ba18b9a5494d517dfd041.tar.bz2 opensim-SC-54a27f9f5c556e518c2ba18b9a5494d517dfd041.tar.xz |
Thank you kindly, MCortez for a patch that:
With some support from HomerH, this patch adds support for Wind
Model plugins via the mono.Addin framework.
* Adds console & OSSL access to Wind Parameters
* Adds plug-in support for custom wind models
* Provides two example Wind Model plug-ins
Documentation for the wind module is temporarily located at http://code.google.com/p/flotsam/wiki/CoreWindModule [^]
-- will move this documentation to http://opensimulator.org [^]
after the patch has been committed.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index c87cc44..491a971 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -268,7 +268,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
268 | // | 268 | // |
269 | // OpenSim functions | 269 | // OpenSim functions |
270 | // | 270 | // |
271 | |||
272 | public int osTerrainSetHeight(int x, int y, double val) | 271 | public int osTerrainSetHeight(int x, int y, double val) |
273 | { | 272 | { |
274 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); | 273 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); |
@@ -920,6 +919,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
920 | } | 919 | } |
921 | 920 | ||
922 | 921 | ||
922 | public string osWindActiveModelPluginName() | ||
923 | { | ||
924 | CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); | ||
925 | m_host.AddScriptLPS(1); | ||
926 | |||
927 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | ||
928 | if (module != null) | ||
929 | { | ||
930 | return module.WindActiveModelPluginName; | ||
931 | } | ||
932 | |||
933 | return String.Empty; | ||
934 | } | ||
935 | |||
936 | public void osWindParamSet(string plugin, string param, float value) | ||
937 | { | ||
938 | CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamSet"); | ||
939 | m_host.AddScriptLPS(1); | ||
940 | |||
941 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | ||
942 | if (module != null) | ||
943 | { | ||
944 | try | ||
945 | { | ||
946 | module.WindParamSet(plugin, param, value); | ||
947 | } | ||
948 | catch (Exception) { } | ||
949 | } | ||
950 | } | ||
951 | |||
952 | public float osWindParamGet(string plugin, string param) | ||
953 | { | ||
954 | CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamGet"); | ||
955 | m_host.AddScriptLPS(1); | ||
956 | |||
957 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | ||
958 | if (module != null) | ||
959 | { | ||
960 | return module.WindParamGet(plugin, param); | ||
961 | } | ||
962 | |||
963 | return 0.0f; | ||
964 | } | ||
965 | |||
923 | 966 | ||
924 | 967 | ||
925 | public double osList2Double(LSL_Types.list src, int index) | 968 | public double osList2Double(LSL_Types.list src, int index) |