aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-05-29 13:55:02 +0000
committerCharles Krinke2008-05-29 13:55:02 +0000
commita84456c2391e9fa7c5ade8244bf979118a3d0e29 (patch)
tree171bfef98548d185ed65643b23ec0dc6b528b5d6 /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
parentcleaning up returned XML REST doclet (no more xsi, xsd) (diff)
downloadopensim-SC-a84456c2391e9fa7c5ade8244bf979118a3d0e29.zip
opensim-SC-a84456c2391e9fa7c5ade8244bf979118a3d0e29.tar.gz
opensim-SC-a84456c2391e9fa7c5ade8244bf979118a3d0e29.tar.bz2
opensim-SC-a84456c2391e9fa7c5ade8244bf979118a3d0e29.tar.xz
Mantis#1411. Thank you kindly for Dataserver.cs and a patch
that adds function stub to request region info by name and adds llRequestSimulatorData() and the dataserver event
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs48
1 files changed, 46 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 4e25ff8..9a2d240 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -5618,10 +5618,54 @@ namespace OpenSim.Region.ScriptEngine.Common
5618 wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 5618 wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
5619 } 5619 }
5620 5620
5621 public void llRequestSimulatorData(string simulator, int data) 5621 public string llRequestSimulatorData(string simulator, int data)
5622 { 5622 {
5623 m_host.AddScriptLPS(1); 5623 m_host.AddScriptLPS(1);
5624 NotImplemented("llRequestSimulatorData"); 5624
5625 string reply = String.Empty;
5626
5627 RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator);
5628
5629 switch(data)
5630 {
5631 case 5: // DATA_SIM_POS
5632 if(info == null)
5633 return LLUUID.Zero.ToString();
5634 reply = new LSL_Types.Vector3(
5635 info.RegionLocX * Constants.RegionSize,
5636 info.RegionLocY * Constants.RegionSize,
5637 0).ToString();
5638 break;
5639 case 6: // DATA_SIM_STATUS
5640 if(info != null)
5641 reply = "up"; // Duh!
5642 else
5643 reply = "unknown";
5644 break;
5645 case 7: // DATA_SIM_RATING
5646 if(info == null)
5647 return LLUUID.Zero.ToString();
5648 int access = (int)info.EstateSettings.simAccess;
5649 if(access == 21)
5650 reply = "MATURE";
5651 else if(access == 13)
5652 reply = "MATURE";
5653 else
5654 reply = "UNKNOWN";
5655 break;
5656 default:
5657 return LLUUID.Zero.ToString(); // Raise no event
5658 }
5659 LLUUID rq = LLUUID.Random();
5660
5661 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.
5662 m_Dataserver.RegisterRequest(m_localID,
5663 m_itemID, rq.ToString());
5664
5665 m_ScriptEngine.m_ASYNCLSLCommandManager.
5666 m_Dataserver.DataserverReply(rq.ToString(), reply);
5667
5668 return tid.ToString();
5625 } 5669 }
5626 5670
5627 public void llForceMouselook(int mouselook) 5671 public void llForceMouselook(int mouselook)