aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJeff Ames2008-06-25 14:30:28 +0000
committerJeff Ames2008-06-25 14:30:28 +0000
commita2b1a1787d620f70c10221545414b41ffdfe27da (patch)
treefe356d669c4dffab062192a6676acb3cf4c6641c /OpenSim/Region/ScriptEngine
parentMantis#1584. Thank you kindly, Lulurun for a patch that: (diff)
downloadopensim-SC_OLD-a2b1a1787d620f70c10221545414b41ffdfe27da.zip
opensim-SC_OLD-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.gz
opensim-SC_OLD-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.bz2
opensim-SC_OLD-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.xz
Minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs62
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs2
8 files changed, 43 insertions, 43 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 08cf4a7..a9d1309 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2697,40 +2697,40 @@ namespace OpenSim.Region.ScriptEngine.Common
2697 public void llGiveInventory(string destination, string inventory) 2697 public void llGiveInventory(string destination, string inventory)
2698 { 2698 {
2699 m_host.AddScriptLPS(1); 2699 m_host.AddScriptLPS(1);
2700 bool found = false; 2700 bool found = false;
2701 LLUUID destId = LLUUID.Zero; 2701 LLUUID destId = LLUUID.Zero;
2702 LLUUID objId = LLUUID.Zero; 2702 LLUUID objId = LLUUID.Zero;
2703 2703
2704 if(!LLUUID.TryParse(destination, out destId)) 2704 if (!LLUUID.TryParse(destination, out destId))
2705 { 2705 {
2706 llSay(0, "Could not parse key " + destination); 2706 llSay(0, "Could not parse key " + destination);
2707 return; 2707 return;
2708 } 2708 }
2709 2709
2710 // move the first object found with this inventory name 2710 // move the first object found with this inventory name
2711 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2711 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
2712 { 2712 {
2713 if (inv.Value.Name == inventory) 2713 if (inv.Value.Name == inventory)
2714 { 2714 {
2715 found = true; 2715 found = true;
2716 objId = inv.Key; 2716 objId = inv.Key;
2717 break; 2717 break;
2718 } 2718 }
2719 } 2719 }
2720 2720
2721 // check if destination is an avatar 2721 // check if destination is an avatar
2722 if (World.GetScenePresence(destId) != null) 2722 if (World.GetScenePresence(destId) != null)
2723 { 2723 {
2724 // destination is an avatar 2724 // destination is an avatar
2725 World.MoveTaskInventoryItem(destId, null, m_host, objId); 2725 World.MoveTaskInventoryItem(destId, null, m_host, objId);
2726 } 2726 }
2727 else 2727 else
2728 { 2728 {
2729 // destination is an object 2729 // destination is an object
2730 World.MoveTaskInventoryItem(destId, m_host, objId); 2730 World.MoveTaskInventoryItem(destId, m_host, objId);
2731 } 2731 }
2732 2732
2733 if (!found) 2733 if (!found)
2734 llSay(0, "Could not find object " + inventory); 2734 llSay(0, "Could not find object " + inventory);
2735 } 2735 }
2736 2736
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs
index f7f2676..c57e72e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
39 39
40 public string[] GetApis() 40 public string[] GetApis()
41 { 41 {
42 if(m_Apis.Count > 0) 42 if (m_Apis.Count > 0)
43 { 43 {
44 List<string> l = new List<string>(m_Apis.Keys); 44 List<string> l = new List<string>(m_Apis.Keys);
45 return l.ToArray(); 45 return l.ToArray();
@@ -53,10 +53,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
53 { 53 {
54 string name = t.ToString(); 54 string name = t.ToString();
55 int idx = name.LastIndexOf('.'); 55 int idx = name.LastIndexOf('.');
56 if(idx != -1) 56 if (idx != -1)
57 name = name.Substring(idx+1); 57 name = name.Substring(idx+1);
58 58
59 if(name.EndsWith("_Api")) 59 if (name.EndsWith("_Api"))
60 { 60 {
61 name = name.Substring(0, name.Length - 4); 61 name = name.Substring(0, name.Length - 4);
62 m_Apis[name] = t; 62 m_Apis[name] = t;
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
69 69
70 public IScriptApi CreateApi(string api) 70 public IScriptApi CreateApi(string api)
71 { 71 {
72 if(!m_Apis.ContainsKey(api)) 72 if (!m_Apis.ContainsKey(api))
73 return null; 73 return null;
74 74
75 IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api])); 75 IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api]));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 8c967a2..fcd1df8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
95 public AsyncCommandManager(IScriptEngine _ScriptEngine) 95 public AsyncCommandManager(IScriptEngine _ScriptEngine)
96 { 96 {
97 m_ScriptEngine = _ScriptEngine; 97 m_ScriptEngine = _ScriptEngine;
98 if(!m_Managers.Contains(this)) 98 if (!m_Managers.Contains(this))
99 m_Managers.Add(this); 99 m_Managers.Add(this);
100 100
101 ReadConfig(); 101 ReadConfig();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 202fce7..57c1e02 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2553,7 +2553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2553 LLUUID destId = LLUUID.Zero; 2553 LLUUID destId = LLUUID.Zero;
2554 LLUUID objId = LLUUID.Zero; 2554 LLUUID objId = LLUUID.Zero;
2555 2555
2556 if(!LLUUID.TryParse(destination, out destId)) 2556 if (!LLUUID.TryParse(destination, out destId))
2557 { 2557 {
2558 llSay(0, "Could not parse key " + destination); 2558 llSay(0, "Could not parse key " + destination);
2559 return; 2559 return;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 7b3907f..08ee203 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
46 46
47 public void ApiTypeLSL(IScriptApi api) 47 public void ApiTypeLSL(IScriptApi api)
48 { 48 {
49 if(!(api is ILSL_Api)) 49 if (!(api is ILSL_Api))
50 return; 50 return;
51 51
52 m_LSL_Functions = (ILSL_Api)api; 52 m_LSL_Functions = (ILSL_Api)api;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 168804d..34e2fb1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
47 47
48 public void ApiTypeOSSL(IScriptApi api) 48 public void ApiTypeOSSL(IScriptApi api)
49 { 49 {
50 if(!(api is IOSSL_Api)) 50 if (!(api is IOSSL_Api))
51 return; 51 return;
52 52
53 m_OSSL_Functions = (IOSSL_Api)api; 53 m_OSSL_Functions = (IOSSL_Api)api;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
index aa2c9c2..c12b1f8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
@@ -44,9 +44,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
44 { 44 {
45 MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); 45 MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance);
46 46
47 foreach(MethodInfo mi in myArrayMethodInfo) 47 foreach (MethodInfo mi in myArrayMethodInfo)
48 { 48 {
49 if(mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") 49 if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType")
50 { 50 {
51 string type=mi.Name.Substring(7); 51 string type=mi.Name.Substring(7);
52 inits[type]=mi; 52 inits[type]=mi;
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
63 63
64 public void InitApi(string api, IScriptApi data) 64 public void InitApi(string api, IScriptApi data)
65 { 65 {
66 if(!inits.ContainsKey(api)) 66 if (!inits.ContainsKey(api))
67 return; 67 return;
68 68
69 MethodInfo mi = inits[api]; 69 MethodInfo mi = inits[api];
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 6b080a0..8edae6d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1476,7 +1476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1476 1476
1477 public override bool Equals(Object o) 1477 public override bool Equals(Object o)
1478 { 1478 {
1479 if(!(o is LSLFloat)) 1479 if (!(o is LSLFloat))
1480 return false; 1480 return false;
1481 1481
1482 return value == ((LSLFloat)o).value; 1482 return value == ((LSLFloat)o).value;