diff options
author | Diva Canto | 2009-09-26 07:48:21 -0700 |
---|---|---|
committer | Diva Canto | 2009-09-26 07:48:21 -0700 |
commit | 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 (patch) | |
tree | bed3c7ab11459e84baa5a0fbd98dde4a81fd5e16 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | More small changes to FlotsamAssetCache as per mcortez' request. (diff) | |
download | opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.zip opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.gz opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.bz2 opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.xz |
First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 25 |
2 files changed, 22 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4c52b11..1ebe24e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -50,6 +50,9 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | |||
50 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | 50 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; |
51 | using OpenSim.Region.ScriptEngine.Interfaces; | 51 | using OpenSim.Region.ScriptEngine.Interfaces; |
52 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | 52 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; |
53 | using OpenSim.Services.Interfaces; | ||
54 | |||
55 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
53 | 56 | ||
54 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 57 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
55 | 58 | ||
@@ -5226,12 +5229,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5226 | } | 5229 | } |
5227 | } | 5230 | } |
5228 | 5231 | ||
5229 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); | 5232 | List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID); |
5230 | 5233 | ||
5231 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; | 5234 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; |
5232 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; | 5235 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; |
5233 | 5236 | ||
5234 | foreach (SimpleRegionInfo sri in neighbors) | 5237 | foreach (GridRegion sri in neighbors) |
5235 | { | 5238 | { |
5236 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) | 5239 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) |
5237 | return 0; | 5240 | return 0; |
@@ -8181,7 +8184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8181 | 8184 | ||
8182 | string reply = String.Empty; | 8185 | string reply = String.Empty; |
8183 | 8186 | ||
8184 | RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); | 8187 | GridRegion info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator); |
8185 | 8188 | ||
8186 | switch (data) | 8189 | switch (data) |
8187 | { | 8190 | { |
@@ -8208,7 +8211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8208 | ConditionalScriptSleep(1000); | 8211 | ConditionalScriptSleep(1000); |
8209 | return UUID.Zero.ToString(); | 8212 | return UUID.Zero.ToString(); |
8210 | } | 8213 | } |
8211 | int access = info.RegionSettings.Maturity; | 8214 | int access = info.Maturity; |
8212 | if (access == 0) | 8215 | if (access == 0) |
8213 | reply = "PG"; | 8216 | reply = "PG"; |
8214 | else if (access == 1) | 8217 | else if (access == 1) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ccdd4c5..0b95abc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -48,6 +48,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | |||
48 | using OpenSim.Region.ScriptEngine.Interfaces; | 48 | using OpenSim.Region.ScriptEngine.Interfaces; |
49 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | 49 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; |
50 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; | 50 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; |
51 | using OpenSim.Services.Interfaces; | ||
52 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
51 | using System.Text.RegularExpressions; | 53 | using System.Text.RegularExpressions; |
52 | 54 | ||
53 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | 55 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; |
@@ -599,17 +601,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
599 | if (regionName.Contains(".") && regionName.Contains(":")) | 601 | if (regionName.Contains(".") && regionName.Contains(":")) |
600 | { | 602 | { |
601 | // Try to link the region | 603 | // Try to link the region |
602 | RegionInfo regInfo = HGHyperlink.TryLinkRegion(World, | 604 | IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>(); |
603 | presence.ControllingClient, | 605 | if (hyperService != null) |
604 | regionName); | ||
605 | // Get the region name | ||
606 | if (regInfo != null) | ||
607 | { | 606 | { |
608 | regionName = regInfo.RegionName; | 607 | GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient, |
609 | } | 608 | regionName); |
610 | else | 609 | // Get the region name |
611 | { | 610 | if (regInfo != null) |
612 | // Might need to ping the client here in case of failure?? | 611 | { |
612 | regionName = regInfo.RegionName; | ||
613 | } | ||
614 | else | ||
615 | { | ||
616 | // Might need to ping the client here in case of failure?? | ||
617 | } | ||
613 | } | 618 | } |
614 | } | 619 | } |
615 | presence.ControllingClient.SendTeleportLocationStart(); | 620 | presence.ControllingClient.SendTeleportLocationStart(); |