diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index dc4de8ef59..30c8e4cf82 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -943,6 +943,10 @@ namespace OpenSim.Client.MXP.ClientStack // Need to translate to MXP somehow } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { // Need to translate to MXP somehow diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 3f3166a461..bc48123cf2 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs @@ -513,6 +513,10 @@ namespace OpenSim.Client.Sirikata.ClientStack throw new System.NotImplementedException(); } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { throw new System.NotImplementedException(); diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 11eed0959d..e6d1c48b07 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -519,6 +519,10 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { throw new System.NotImplementedException(); diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 96223fff39..71174d2e6c 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -985,6 +985,7 @@ namespace OpenSim.Framework void SendInstantMessage(GridInstantMessage im); + void SendGenericMessage(string method, List message); void SendGenericMessage(string method, List message); void SendLayerData(float[] map); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3888a0b585..173c9e5fe1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -831,6 +831,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendGenericMessage(string method, List message) + { + GenericMessagePacket gmp = new GenericMessagePacket(); + gmp.MethodData.Method = Util.StringToBytes256(method); + gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; + int i = 0; + foreach (string val in message) + { + gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); + gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); + } + + OutPacket(gmp, ThrottleOutPacketType.Task); + } + public void SendGenericMessage(string method, List message) { GenericMessagePacket gmp = new GenericMessagePacket(); diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 4bbe9df5d2..a84a3c8cf3 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -461,6 +461,10 @@ namespace OpenSim.Region.Examples.SimpleModule } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c45fc0ff34..49a77665b2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1393,6 +1393,12 @@ namespace OpenSim.Region.Framework.Scenes { m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick. Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); + + // TODO: This doesn't prevent the user from walking yet. + // Setting parent ID would fix this, if we knew what value + // to use. Or we could add a m_isSitting variable. + //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); + SitGround = true; } // In the future, these values might need to go global. @@ -1409,7 +1415,7 @@ namespace OpenSim.Region.Framework.Scenes bool update_movementflag = false; - if (m_allowMovement) + if (m_allowMovement && !SitGround) { if (agentData.UseClientAgentPosition) { diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index bb82fd4530..2ed8fbffab 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -974,6 +974,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index 30580e7919..e189489d75 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -97,6 +97,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// String Description { get; set; } + /// + /// Returns the UUID of the Owner of the Object. + /// + UUID OwnerId { get; } + + /// + /// Returns the UUID of the Creator of the Object. + /// + UUID CreatorId { get; } + /// /// Returns the root object of a linkset. If this object is the root, it will return itself. /// @@ -179,9 +189,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// /// The message to send to the user void Say(string msg); - + + /// + /// Causes the object to speak to on a specific channel, + /// equivilent to LSL/OSSL llSay + /// + /// The message to send to the user + /// The channel on which to send the message void Say(string msg,int channel); + /// + /// Opens a Dialog Panel in the Users Viewer, + /// equivilent to LSL/OSSL llDialog + /// + /// The UUID of the Avatar to which the Dialog should be send + /// The Message to display at the top of the Dialog + /// The Strings that act as label/value of the Bottons in the Dialog + /// The channel on which to send the response + void Dialog(UUID avatar, string message, string[] buttons, int chat_channel); + //// /// Grants access to the objects inventory /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 5bfe4bedce..96cccb77d0 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -31,6 +31,7 @@ using System.Security; using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; using OpenSim.Region.Physics.Manager; @@ -169,6 +170,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule } } + public UUID OwnerId + { + get { return GetSOP().OwnerID;} + } + + public UUID CreatorId + { + get { return GetSOP().CreatorID;} + } + public IObject[] Children { get @@ -392,7 +403,48 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule SceneObjectPart sop = GetSOP(); m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); } - + + public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel) + { + if (!CanEdit()) + return; + + IDialogModule dm = m_rootScene.RequestModuleInterface(); + + if (dm == null) + return; + + if (buttons.Length < 1) + { + Say("ERROR: No less than 1 button can be shown",2147483647); + return; + } + if (buttons.Length > 12) + { + Say("ERROR: No more than 12 buttons can be shown",2147483647); + return; + } + + foreach(string button in buttons) + { + if (button == String.Empty) + { + Say("ERROR: button label cannot be blank",2147483647); + return; + } + if (button.Length > 24) + { + Say("ERROR: button label cannot be longer than 24 characters",2147483647); + return; + } + } + + dm.SendDialogToUser( + avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, + message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); + + } + #endregion diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 9f6a33aae0..e43ef788ef 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -551,6 +551,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 49847757a0..ebbf4ffbd7 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -519,6 +519,11 @@ namespace OpenSim.Tests.Common.Mock } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) {