mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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.
This commit is contained in:
@@ -268,7 +268,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//
|
||||
// OpenSim functions
|
||||
//
|
||||
|
||||
public int osTerrainSetHeight(int x, int y, double val)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight");
|
||||
@@ -920,6 +919,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
|
||||
public string osWindActiveModelPluginName()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
||||
if (module != null)
|
||||
{
|
||||
return module.WindActiveModelPluginName;
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public void osWindParamSet(string plugin, string param, float value)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamSet");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
||||
if (module != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
module.WindParamSet(plugin, param, value);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
public float osWindParamGet(string plugin, string param)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamGet");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IWindModule module = World.RequestModuleInterface<IWindModule>();
|
||||
if (module != null)
|
||||
{
|
||||
return module.WindParamGet(plugin, param);
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double osList2Double(LSL_Types.list src, int index)
|
||||
|
||||
Reference in New Issue
Block a user