diff options
author | alondria | 2008-02-01 14:18:00 +0000 |
---|---|---|
committer | alondria | 2008-02-01 14:18:00 +0000 |
commit | 0eb4e85988627a76e5538fce617a1c53b1bc97b7 (patch) | |
tree | 6d49477dbfdfeac8658a0c660bc26361bbbe1189 /OpenSim/Region/ScriptEngine/Common | |
parent | * ODE:Fix copy and paste bug in space calculation limits (diff) | |
download | opensim-SC-0eb4e85988627a76e5538fce617a1c53b1bc97b7.zip opensim-SC-0eb4e85988627a76e5538fce617a1c53b1bc97b7.tar.gz opensim-SC-0eb4e85988627a76e5538fce617a1c53b1bc97b7.tar.bz2 opensim-SC-0eb4e85988627a76e5538fce617a1c53b1bc97b7.tar.xz |
Thanks to Hashbox for a patch to:
Implementing llStringTrim and hooking in osRegionNotice
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
3 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs index 7073830..dd46fa4 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs | |||
@@ -1829,6 +1829,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1829 | return m_LSL_Functions.llGetParcelDetails(pos, param); | 1829 | return m_LSL_Functions.llGetParcelDetails(pos, param); |
1830 | } | 1830 | } |
1831 | 1831 | ||
1832 | public string llStringTrim(string src, int type) | ||
1833 | { | ||
1834 | return m_LSL_Functions.llStringTrim(src, type); | ||
1835 | } | ||
1836 | |||
1832 | // | 1837 | // |
1833 | // OpenSim Functions | 1838 | // OpenSim Functions |
1834 | // | 1839 | // |
@@ -1853,6 +1858,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1853 | return m_LSL_Functions.osRegionRestart(seconds); | 1858 | return m_LSL_Functions.osRegionRestart(seconds); |
1854 | } | 1859 | } |
1855 | 1860 | ||
1861 | public void osRegionNotice(string msg) | ||
1862 | { | ||
1863 | m_LSL_Functions.osRegionNotice(msg); | ||
1864 | } | ||
1865 | |||
1866 | |||
1867 | |||
1856 | // LSL CONSTANTS | 1868 | // LSL CONSTANTS |
1857 | public const int TRUE = 1; | 1869 | public const int TRUE = 1; |
1858 | public const int FALSE = 0; | 1870 | public const int FALSE = 0; |
@@ -2165,7 +2177,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2165 | public const double DEG_TO_RAD = 0.01745329238f; | 2177 | public const double DEG_TO_RAD = 0.01745329238f; |
2166 | public const double RAD_TO_DEG = 57.29578f; | 2178 | public const double RAD_TO_DEG = 57.29578f; |
2167 | public const double SQRT2 = 1.414213538f; | 2179 | public const double SQRT2 = 1.414213538f; |
2168 | 2180 | public const int STRING_TRIM_HEAD = 1; | |
2181 | public const int STRING_TRIM_TAIL = 2; | ||
2182 | public const int STRING_TRIM = 3; | ||
2169 | // Can not be public const? | 2183 | // Can not be public const? |
2170 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); | 2184 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); |
2171 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); | 2185 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9167632..91cddf1 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -3062,6 +3062,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3062 | return ret; | 3062 | return ret; |
3063 | } | 3063 | } |
3064 | 3064 | ||
3065 | public string llStringTrim(string src, int type) | ||
3066 | { | ||
3067 | if (type == (int)LSL_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } | ||
3068 | if (type == (int)LSL_BaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } | ||
3069 | if (type == (int)LSL_BaseClass.STRING_TRIM) { return src.Trim(); } | ||
3070 | return src; | ||
3071 | } | ||
3072 | |||
3065 | // | 3073 | // |
3066 | // OpenSim functions | 3074 | // OpenSim functions |
3067 | // | 3075 | // |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 419398f..dbeeaf5 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -633,11 +633,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
633 | int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); | 633 | int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); |
634 | //wiki list llGetParcelDetails(vector pos, list params) | 634 | //wiki list llGetParcelDetails(vector pos, list params) |
635 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); | 635 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); |
636 | 636 | string llStringTrim(string src, int type); | |
637 | //OpenSim functions | 637 | //OpenSim functions |
638 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | 638 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); |
639 | double osTerrainGetHeight(int x, int y); | 639 | double osTerrainGetHeight(int x, int y); |
640 | int osTerrainSetHeight(int x, int y, double val); | 640 | int osTerrainSetHeight(int x, int y, double val); |
641 | int osRegionRestart(double seconds); | 641 | int osRegionRestart(double seconds); |
642 | void osRegionNotice(string msg); | ||
642 | } | 643 | } |
643 | } \ No newline at end of file | 644 | } \ No newline at end of file |