* Optimized usings

* Shortened type references
* Removed redundant 'this' qualifier
This commit is contained in:
lbsa71
2007-10-30 09:05:31 +00:00
parent c32d1f0562
commit 67e12b95ea
353 changed files with 15459 additions and 10338 deletions

View File

@@ -28,7 +28,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Runtime.Remoting.Lifetime;
@@ -53,7 +52,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{
//Console.WriteLine("Executor: InitializeLifetimeService()");
// return null;
ILease lease = (ILease)base.InitializeLifetimeService();
ILease lease = (ILease) base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
@@ -75,56 +74,56 @@ namespace OpenSim.Region.ScriptEngine.Common
// Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead!
//try
//{
if (m_Running == false)
if (m_Running == false)
{
// Script is inactive, do not execute!
return;
}
string EventName = m_Script.State() + "_event_" + FunctionName;
//type.InvokeMember(EventName, BindingFlags.InvokeMethod, null, m_Script, args);
//Console.WriteLine("ScriptEngine Executor.ExecuteEvent: \"" + EventName + "\"");
if (Events.ContainsKey(EventName) == false)
{
// Not found, create
Type type = m_Script.GetType();
try
{
// Script is inactive, do not execute!
return;
MethodInfo mi = type.GetMethod(EventName);
Events.Add(EventName, mi);
}
string EventName = m_Script.State() + "_event_" + FunctionName;
//type.InvokeMember(EventName, BindingFlags.InvokeMethod, null, m_Script, args);
//Console.WriteLine("ScriptEngine Executor.ExecuteEvent: \"" + EventName + "\"");
if (Events.ContainsKey(EventName) == false)
catch
{
// Not found, create
Type type = m_Script.GetType();
try
{
MethodInfo mi = type.GetMethod(EventName);
Events.Add(EventName, mi);
}
catch
{
// Event name not found, cache it as not found
Events.Add(EventName, null);
}
// Event name not found, cache it as not found
Events.Add(EventName, null);
}
}
// Get event
MethodInfo ev = null;
Events.TryGetValue(EventName, out ev);
// Get event
MethodInfo ev = null;
Events.TryGetValue(EventName, out ev);
if (ev == null) // No event by that name!
{
//Console.WriteLine("ScriptEngine Can not find any event named: \"" + EventName + "\"");
return;
}
if (ev == null) // No event by that name!
{
//Console.WriteLine("ScriptEngine Can not find any event named: \"" + EventName + "\"");
return;
}
// Found
//try
//{
// Invoke it
ev.Invoke(m_Script, args);
// Found
//try
//{
// Invoke it
ev.Invoke(m_Script, args);
//}
//catch (Exception e)
//{
// // TODO: Send to correct place
// Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString());
//}
//}
//catch (Exception e)
//{
// // TODO: Send to correct place
// Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString());
//}
//}
@@ -136,8 +135,5 @@ namespace OpenSim.Region.ScriptEngine.Common
{
m_Running = false;
}
}
}
}

View File

@@ -26,10 +26,6 @@
*
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Region.ScriptEngine.Common
{
public interface IScript
@@ -37,4 +33,4 @@ namespace OpenSim.Region.ScriptEngine.Common
string State();
Executor Exec { get; }
}
}
}

View File

@@ -26,15 +26,12 @@
*
*/
/* Original code: Tedd Hansen */
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Region.ScriptEngine.Common
{
public interface LSL_BuiltIn_Commands_Interface
{
string State();
double llSin(double f);
@@ -404,7 +401,9 @@ namespace OpenSim.Region.ScriptEngine.Common
//wiki: llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, double start, double length, double rate)
void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate);
//wiki: llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west)
void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west);
void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east,
LSL_Types.Vector3 bottom_south_west);
//wiki: llEjectFromLand(key pest)
void llEjectFromLand(string pest);
void llParseString2List();
@@ -437,7 +436,7 @@ namespace OpenSim.Region.ScriptEngine.Common
//wiki: double llGetRegionFPS()
double llGetRegionFPS();
//wiki: llParticleSystem(List<Object> rules
void llParticleSystem(List<Object> rules);
void llParticleSystem(List<object> rules);
//wiki: llGroundRepel(double height, integer water, double tau)
void llGroundRepel(double height, int water, double tau);
void llGiveInventoryList();
@@ -548,7 +547,9 @@ namespace OpenSim.Region.ScriptEngine.Common
//wiki: list llParseStringKeepNulls( string src, list separators, list spacers )
List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers);
//wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param)
void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param);
void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity,
LSL_Types.Quaternion rot, int param);
//wiki: integer llGetObjectPermMask(integer mask)
int llGetObjectPermMask(int mask);
//wiki: llSetObjectPermMask(integer mask, integer value)
@@ -632,4 +633,4 @@ namespace OpenSim.Region.ScriptEngine.Common
//OpenSim functions
string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
}
}
}

View File

@@ -41,11 +41,12 @@ namespace OpenSim.Region.ScriptEngine.Common
public double Z;
public Vector3(Vector3 vector)
{
X = (float)vector.X;
Y = (float)vector.Y;
Z = (float)vector.Z;
}
{
X = (float) vector.X;
Y = (float) vector.Y;
Z = (float) vector.Z;
}
public Vector3(double x, double y, double z)
{
X = x;
@@ -53,6 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Common
Z = z;
}
}
[Serializable]
public struct Quaternion
{
@@ -62,12 +64,13 @@ namespace OpenSim.Region.ScriptEngine.Common
public double R;
public Quaternion(Quaternion Quat)
{
X = (float)Quat.X;
Y = (float)Quat.Y;
Z = (float)Quat.Z;
R = (float)Quat.R;
{
X = (float) Quat.X;
Y = (float) Quat.Y;
Z = (float) Quat.Z;
R = (float) Quat.R;
}
public Quaternion(double x, double y, double z, double r)
{
X = x;
@@ -75,7 +78,6 @@ namespace OpenSim.Region.ScriptEngine.Common
Z = z;
R = r;
}
}
}
}
}

View File

@@ -1,26 +1,28 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenSim.Region.ScriptEngine.Common")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly : AssemblyTitle("OpenSim.Region.ScriptEngine.Common")]
[assembly : AssemblyDescription("")]
[assembly : AssemblyConfiguration("")]
[assembly : AssemblyCompany("")]
[assembly : AssemblyProduct("OpenSim.Region.ScriptEngine.Common")]
[assembly : AssemblyCopyright("Copyright © 2007")]
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly : ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0bf07c53-ae51-487f-a907-e9b30c251602")]
[assembly : Guid("0bf07c53-ae51-487f-a907-e9b30c251602")]
// Version information for an assembly consists of the following four values:
//
@@ -29,5 +31,6 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("1.0.0.0")]
[assembly : AssemblyFileVersion("1.0.0.0")]