diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0a871d9..59db81e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4009,10 +4009,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4009 | ScriptSleep(5000); | 4009 | ScriptSleep(5000); |
4010 | } | 4010 | } |
4011 | 4011 | ||
4012 | public void llTextBox(string avatar, string message, int chat_channel) | 4012 | public void llTextBox(string agent, string message, int chatChannel) |
4013 | { | 4013 | { |
4014 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); | ||
4015 | |||
4016 | if (dm == null) | ||
4017 | return; | ||
4018 | |||
4014 | m_host.AddScriptLPS(1); | 4019 | m_host.AddScriptLPS(1); |
4015 | NotImplemented("llTextBox"); | 4020 | UUID av = new UUID(); |
4021 | if (!UUID.TryParse(agent,out av)) | ||
4022 | { | ||
4023 | LSLError("First parameter to llDialog needs to be a key"); | ||
4024 | return; | ||
4025 | } | ||
4026 | |||
4027 | if( message == string.Empty) | ||
4028 | { | ||
4029 | ShoutError("Trying to use llTextBox with empty message."); | ||
4030 | } | ||
4031 | else if (message.Length > 512) | ||
4032 | { | ||
4033 | ShoutError("Trying to use llTextBox with message over 512 characters."); | ||
4034 | } | ||
4035 | else | ||
4036 | { | ||
4037 | dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); | ||
4038 | ScriptSleep(1000); | ||
4039 | } | ||
4016 | } | 4040 | } |
4017 | 4041 | ||
4018 | public void llModifyLand(int action, int brush) | 4042 | public void llModifyLand(int action, int brush) |
@@ -4027,6 +4051,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4027 | 4051 | ||
4028 | public void llCollisionSound(string impact_sound, double impact_volume) | 4052 | public void llCollisionSound(string impact_sound, double impact_volume) |
4029 | { | 4053 | { |
4054 | |||
4030 | m_host.AddScriptLPS(1); | 4055 | m_host.AddScriptLPS(1); |
4031 | // TODO: Parameter check logic required. | 4056 | // TODO: Parameter check logic required. |
4032 | UUID soundId = UUID.Zero; | 4057 | UUID soundId = UUID.Zero; |
@@ -5875,7 +5900,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5875 | 5900 | ||
5876 | for (int i = 0; i < rules.Length; i += 2) | 5901 | for (int i = 0; i < rules.Length; i += 2) |
5877 | { | 5902 | { |
5878 | switch (Convert.ToInt32(rules.Data[i])) | 5903 | switch (rules.GetLSLIntegerItem(i)) |
5879 | { | 5904 | { |
5880 | case (int)ScriptBaseClass.PSYS_PART_FLAGS: | 5905 | case (int)ScriptBaseClass.PSYS_PART_FLAGS: |
5881 | prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); | 5906 | prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); |
@@ -9846,4 +9871,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9846 | } | 9871 | } |
9847 | } | 9872 | } |
9848 | } | 9873 | } |
9849 | } \ No newline at end of file | 9874 | } |