aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorCharles Krinke2007-12-19 02:30:28 +0000
committerCharles Krinke2007-12-19 02:30:28 +0000
commit16174dac6e6bc3510efbac4a445088e83e9354d3 (patch)
treebe0ebd20fb50e26d1a90c1b8b2011a0c049a8b67 /OpenSim/Region/ScriptEngine
parent*Parcels now fully work on MySQL as a datastore after a few tweaks and bug fi... (diff)
downloadopensim-SC_OLD-16174dac6e6bc3510efbac4a445088e83e9354d3.zip
opensim-SC_OLD-16174dac6e6bc3510efbac4a445088e83e9354d3.tar.gz
opensim-SC_OLD-16174dac6e6bc3510efbac4a445088e83e9354d3.tar.bz2
opensim-SC_OLD-16174dac6e6bc3510efbac4a445088e83e9354d3.tar.xz
Thanks to CharlieO for:
llSetLinkColor() and a temp place holder for llOwnerSay() since many example scripts that are copy/pasted from outside sources have llOwnerSay() and its obnoxious to change in scripts each time.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs49
1 files changed, 47 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index ef31ecc..bd6eadb 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -1172,7 +1172,49 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1172 1172
1173 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) 1173 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face)
1174 { 1174 {
1175 NotImplemented("llSetLinkColor"); 1175 // still needs to be adjusted for compatability with link constants
1176 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
1177 if (part != null)
1178 {
1179 LLObject.TextureEntry tex = new LLObject.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length);
1180 LLColor texcolor;
1181 if (face > -1)
1182 {
1183 texcolor = tex.CreateFace((uint)face).RGBA;
1184 texcolor.R = (float)Math.Abs(color.x - 1);
1185 texcolor.G = (float)Math.Abs(color.y - 1);
1186 texcolor.B = (float)Math.Abs(color.z - 1);
1187 tex.FaceTextures[face].RGBA = texcolor;
1188 part.UpdateTexture(tex);
1189 return;
1190 }
1191 else if (face == -1)
1192 {
1193 texcolor = tex.DefaultTexture.RGBA;
1194 texcolor.R = (float)Math.Abs(color.x - 1);
1195 texcolor.G = (float)Math.Abs(color.y - 1);
1196 texcolor.B = (float)Math.Abs(color.z - 1);
1197 tex.DefaultTexture.RGBA = texcolor;
1198 for (uint i = 0; i < 32; i++)
1199 {
1200 if (tex.FaceTextures[i] != null)
1201 {
1202 texcolor = tex.FaceTextures[i].RGBA;
1203 texcolor.R = (float)Math.Abs(color.x - 1);
1204 texcolor.G = (float)Math.Abs(color.y - 1);
1205 texcolor.B = (float)Math.Abs(color.z - 1);
1206 tex.FaceTextures[i].RGBA = texcolor;
1207 }
1208 }
1209 part.UpdateTexture(tex);
1210 return;
1211 }
1212 return;
1213 }
1214 else
1215 {
1216 throw new Exception("Link does not contain enough prims for the given linknumber setting");
1217 }
1176 } 1218 }
1177 1219
1178 public void llCreateLink(string target, int parent) 1220 public void llCreateLink(string target, int parent)
@@ -2407,7 +2449,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2407 2449
2408 public void llOwnerSay(string msg) 2450 public void llOwnerSay(string msg)
2409 { 2451 {
2410 NotImplemented("llOwnerSay"); 2452 //temp fix so that lsl wiki examples aren't annoying to use to test other functions
2453 World.SimChat(Helpers.StringToField(msg),ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
2454 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
2455 wComm.DeliverMessage(m_host.UUID.ToString(), ChatTypeEnum.Say, 0, m_host.Name, msg);
2411 } 2456 }
2412 2457
2413 public void llRequestSimulatorData(string simulator, int data) 2458 public void llRequestSimulatorData(string simulator, int data)