diff options
author | justincc | 2010-12-15 00:35:36 +0000 |
---|---|---|
committer | justincc | 2010-12-15 00:35:36 +0000 |
commit | b643661938881af6fc782d39e52040ed6d16f03f (patch) | |
tree | 162e0667718b2f68e5f4e90cd10f30e6fa374cbb /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | replace ode.dll with one built without asserts turned on (diff) | |
parent | fix mistake in last change of local.include (diff) | |
download | opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.zip opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.gz opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.bz2 opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
4 files changed, 182 insertions, 59 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3c5f2d0..30fb252 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6287,16 +6287,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6287 | { | 6287 | { |
6288 | m_host.AddScriptLPS(1); | 6288 | m_host.AddScriptLPS(1); |
6289 | UUID key; | 6289 | UUID key; |
6290 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; | 6290 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
6291 | if (land.OwnerID == m_host.OwnerID) | 6291 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed)) |
6292 | { | 6292 | { |
6293 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 6293 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
6294 | if (UUID.TryParse(avatar, out key)) | 6294 | if (UUID.TryParse(avatar, out key)) |
6295 | { | 6295 | { |
6296 | entry.AgentID = key; | 6296 | if (land.LandData.ParcelAccessList.FindIndex( |
6297 | entry.Flags = AccessList.Access; | 6297 | delegate(ParcelManager.ParcelAccessEntry e) |
6298 | entry.Time = DateTime.Now.AddHours(hours); | 6298 | { |
6299 | land.ParcelAccessList.Add(entry); | 6299 | if (e.AgentID == key && e.Flags == AccessList.Access) |
6300 | return true; | ||
6301 | return false; | ||
6302 | }) == -1) | ||
6303 | { | ||
6304 | entry.AgentID = key; | ||
6305 | entry.Flags = AccessList.Access; | ||
6306 | entry.Time = DateTime.Now.AddHours(hours); | ||
6307 | land.LandData.ParcelAccessList.Add(entry); | ||
6308 | } | ||
6300 | } | 6309 | } |
6301 | } | 6310 | } |
6302 | ScriptSleep(100); | 6311 | ScriptSleep(100); |
@@ -9023,7 +9032,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9023 | // according to the docs, this command only works if script owner and land owner are the same | 9032 | // according to the docs, this command only works if script owner and land owner are the same |
9024 | // lets add estate owners and gods, too, and use the generic permission check. | 9033 | // lets add estate owners and gods, too, and use the generic permission check. |
9025 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 9034 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
9026 | if (!World.Permissions.CanEditParcel(m_host.OwnerID, landObject)) return; | 9035 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return; |
9027 | 9036 | ||
9028 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? | 9037 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? |
9029 | byte loop = 0; | 9038 | byte loop = 0; |
@@ -9466,16 +9475,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9466 | { | 9475 | { |
9467 | m_host.AddScriptLPS(1); | 9476 | m_host.AddScriptLPS(1); |
9468 | UUID key; | 9477 | UUID key; |
9469 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; | 9478 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
9470 | if (land.OwnerID == m_host.OwnerID) | 9479 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) |
9471 | { | 9480 | { |
9472 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 9481 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
9473 | if (UUID.TryParse(avatar, out key)) | 9482 | if (UUID.TryParse(avatar, out key)) |
9474 | { | 9483 | { |
9475 | entry.AgentID = key; | 9484 | if (land.LandData.ParcelAccessList.FindIndex( |
9476 | entry.Flags = AccessList.Ban; | 9485 | delegate(ParcelManager.ParcelAccessEntry e) |
9477 | entry.Time = DateTime.Now.AddHours(hours); | 9486 | { |
9478 | land.ParcelAccessList.Add(entry); | 9487 | if (e.AgentID == key && e.Flags == AccessList.Ban) |
9488 | return true; | ||
9489 | return false; | ||
9490 | }) == -1) | ||
9491 | { | ||
9492 | entry.AgentID = key; | ||
9493 | entry.Flags = AccessList.Ban; | ||
9494 | entry.Time = DateTime.Now.AddHours(hours); | ||
9495 | land.LandData.ParcelAccessList.Add(entry); | ||
9496 | } | ||
9479 | } | 9497 | } |
9480 | } | 9498 | } |
9481 | ScriptSleep(100); | 9499 | ScriptSleep(100); |
@@ -9485,19 +9503,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9485 | { | 9503 | { |
9486 | m_host.AddScriptLPS(1); | 9504 | m_host.AddScriptLPS(1); |
9487 | UUID key; | 9505 | UUID key; |
9488 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; | 9506 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
9489 | if (land.OwnerID == m_host.OwnerID) | 9507 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed)) |
9490 | { | 9508 | { |
9491 | if (UUID.TryParse(avatar, out key)) | 9509 | if (UUID.TryParse(avatar, out key)) |
9492 | { | 9510 | { |
9493 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) | 9511 | int idx = land.LandData.ParcelAccessList.FindIndex( |
9494 | { | 9512 | delegate(ParcelManager.ParcelAccessEntry e) |
9495 | if (entry.AgentID == key && entry.Flags == AccessList.Access) | 9513 | { |
9496 | { | 9514 | if (e.AgentID == key && e.Flags == AccessList.Access) |
9497 | land.ParcelAccessList.Remove(entry); | 9515 | return true; |
9498 | break; | 9516 | return false; |
9499 | } | 9517 | }); |
9500 | } | 9518 | |
9519 | if (idx != -1) | ||
9520 | land.LandData.ParcelAccessList.RemoveAt(idx); | ||
9501 | } | 9521 | } |
9502 | } | 9522 | } |
9503 | ScriptSleep(100); | 9523 | ScriptSleep(100); |
@@ -9507,19 +9527,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9507 | { | 9527 | { |
9508 | m_host.AddScriptLPS(1); | 9528 | m_host.AddScriptLPS(1); |
9509 | UUID key; | 9529 | UUID key; |
9510 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; | 9530 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
9511 | if (land.OwnerID == m_host.OwnerID) | 9531 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) |
9512 | { | 9532 | { |
9513 | if (UUID.TryParse(avatar, out key)) | 9533 | if (UUID.TryParse(avatar, out key)) |
9514 | { | 9534 | { |
9515 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) | 9535 | int idx = land.LandData.ParcelAccessList.FindIndex( |
9516 | { | 9536 | delegate(ParcelManager.ParcelAccessEntry e) |
9517 | if (entry.AgentID == key && entry.Flags == AccessList.Ban) | 9537 | { |
9518 | { | 9538 | if (e.AgentID == key && e.Flags == AccessList.Ban) |
9519 | land.ParcelAccessList.Remove(entry); | 9539 | return true; |
9520 | break; | 9540 | return false; |
9521 | } | 9541 | }); |
9522 | } | 9542 | |
9543 | if (idx != -1) | ||
9544 | land.LandData.ParcelAccessList.RemoveAt(idx); | ||
9523 | } | 9545 | } |
9524 | } | 9546 | } |
9525 | ScriptSleep(100); | 9547 | ScriptSleep(100); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 827626f..5a796b8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -336,6 +336,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
336 | } | 336 | } |
337 | } | 337 | } |
338 | 338 | ||
339 | internal void OSSLDeprecated(string function, string replacement) | ||
340 | { | ||
341 | OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); | ||
342 | } | ||
343 | |||
339 | protected void ScriptSleep(int delay) | 344 | protected void ScriptSleep(int delay) |
340 | { | 345 | { |
341 | delay = (int)((float)delay * m_ScriptDelayFactor); | 346 | delay = (int)((float)delay * m_ScriptDelayFactor); |
@@ -347,13 +352,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
347 | // | 352 | // |
348 | // OpenSim functions | 353 | // OpenSim functions |
349 | // | 354 | // |
355 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) | ||
356 | { | ||
357 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); | ||
358 | return SetTerrainHeight(x, y, val); | ||
359 | } | ||
350 | public LSL_Integer osTerrainSetHeight(int x, int y, double val) | 360 | public LSL_Integer osTerrainSetHeight(int x, int y, double val) |
351 | { | 361 | { |
352 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); | 362 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); |
353 | 363 | OSSLDeprecated("osTerrainSetHeight", "osSetTerrainHeight"); | |
364 | return SetTerrainHeight(x, y, val); | ||
365 | } | ||
366 | private LSL_Integer SetTerrainHeight(int x, int y, double val) | ||
367 | { | ||
354 | m_host.AddScriptLPS(1); | 368 | m_host.AddScriptLPS(1); |
355 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) | 369 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) |
356 | OSSLError("osTerrainSetHeight: Coordinate out of bounds"); | 370 | OSSLError("osSetTerrainHeight: Coordinate out of bounds"); |
357 | 371 | ||
358 | if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) | 372 | if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) |
359 | { | 373 | { |
@@ -366,13 +380,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
366 | } | 380 | } |
367 | } | 381 | } |
368 | 382 | ||
383 | public LSL_Float osGetTerrainHeight(int x, int y) | ||
384 | { | ||
385 | CheckThreatLevel(ThreatLevel.None, "osGetTerrainHeight"); | ||
386 | return GetTerrainHeight(x, y); | ||
387 | } | ||
369 | public LSL_Float osTerrainGetHeight(int x, int y) | 388 | public LSL_Float osTerrainGetHeight(int x, int y) |
370 | { | 389 | { |
371 | CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight"); | 390 | CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight"); |
372 | 391 | OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); | |
392 | return GetTerrainHeight(x, y); | ||
393 | } | ||
394 | private LSL_Float GetTerrainHeight(int x, int y) | ||
395 | { | ||
373 | m_host.AddScriptLPS(1); | 396 | m_host.AddScriptLPS(1); |
374 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) | 397 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) |
375 | OSSLError("osTerrainGetHeight: Coordinate out of bounds"); | 398 | OSSLError("osGetTerrainHeight: Coordinate out of bounds"); |
376 | 399 | ||
377 | return World.Heightmap[x, y]; | 400 | return World.Heightmap[x, y]; |
378 | } | 401 | } |
@@ -1001,9 +1024,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1001 | return drawList; | 1024 | return drawList; |
1002 | } | 1025 | } |
1003 | 1026 | ||
1027 | public string osSetPenColor(string drawList, string color) | ||
1028 | { | ||
1029 | CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); | ||
1030 | |||
1031 | m_host.AddScriptLPS(1); | ||
1032 | drawList += "PenColor " + color + "; "; | ||
1033 | return drawList; | ||
1034 | } | ||
1035 | // Deprecated | ||
1004 | public string osSetPenColour(string drawList, string colour) | 1036 | public string osSetPenColour(string drawList, string colour) |
1005 | { | 1037 | { |
1006 | CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); | 1038 | CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); |
1039 | OSSLDeprecated("osSetPenColour", "osSetPenColor"); | ||
1007 | 1040 | ||
1008 | m_host.AddScriptLPS(1); | 1041 | m_host.AddScriptLPS(1); |
1009 | drawList += "PenColour " + colour + "; "; | 1042 | drawList += "PenColour " + colour + "; "; |
@@ -1012,7 +1045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1012 | 1045 | ||
1013 | public string osSetPenCap(string drawList, string direction, string type) | 1046 | public string osSetPenCap(string drawList, string direction, string type) |
1014 | { | 1047 | { |
1015 | CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); | 1048 | CheckThreatLevel(ThreatLevel.None, "osSetPenCap"); |
1016 | 1049 | ||
1017 | m_host.AddScriptLPS(1); | 1050 | m_host.AddScriptLPS(1); |
1018 | drawList += "PenCap " + direction + "," + type + "; "; | 1051 | drawList += "PenCap " + direction + "," + type + "; "; |
@@ -1157,6 +1190,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1157 | public double osSunGetParam(string param) | 1190 | public double osSunGetParam(string param) |
1158 | { | 1191 | { |
1159 | CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); | 1192 | CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); |
1193 | OSSLDeprecated("osSunGetParam", "osGetSunParam"); | ||
1194 | return GetSunParam(param); | ||
1195 | } | ||
1196 | public double osGetSunParam(string param) | ||
1197 | { | ||
1198 | CheckThreatLevel(ThreatLevel.None, "osGetSunParam"); | ||
1199 | return GetSunParam(param); | ||
1200 | } | ||
1201 | private double GetSunParam(string param) | ||
1202 | { | ||
1160 | m_host.AddScriptLPS(1); | 1203 | m_host.AddScriptLPS(1); |
1161 | 1204 | ||
1162 | double value = 0.0; | 1205 | double value = 0.0; |
@@ -1173,6 +1216,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1173 | public void osSunSetParam(string param, double value) | 1216 | public void osSunSetParam(string param, double value) |
1174 | { | 1217 | { |
1175 | CheckThreatLevel(ThreatLevel.None, "osSunSetParam"); | 1218 | CheckThreatLevel(ThreatLevel.None, "osSunSetParam"); |
1219 | OSSLDeprecated("osSunSetParam", "osSetSunParam"); | ||
1220 | SetSunParam(param, value); | ||
1221 | } | ||
1222 | public void osSetSunParam(string param, double value) | ||
1223 | { | ||
1224 | CheckThreatLevel(ThreatLevel.None, "osSetSunParam"); | ||
1225 | SetSunParam(param, value); | ||
1226 | } | ||
1227 | private void SetSunParam(string param, double value) | ||
1228 | { | ||
1176 | m_host.AddScriptLPS(1); | 1229 | m_host.AddScriptLPS(1); |
1177 | 1230 | ||
1178 | ISunModule module = World.RequestModuleInterface<ISunModule>(); | 1231 | ISunModule module = World.RequestModuleInterface<ISunModule>(); |
@@ -1198,9 +1251,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1198 | return String.Empty; | 1251 | return String.Empty; |
1199 | } | 1252 | } |
1200 | 1253 | ||
1201 | public void osWindParamSet(string plugin, string param, float value) | 1254 | public void osSetWindParam(string plugin, string param, float value) |
1202 | { | 1255 | { |
1203 | CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamSet"); | 1256 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam"); |
1204 | m_host.AddScriptLPS(1); | 1257 | m_host.AddScriptLPS(1); |
1205 | 1258 | ||
1206 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1259 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
@@ -1214,9 +1267,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1214 | } | 1267 | } |
1215 | } | 1268 | } |
1216 | 1269 | ||
1217 | public float osWindParamGet(string plugin, string param) | 1270 | public float osGetWindParam(string plugin, string param) |
1218 | { | 1271 | { |
1219 | CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamGet"); | 1272 | CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); |
1220 | m_host.AddScriptLPS(1); | 1273 | m_host.AddScriptLPS(1); |
1221 | 1274 | ||
1222 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1275 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
@@ -1257,7 +1310,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1257 | 1310 | ||
1258 | public void osParcelSetDetails(LSL_Vector pos, LSL_List rules) | 1311 | public void osParcelSetDetails(LSL_Vector pos, LSL_List rules) |
1259 | { | 1312 | { |
1260 | CheckThreatLevel(ThreatLevel.High, "osParcelSetDetails"); | 1313 | const string functionName = "osParcelSetDetails"; |
1314 | CheckThreatLevel(ThreatLevel.High, functionName); | ||
1315 | OSSLDeprecated(functionName, "osSetParcelDetails"); | ||
1316 | SetParcelDetails(pos, rules, functionName); | ||
1317 | } | ||
1318 | public void osSetParcelDetails(LSL_Vector pos, LSL_List rules) | ||
1319 | { | ||
1320 | const string functionName = "osSetParcelDetails"; | ||
1321 | CheckThreatLevel(ThreatLevel.High, functionName); | ||
1322 | SetParcelDetails(pos, rules, functionName); | ||
1323 | } | ||
1324 | private void SetParcelDetails(LSL_Vector pos, LSL_List rules, string functionName) | ||
1325 | { | ||
1261 | m_host.AddScriptLPS(1); | 1326 | m_host.AddScriptLPS(1); |
1262 | 1327 | ||
1263 | // Get a reference to the land data and make sure the owner of the script | 1328 | // Get a reference to the land data and make sure the owner of the script |
@@ -1270,7 +1335,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1270 | return; | 1335 | return; |
1271 | } | 1336 | } |
1272 | 1337 | ||
1273 | if (! World.Permissions.CanEditParcel(m_host.OwnerID, startLandObject)) | 1338 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions)) |
1274 | { | 1339 | { |
1275 | OSSLShoutError("You do not have permission to modify the parcel"); | 1340 | OSSLShoutError("You do not have permission to modify the parcel"); |
1276 | return; | 1341 | return; |
@@ -1296,13 +1361,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1296 | break; | 1361 | break; |
1297 | 1362 | ||
1298 | case 2: | 1363 | case 2: |
1299 | CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails"); | 1364 | CheckThreatLevel(ThreatLevel.VeryHigh, functionName); |
1300 | if (UUID.TryParse(arg , out uuid)) | 1365 | if (UUID.TryParse(arg , out uuid)) |
1301 | newLand.OwnerID = uuid; | 1366 | newLand.OwnerID = uuid; |
1302 | break; | 1367 | break; |
1303 | 1368 | ||
1304 | case 3: | 1369 | case 3: |
1305 | CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails"); | 1370 | CheckThreatLevel(ThreatLevel.VeryHigh, functionName); |
1306 | if (UUID.TryParse(arg , out uuid)) | 1371 | if (UUID.TryParse(arg , out uuid)) |
1307 | newLand.GroupID = uuid; | 1372 | newLand.GroupID = uuid; |
1308 | break; | 1373 | break; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 10d61ca..63007c6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -67,8 +67,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
67 | string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | 67 | string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, |
68 | bool blend, int disp, int timer, int alpha, int face); | 68 | bool blend, int disp, int timer, int alpha, int face); |
69 | 69 | ||
70 | LSL_Float osTerrainGetHeight(int x, int y); | 70 | LSL_Float osGetTerrainHeight(int x, int y); |
71 | LSL_Integer osTerrainSetHeight(int x, int y, double val); | 71 | LSL_Float osTerrainGetHeight(int x, int y); // Deprecated |
72 | LSL_Integer osSetTerrainHeight(int x, int y, double val); | ||
73 | LSL_Integer osTerrainSetHeight(int x, int y, double val); //Deprecated | ||
72 | void osTerrainFlush(); | 74 | void osTerrainFlush(); |
73 | 75 | ||
74 | int osRegionRestart(double seconds); | 76 | int osRegionRestart(double seconds); |
@@ -107,7 +109,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
107 | string osSetFontName(string drawList, string fontName); | 109 | string osSetFontName(string drawList, string fontName); |
108 | string osSetFontSize(string drawList, int fontSize); | 110 | string osSetFontSize(string drawList, int fontSize); |
109 | string osSetPenSize(string drawList, int penSize); | 111 | string osSetPenSize(string drawList, int penSize); |
110 | string osSetPenColour(string drawList, string colour); | 112 | string osSetPenColor(string drawList, string color); |
113 | string osSetPenColour(string drawList, string colour); // Deprecated | ||
111 | string osSetPenCap(string drawList, string direction, string type); | 114 | string osSetPenCap(string drawList, string direction, string type); |
112 | string osDrawImage(string drawList, int width, int height, string imageUrl); | 115 | string osDrawImage(string drawList, int width, int height, string imageUrl); |
113 | vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize); | 116 | vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize); |
@@ -119,18 +122,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
119 | void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour); | 122 | void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour); |
120 | void osSetEstateSunSettings(bool sunFixed, double sunHour); | 123 | void osSetEstateSunSettings(bool sunFixed, double sunHour); |
121 | double osGetCurrentSunHour(); | 124 | double osGetCurrentSunHour(); |
122 | double osSunGetParam(string param); | 125 | double osGetSunParam(string param); |
123 | void osSunSetParam(string param, double value); | 126 | double osSunGetParam(string param); // Deprecated |
127 | void osSetSunParam(string param, double value); | ||
128 | void osSunSetParam(string param, double value); // Deprecated | ||
124 | 129 | ||
125 | // Wind Module Functions | 130 | // Wind Module Functions |
126 | string osWindActiveModelPluginName(); | 131 | string osWindActiveModelPluginName(); |
127 | void osWindParamSet(string plugin, string param, float value); | 132 | void osSetWindParam(string plugin, string param, float value); |
128 | float osWindParamGet(string plugin, string param); | 133 | float osGetWindParam(string plugin, string param); |
129 | 134 | ||
130 | // Parcel commands | 135 | // Parcel commands |
131 | void osParcelJoin(vector pos1, vector pos2); | 136 | void osParcelJoin(vector pos1, vector pos2); |
132 | void osParcelSubdivide(vector pos1, vector pos2); | 137 | void osParcelSubdivide(vector pos1, vector pos2); |
133 | void osParcelSetDetails(vector pos, LSL_List rules); | 138 | void osSetParcelDetails(vector pos, LSL_List rules); |
139 | void osParcelSetDetails(vector pos, LSL_List rules); // Deprecated | ||
134 | 140 | ||
135 | string osGetScriptEngineName(); | 141 | string osGetScriptEngineName(); |
136 | string osGetSimulatorVersion(); | 142 | string osGetSimulatorVersion(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index f3142e6..e3ea556 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -81,11 +81,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
81 | return m_OSSL_Functions.osGetCurrentSunHour(); | 81 | return m_OSSL_Functions.osGetCurrentSunHour(); |
82 | } | 82 | } |
83 | 83 | ||
84 | public double osGetSunParam(string param) | ||
85 | { | ||
86 | return m_OSSL_Functions.osGetSunParam(param); | ||
87 | } | ||
88 | // Deprecated | ||
84 | public double osSunGetParam(string param) | 89 | public double osSunGetParam(string param) |
85 | { | 90 | { |
86 | return m_OSSL_Functions.osSunGetParam(param); | 91 | return m_OSSL_Functions.osSunGetParam(param); |
87 | } | 92 | } |
88 | 93 | ||
94 | public void osSetSunParam(string param, double value) | ||
95 | { | ||
96 | m_OSSL_Functions.osSetSunParam(param, value); | ||
97 | } | ||
98 | // Deprecated | ||
89 | public void osSunSetParam(string param, double value) | 99 | public void osSunSetParam(string param, double value) |
90 | { | 100 | { |
91 | m_OSSL_Functions.osSunSetParam(param, value); | 101 | m_OSSL_Functions.osSunSetParam(param, value); |
@@ -97,14 +107,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
97 | } | 107 | } |
98 | 108 | ||
99 | // Not yet plugged in as available OSSL functions, so commented out | 109 | // Not yet plugged in as available OSSL functions, so commented out |
100 | // void osWindParamSet(string plugin, string param, float value) | 110 | // void osSetWindParam(string plugin, string param, float value) |
101 | // { | 111 | // { |
102 | // m_OSSL_Functions.osWindParamSet(plugin, param, value); | 112 | // m_OSSL_Functions.osSetWindParam(plugin, param, value); |
103 | // } | 113 | // } |
104 | // | 114 | // |
105 | // float osWindParamGet(string plugin, string param) | 115 | // float osGetWindParam(string plugin, string param) |
106 | // { | 116 | // { |
107 | // return m_OSSL_Functions.osWindParamGet(plugin, param); | 117 | // return m_OSSL_Functions.osGetWindParam(plugin, param); |
108 | // } | 118 | // } |
109 | 119 | ||
110 | public void osParcelJoin(vector pos1, vector pos2) | 120 | public void osParcelJoin(vector pos1, vector pos2) |
@@ -116,7 +126,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
116 | { | 126 | { |
117 | m_OSSL_Functions.osParcelSubdivide(pos1, pos2); | 127 | m_OSSL_Functions.osParcelSubdivide(pos1, pos2); |
118 | } | 128 | } |
119 | 129 | ||
130 | public void osSetParcelDetails(vector pos, LSL_List rules) | ||
131 | { | ||
132 | m_OSSL_Functions.osSetParcelDetails(pos, rules); | ||
133 | } | ||
134 | // Deprecated | ||
120 | public void osParcelSetDetails(vector pos, LSL_List rules) | 135 | public void osParcelSetDetails(vector pos, LSL_List rules) |
121 | { | 136 | { |
122 | m_OSSL_Functions.osParcelSetDetails(pos,rules); | 137 | m_OSSL_Functions.osParcelSetDetails(pos,rules); |
@@ -165,11 +180,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
165 | blend, disp, timer, alpha, face); | 180 | blend, disp, timer, alpha, face); |
166 | } | 181 | } |
167 | 182 | ||
183 | public LSL_Float osGetTerrainHeight(int x, int y) | ||
184 | { | ||
185 | return m_OSSL_Functions.osGetTerrainHeight(x, y); | ||
186 | } | ||
187 | // Deprecated | ||
168 | public LSL_Float osTerrainGetHeight(int x, int y) | 188 | public LSL_Float osTerrainGetHeight(int x, int y) |
169 | { | 189 | { |
170 | return m_OSSL_Functions.osTerrainGetHeight(x, y); | 190 | return m_OSSL_Functions.osTerrainGetHeight(x, y); |
171 | } | 191 | } |
172 | 192 | ||
193 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) | ||
194 | { | ||
195 | return m_OSSL_Functions.osSetTerrainHeight(x, y, val); | ||
196 | } | ||
197 | // Deprecated | ||
173 | public LSL_Integer osTerrainSetHeight(int x, int y, double val) | 198 | public LSL_Integer osTerrainSetHeight(int x, int y, double val) |
174 | { | 199 | { |
175 | return m_OSSL_Functions.osTerrainSetHeight(x, y, val); | 200 | return m_OSSL_Functions.osTerrainSetHeight(x, y, val); |
@@ -333,6 +358,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
333 | return m_OSSL_Functions.osSetPenCap(drawList, direction, type); | 358 | return m_OSSL_Functions.osSetPenCap(drawList, direction, type); |
334 | } | 359 | } |
335 | 360 | ||
361 | public string osSetPenColor(string drawList, string color) | ||
362 | { | ||
363 | return m_OSSL_Functions.osSetPenColor(drawList, color); | ||
364 | } | ||
365 | // Deprecated | ||
336 | public string osSetPenColour(string drawList, string colour) | 366 | public string osSetPenColour(string drawList, string colour) |
337 | { | 367 | { |
338 | return m_OSSL_Functions.osSetPenColour(drawList, colour); | 368 | return m_OSSL_Functions.osSetPenColour(drawList, colour); |