diff options
author | Charles Krinke | 2008-03-08 18:06:10 +0000 |
---|---|---|
committer | Charles Krinke | 2008-03-08 18:06:10 +0000 |
commit | 3151e302caa804222206dc85579bb4c2ed9181ac (patch) | |
tree | 239b419547331c5843b5023efbe319bb012e395e /OpenSim | |
parent | * Made a change to the loading mechanism to fix it's operation. (diff) | |
download | opensim-SC_OLD-3151e302caa804222206dc85579bb4c2ed9181ac.zip opensim-SC_OLD-3151e302caa804222206dc85579bb4c2ed9181ac.tar.gz opensim-SC_OLD-3151e302caa804222206dc85579bb4c2ed9181ac.tar.bz2 opensim-SC_OLD-3151e302caa804222206dc85579bb4c2ed9181ac.tar.xz |
Thank you kindly, Ldviopeng for:
Patch to implement the following LSL / OS functions
llParcelPrimCount(60%)
osSetParcelMediaURL
Diffstat (limited to 'OpenSim')
5 files changed, 151 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2ede245..cc97988 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2414,6 +2414,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
2414 | } | 2414 | } |
2415 | } | 2415 | } |
2416 | 2416 | ||
2417 | public void SetLandMediaURL(float x, float y, string url) | ||
2418 | { | ||
2419 | Land land = LandManager.getLandObject(x, y); | ||
2420 | |||
2421 | if (land == null) | ||
2422 | { | ||
2423 | return; | ||
2424 | } | ||
2425 | |||
2426 | else | ||
2427 | { | ||
2428 | land.landData.mediaURL = url; | ||
2429 | return; | ||
2430 | } | ||
2431 | } | ||
2432 | |||
2417 | #endregion | 2433 | #endregion |
2418 | 2434 | ||
2419 | #region Script Engine | 2435 | #region Script Engine |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs index b4e2a13..f385106 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs | |||
@@ -34,13 +34,15 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
34 | public interface IScriptHost | 34 | public interface IScriptHost |
35 | { | 35 | { |
36 | string Name { get; set; } | 36 | string Name { get; set; } |
37 | string SitName { get; set; } | ||
38 | string TouchName { get; set; } | ||
39 | string Description { get; set; } | 37 | string Description { get; set; } |
38 | |||
40 | LLUUID UUID { get; } | 39 | LLUUID UUID { get; } |
41 | LLUUID ObjectOwner { get; } | 40 | LLUUID ObjectOwner { get; } |
42 | LLUUID ObjectCreator { get; } | 41 | LLUUID ObjectCreator { get; } |
43 | LLVector3 AbsolutePosition { get; } | 42 | LLVector3 AbsolutePosition { get; } |
43 | |||
44 | string SitName { get; set; } | ||
45 | string TouchName { get; set; } | ||
44 | void SetText(string text, Vector3 color, double alpha); | 46 | void SetText(string text, Vector3 color, double alpha); |
45 | } | 47 | } |
46 | } \ No newline at end of file | 48 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index c971707..922b301 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | |||
@@ -1874,6 +1874,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1874 | return m_LSL_Functions.osConsoleCommand(Command); | 1874 | return m_LSL_Functions.osConsoleCommand(Command); |
1875 | } | 1875 | } |
1876 | 1876 | ||
1877 | public void osSetParcelMediaURL(string url) | ||
1878 | { | ||
1879 | m_LSL_Functions.osSetParcelMediaURL(url); | ||
1880 | } | ||
1881 | |||
1877 | public double llList2Float(LSL_Types.list src, int index) | 1882 | public double llList2Float(LSL_Types.list src, int index) |
1878 | { | 1883 | { |
1879 | return m_LSL_Functions.llList2Float(src, index); | 1884 | return m_LSL_Functions.llList2Float(src, index); |
@@ -1882,6 +1887,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1882 | // LSL CONSTANTS | 1887 | // LSL CONSTANTS |
1883 | public const int TRUE = 1; | 1888 | public const int TRUE = 1; |
1884 | public const int FALSE = 0; | 1889 | public const int FALSE = 0; |
1890 | |||
1885 | public const int STATUS_PHYSICS = 1; | 1891 | public const int STATUS_PHYSICS = 1; |
1886 | public const int STATUS_ROTATE_X = 2; | 1892 | public const int STATUS_ROTATE_X = 2; |
1887 | public const int STATUS_ROTATE_Y = 4; | 1893 | public const int STATUS_ROTATE_Y = 4; |
@@ -1892,10 +1898,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1892 | public const int STATUS_DIE_AT_EDGE = 128; | 1898 | public const int STATUS_DIE_AT_EDGE = 128; |
1893 | public const int STATUS_RETURN_AT_EDGE = 256; | 1899 | public const int STATUS_RETURN_AT_EDGE = 256; |
1894 | public const int STATUS_CAST_SHADOWS = 512; | 1900 | public const int STATUS_CAST_SHADOWS = 512; |
1901 | |||
1895 | public const int AGENT = 1; | 1902 | public const int AGENT = 1; |
1896 | public const int ACTIVE = 2; | 1903 | public const int ACTIVE = 2; |
1897 | public const int PASSIVE = 4; | 1904 | public const int PASSIVE = 4; |
1898 | public const int SCRIPTED = 8; | 1905 | public const int SCRIPTED = 8; |
1906 | |||
1899 | public const int CONTROL_FWD = 1; | 1907 | public const int CONTROL_FWD = 1; |
1900 | public const int CONTROL_BACK = 2; | 1908 | public const int CONTROL_BACK = 2; |
1901 | public const int CONTROL_LEFT = 4; | 1909 | public const int CONTROL_LEFT = 4; |
@@ -1906,6 +1914,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1906 | public const int CONTROL_ROT_RIGHT = 512; | 1914 | public const int CONTROL_ROT_RIGHT = 512; |
1907 | public const int CONTROL_LBUTTON = 268435456; | 1915 | public const int CONTROL_LBUTTON = 268435456; |
1908 | public const int CONTROL_ML_LBUTTON = 1073741824; | 1916 | public const int CONTROL_ML_LBUTTON = 1073741824; |
1917 | |||
1918 | //Permissions | ||
1909 | public const int PERMISSION_DEBIT = 2; | 1919 | public const int PERMISSION_DEBIT = 2; |
1910 | public const int PERMISSION_TAKE_CONTROLS = 4; | 1920 | public const int PERMISSION_TAKE_CONTROLS = 4; |
1911 | public const int PERMISSION_REMAP_CONTROLS = 8; | 1921 | public const int PERMISSION_REMAP_CONTROLS = 8; |
@@ -1916,6 +1926,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1916 | public const int PERMISSION_CHANGE_JOINTS = 256; | 1926 | public const int PERMISSION_CHANGE_JOINTS = 256; |
1917 | public const int PERMISSION_CHANGE_PERMISSIONS = 512; | 1927 | public const int PERMISSION_CHANGE_PERMISSIONS = 512; |
1918 | public const int PERMISSION_TRACK_CAMERA = 1024; | 1928 | public const int PERMISSION_TRACK_CAMERA = 1024; |
1929 | |||
1919 | public const int AGENT_FLYING = 1; | 1930 | public const int AGENT_FLYING = 1; |
1920 | public const int AGENT_ATTACHMENTS = 2; | 1931 | public const int AGENT_ATTACHMENTS = 2; |
1921 | public const int AGENT_SCRIPTED = 4; | 1932 | public const int AGENT_SCRIPTED = 4; |
@@ -1929,6 +1940,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1929 | public const int AGENT_CROUCHING = 1024; | 1940 | public const int AGENT_CROUCHING = 1024; |
1930 | public const int AGENT_BUSY = 2048; | 1941 | public const int AGENT_BUSY = 2048; |
1931 | public const int AGENT_ALWAYS_RUN = 4096; | 1942 | public const int AGENT_ALWAYS_RUN = 4096; |
1943 | |||
1944 | //Particle Systems | ||
1932 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; | 1945 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; |
1933 | public const int PSYS_PART_INTERP_SCALE_MASK = 2; | 1946 | public const int PSYS_PART_INTERP_SCALE_MASK = 2; |
1934 | public const int PSYS_PART_BOUNCE_MASK = 4; | 1947 | public const int PSYS_PART_BOUNCE_MASK = 4; |
@@ -1966,6 +1979,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1966 | public const int PSYS_SRC_PATTERN_ANGLE = 4; | 1979 | public const int PSYS_SRC_PATTERN_ANGLE = 4; |
1967 | public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8; | 1980 | public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8; |
1968 | public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16; | 1981 | public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16; |
1982 | |||
1969 | public const int VEHICLE_TYPE_NONE = 0; | 1983 | public const int VEHICLE_TYPE_NONE = 0; |
1970 | public const int VEHICLE_TYPE_SLED = 1; | 1984 | public const int VEHICLE_TYPE_SLED = 1; |
1971 | public const int VEHICLE_TYPE_CAR = 2; | 1985 | public const int VEHICLE_TYPE_CAR = 2; |
@@ -2005,6 +2019,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2005 | public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; | 2019 | public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; |
2006 | public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; | 2020 | public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; |
2007 | public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; | 2021 | public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; |
2022 | |||
2008 | public const int INVENTORY_ALL = -1; | 2023 | public const int INVENTORY_ALL = -1; |
2009 | public const int INVENTORY_NONE = -1; | 2024 | public const int INVENTORY_NONE = -1; |
2010 | public const int INVENTORY_TEXTURE = 0; | 2025 | public const int INVENTORY_TEXTURE = 0; |
@@ -2017,6 +2032,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2017 | public const int INVENTORY_BODYPART = 13; | 2032 | public const int INVENTORY_BODYPART = 13; |
2018 | public const int INVENTORY_ANIMATION = 20; | 2033 | public const int INVENTORY_ANIMATION = 20; |
2019 | public const int INVENTORY_GESTURE = 21; | 2034 | public const int INVENTORY_GESTURE = 21; |
2035 | |||
2020 | public const int ATTACH_CHEST = 1; | 2036 | public const int ATTACH_CHEST = 1; |
2021 | public const int ATTACH_HEAD = 2; | 2037 | public const int ATTACH_HEAD = 2; |
2022 | public const int ATTACH_LSHOULDER = 3; | 2038 | public const int ATTACH_LSHOULDER = 3; |
@@ -2047,6 +2063,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2047 | public const int ATTACH_BELLY = 28; | 2063 | public const int ATTACH_BELLY = 28; |
2048 | public const int ATTACH_RPEC = 29; | 2064 | public const int ATTACH_RPEC = 29; |
2049 | public const int ATTACH_LPEC = 30; | 2065 | public const int ATTACH_LPEC = 30; |
2066 | |||
2050 | public const int LAND_LEVEL = 0; | 2067 | public const int LAND_LEVEL = 0; |
2051 | public const int LAND_RAISE = 1; | 2068 | public const int LAND_RAISE = 1; |
2052 | public const int LAND_LOWER = 2; | 2069 | public const int LAND_LOWER = 2; |
@@ -2056,6 +2073,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2056 | public const int LAND_SMALL_BRUSH = 1; | 2073 | public const int LAND_SMALL_BRUSH = 1; |
2057 | public const int LAND_MEDIUM_BRUSH = 2; | 2074 | public const int LAND_MEDIUM_BRUSH = 2; |
2058 | public const int LAND_LARGE_BRUSH = 3; | 2075 | public const int LAND_LARGE_BRUSH = 3; |
2076 | |||
2077 | //Agent Dataserver | ||
2059 | public const int DATA_ONLINE = 1; | 2078 | public const int DATA_ONLINE = 1; |
2060 | public const int DATA_NAME = 2; | 2079 | public const int DATA_NAME = 2; |
2061 | public const int DATA_BORN = 3; | 2080 | public const int DATA_BORN = 3; |
@@ -2063,6 +2082,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2063 | public const int DATA_SIM_POS = 5; | 2082 | public const int DATA_SIM_POS = 5; |
2064 | public const int DATA_SIM_STATUS = 6; | 2083 | public const int DATA_SIM_STATUS = 6; |
2065 | public const int DATA_SIM_RATING = 7; | 2084 | public const int DATA_SIM_RATING = 7; |
2085 | |||
2066 | public const int ANIM_ON = 1; | 2086 | public const int ANIM_ON = 1; |
2067 | public const int LOOP = 2; | 2087 | public const int LOOP = 2; |
2068 | public const int REVERSE = 4; | 2088 | public const int REVERSE = 4; |
@@ -2091,9 +2111,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2091 | public const int TYPE_KEY = 4; | 2111 | public const int TYPE_KEY = 4; |
2092 | public const int TYPE_VECTOR = 5; | 2112 | public const int TYPE_VECTOR = 5; |
2093 | public const int TYPE_ROTATION = 6; | 2113 | public const int TYPE_ROTATION = 6; |
2114 | |||
2115 | //XML RPC Remote Data Channel | ||
2094 | public const int REMOTE_DATA_CHANNEL = 1; | 2116 | public const int REMOTE_DATA_CHANNEL = 1; |
2095 | public const int REMOTE_DATA_REQUEST = 2; | 2117 | public const int REMOTE_DATA_REQUEST = 2; |
2096 | public const int REMOTE_DATA_REPLY = 3; | 2118 | public const int REMOTE_DATA_REPLY = 3; |
2119 | |||
2120 | //llHTTPRequest | ||
2097 | public const int HTTP_METHOD = 0; | 2121 | public const int HTTP_METHOD = 0; |
2098 | public const int HTTP_MIMETYPE = 1; | 2122 | public const int HTTP_MIMETYPE = 1; |
2099 | public const int HTTP_BODY_MAXLENGTH = 2; | 2123 | public const int HTTP_BODY_MAXLENGTH = 2; |
@@ -2117,6 +2141,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2117 | public const int PRIM_POINT_LIGHT = 23; // Huh? | 2141 | public const int PRIM_POINT_LIGHT = 23; // Huh? |
2118 | public const int PRIM_TEXGEN_DEFAULT = 0; | 2142 | public const int PRIM_TEXGEN_DEFAULT = 0; |
2119 | public const int PRIM_TEXGEN_PLANAR = 1; | 2143 | public const int PRIM_TEXGEN_PLANAR = 1; |
2144 | |||
2120 | public const int PRIM_TYPE_BOX = 0; | 2145 | public const int PRIM_TYPE_BOX = 0; |
2121 | public const int PRIM_TYPE_CYLINDER = 1; | 2146 | public const int PRIM_TYPE_CYLINDER = 1; |
2122 | public const int PRIM_TYPE_PRISM = 2; | 2147 | public const int PRIM_TYPE_PRISM = 2; |
@@ -2125,10 +2150,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2125 | public const int PRIM_TYPE_TUBE = 5; | 2150 | public const int PRIM_TYPE_TUBE = 5; |
2126 | public const int PRIM_TYPE_RING = 6; | 2151 | public const int PRIM_TYPE_RING = 6; |
2127 | public const int PRIM_TYPE_SCULPT = 7; | 2152 | public const int PRIM_TYPE_SCULPT = 7; |
2153 | |||
2128 | public const int PRIM_HOLE_DEFAULT = 0; | 2154 | public const int PRIM_HOLE_DEFAULT = 0; |
2129 | public const int PRIM_HOLE_CIRCLE = 16; | 2155 | public const int PRIM_HOLE_CIRCLE = 16; |
2130 | public const int PRIM_HOLE_SQUARE = 32; | 2156 | public const int PRIM_HOLE_SQUARE = 32; |
2131 | public const int PRIM_HOLE_TRIANGLE = 48; | 2157 | public const int PRIM_HOLE_TRIANGLE = 48; |
2158 | |||
2132 | public const int PRIM_MATERIAL_STONE = 0; | 2159 | public const int PRIM_MATERIAL_STONE = 0; |
2133 | public const int PRIM_MATERIAL_METAL = 1; | 2160 | public const int PRIM_MATERIAL_METAL = 1; |
2134 | public const int PRIM_MATERIAL_GLASS = 2; | 2161 | public const int PRIM_MATERIAL_GLASS = 2; |
@@ -2137,6 +2164,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2137 | public const int PRIM_MATERIAL_PLASTIC = 5; | 2164 | public const int PRIM_MATERIAL_PLASTIC = 5; |
2138 | public const int PRIM_MATERIAL_RUBBER = 6; | 2165 | public const int PRIM_MATERIAL_RUBBER = 6; |
2139 | public const int PRIM_MATERIAL_LIGHT = 7; | 2166 | public const int PRIM_MATERIAL_LIGHT = 7; |
2167 | |||
2140 | public const int PRIM_SHINY_NONE = 0; | 2168 | public const int PRIM_SHINY_NONE = 0; |
2141 | public const int PRIM_SHINY_LOW = 1; | 2169 | public const int PRIM_SHINY_LOW = 1; |
2142 | public const int PRIM_SHINY_MEDIUM = 2; | 2170 | public const int PRIM_SHINY_MEDIUM = 2; |
@@ -2170,11 +2198,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2170 | public const int MASK_GROUP = 2; | 2198 | public const int MASK_GROUP = 2; |
2171 | public const int MASK_EVERYONE = 3; | 2199 | public const int MASK_EVERYONE = 3; |
2172 | public const int MASK_NEXT = 4; | 2200 | public const int MASK_NEXT = 4; |
2201 | |||
2173 | public const int PERM_TRANSFER = 8192; | 2202 | public const int PERM_TRANSFER = 8192; |
2174 | public const int PERM_MODIFY = 16384; | 2203 | public const int PERM_MODIFY = 16384; |
2175 | public const int PERM_COPY = 32768; | 2204 | public const int PERM_COPY = 32768; |
2176 | public const int PERM_MOVE = 524288; | 2205 | public const int PERM_MOVE = 524288; |
2177 | public const int PERM_ALL = 2147483647; | 2206 | public const int PERM_ALL = 2147483647; |
2207 | |||
2178 | public const int PARCEL_MEDIA_COMMAND_STOP = 0; | 2208 | public const int PARCEL_MEDIA_COMMAND_STOP = 0; |
2179 | public const int PARCEL_MEDIA_COMMAND_PAUSE = 1; | 2209 | public const int PARCEL_MEDIA_COMMAND_PAUSE = 1; |
2180 | public const int PARCEL_MEDIA_COMMAND_PLAY = 2; | 2210 | public const int PARCEL_MEDIA_COMMAND_PLAY = 2; |
@@ -2185,8 +2215,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2185 | public const int PARCEL_MEDIA_COMMAND_AGENT = 7; | 2215 | public const int PARCEL_MEDIA_COMMAND_AGENT = 7; |
2186 | public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8; | 2216 | public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8; |
2187 | public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; | 2217 | public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; |
2218 | |||
2188 | public const int PAY_HIDE = -1; | 2219 | public const int PAY_HIDE = -1; |
2189 | public const int PAY_DEFAULT = -2; | 2220 | public const int PAY_DEFAULT = -2; |
2221 | |||
2190 | public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; | 2222 | public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; |
2191 | public const string EOF = "\n\n\n"; | 2223 | public const string EOF = "\n\n\n"; |
2192 | public const double PI = 3.14159274f; | 2224 | public const double PI = 3.14159274f; |
@@ -2209,6 +2241,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2209 | public const int LIST_STAT_NUM_COUNT = 8; | 2241 | public const int LIST_STAT_NUM_COUNT = 8; |
2210 | public const int LIST_STAT_GEOMETRIC_MEAN = 9; | 2242 | public const int LIST_STAT_GEOMETRIC_MEAN = 9; |
2211 | public const int LIST_STAT_HARMONIC_MEAN = 100; | 2243 | public const int LIST_STAT_HARMONIC_MEAN = 100; |
2244 | |||
2245 | //ParcelPrim Categories | ||
2246 | public const int PARCEL_COUNT_TOTAL = 0; | ||
2247 | public const int PARCEL_COUNT_OWNER = 1; | ||
2248 | public const int PARCEL_COUNT_GROUP = 2; | ||
2249 | public const int PARCEL_COUNT_OTHER = 3; | ||
2250 | public const int PARCEL_COUNT_SELECTED = 4; | ||
2251 | public const int PARCEL_COUNT_TEMP = 5; | ||
2252 | |||
2212 | // Can not be public const? | 2253 | // Can not be public const? |
2213 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); | 2254 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); |
2214 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); | 2255 | 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 7828834..7da47d4 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -1899,6 +1899,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1899 | public string llGetScriptName() | 1899 | public string llGetScriptName() |
1900 | { | 1900 | { |
1901 | m_host.AddScriptLPS(1); | 1901 | m_host.AddScriptLPS(1); |
1902 | |||
1902 | return String.Empty; | 1903 | return String.Empty; |
1903 | } | 1904 | } |
1904 | 1905 | ||
@@ -2942,7 +2943,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2942 | public int llGetScriptState(string name) | 2943 | public int llGetScriptState(string name) |
2943 | { | 2944 | { |
2944 | m_host.AddScriptLPS(1); | 2945 | m_host.AddScriptLPS(1); |
2945 | NotImplemented("llGetScriptState"); | 2946 | |
2947 | //NotImplemented("llGetScriptState"); | ||
2946 | return 0; | 2948 | return 0; |
2947 | } | 2949 | } |
2948 | 2950 | ||
@@ -3096,6 +3098,24 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3096 | World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); | 3098 | World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); |
3097 | } | 3099 | } |
3098 | 3100 | ||
3101 | public void osSetParcelMediaURL(string url) | ||
3102 | { | ||
3103 | m_host.AddScriptLPS(1); | ||
3104 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
3105 | |||
3106 | if(landowner.Equals(null)) | ||
3107 | { | ||
3108 | return; | ||
3109 | } | ||
3110 | |||
3111 | if(landowner != m_host.ObjectOwner) | ||
3112 | { | ||
3113 | return; | ||
3114 | } | ||
3115 | |||
3116 | World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); | ||
3117 | } | ||
3118 | |||
3099 | public LSL_Types.Vector3 llGetRootPosition() | 3119 | public LSL_Types.Vector3 llGetRootPosition() |
3100 | { | 3120 | { |
3101 | m_host.AddScriptLPS(1); | 3121 | m_host.AddScriptLPS(1); |
@@ -3441,6 +3461,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3441 | 3461 | ||
3442 | int number = 0; | 3462 | int number = 0; |
3443 | int digit; | 3463 | int digit; |
3464 | int baddigit = 0; | ||
3444 | 3465 | ||
3445 | m_host.AddScriptLPS(1); | 3466 | m_host.AddScriptLPS(1); |
3446 | 3467 | ||
@@ -4004,7 +4025,65 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4004 | public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) | 4025 | public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) |
4005 | { | 4026 | { |
4006 | m_host.AddScriptLPS(1); | 4027 | m_host.AddScriptLPS(1); |
4007 | NotImplemented("llGetParcelPrimCount"); | 4028 | |
4029 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | ||
4030 | |||
4031 | if(land == null) | ||
4032 | { | ||
4033 | return 0; | ||
4034 | } | ||
4035 | |||
4036 | else | ||
4037 | { | ||
4038 | if(sim_wide == 1) | ||
4039 | { | ||
4040 | if (category == 0) | ||
4041 | { | ||
4042 | return land.simwidePrims; | ||
4043 | } | ||
4044 | |||
4045 | else | ||
4046 | { | ||
4047 | //public int simwideArea = 0; | ||
4048 | return 0; | ||
4049 | } | ||
4050 | } | ||
4051 | |||
4052 | else | ||
4053 | { | ||
4054 | if(category == 0)//Total Prims | ||
4055 | { | ||
4056 | return 0;//land. | ||
4057 | } | ||
4058 | |||
4059 | else if(category == 1)//Owner Prims | ||
4060 | { | ||
4061 | return land.ownerPrims; | ||
4062 | } | ||
4063 | |||
4064 | else if(category == 2)//Group Prims | ||
4065 | { | ||
4066 | return land.groupPrims; | ||
4067 | } | ||
4068 | |||
4069 | else if(category == 3)//Other Prims | ||
4070 | { | ||
4071 | return land.otherPrims; | ||
4072 | } | ||
4073 | |||
4074 | else if(category == 4)//Selected | ||
4075 | { | ||
4076 | return land.selectedPrims; | ||
4077 | } | ||
4078 | |||
4079 | else if(category == 5)//Temp | ||
4080 | { | ||
4081 | return 0;//land. | ||
4082 | } | ||
4083 | } | ||
4084 | } | ||
4085 | |||
4086 | //NotImplemented("llGetParcelPrimCount"); | ||
4008 | return 0; | 4087 | return 0; |
4009 | } | 4088 | } |
4010 | 4089 | ||
@@ -4035,19 +4114,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4035 | // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation | 4114 | // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation |
4036 | // Which probably will be irrelevent in OpenSim.... | 4115 | // Which probably will be irrelevent in OpenSim.... |
4037 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 4116 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); |
4117 | |||
4038 | float bonusfactor = World.RegionInfo.EstateSettings.objectBonusFactor; | 4118 | float bonusfactor = World.RegionInfo.EstateSettings.objectBonusFactor; |
4119 | |||
4039 | if (land == null) | 4120 | if (land == null) |
4040 | { | 4121 | { |
4041 | return 0; | 4122 | return 0; |
4042 | } | 4123 | } |
4124 | |||
4043 | if (sim_wide == 1) | 4125 | if (sim_wide == 1) |
4044 | { | 4126 | { |
4045 | decimal v = land.simwideArea * (decimal)(0.22) * (decimal)bonusfactor; | 4127 | decimal v = land.simwideArea * (decimal)(0.22) * (decimal)bonusfactor; |
4128 | |||
4046 | return (int)v; | 4129 | return (int)v; |
4047 | } | 4130 | } |
4131 | |||
4048 | else | 4132 | else |
4049 | { | 4133 | { |
4050 | decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor; | 4134 | decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor; |
4135 | |||
4051 | return (int)v; | 4136 | return (int)v; |
4052 | } | 4137 | } |
4053 | 4138 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 42197a2..c1e178b 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -641,6 +641,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
641 | int osTerrainSetHeight(int x, int y, double val); | 641 | int osTerrainSetHeight(int x, int y, double val); |
642 | int osRegionRestart(double seconds); | 642 | int osRegionRestart(double seconds); |
643 | void osRegionNotice(string msg); | 643 | void osRegionNotice(string msg); |
644 | bool osConsoleCommand(string Command); | 644 | bool osConsoleCommand(string Command); |
645 | void osSetParcelMediaURL(string url); | ||
645 | } | 646 | } |
646 | } | 647 | } |