From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 21 Apr 2008 07:09:17 +0000 Subject: * Optimised using statements and namespace references across entire project (this took a while to run). --- .../Region/ScriptEngine/Common/BuilIn_Commands.cs | 3 - .../Common/BuiltIn_Commands_BaseClass.cs | 183 ++++++++++----------- OpenSim/Region/ScriptEngine/Common/Executor.cs | 1 - OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | 2 - .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 33 ++-- .../Common/LSL_BuiltIn_Commands_Interface.cs | 4 +- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 26 +-- .../ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 18 +- .../Common/OSSL_BuilIn_Commands_Interface.cs | 4 - .../Common/ScriptEngineBase/AppDomainManager.cs | 1 - .../Common/ScriptEngineBase/AsyncCommandManager.cs | 19 +-- .../AsyncCommandPlugins/HttpRequest.cs | 8 - .../AsyncCommandPlugins/Listener.cs | 8 - .../AsyncCommandPlugins/SensorRepeat.cs | 7 +- .../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 6 - .../AsyncCommandPlugins/XmlRequest.cs | 7 - .../Common/ScriptEngineBase/EventManager.cs | 2 +- .../Common/ScriptEngineBase/EventQueueManager.cs | 3 - .../ScriptEngineBase/EventQueueThreadClass.cs | 5 +- .../Common/ScriptEngineBase/MaintenanceThread.cs | 7 +- .../Common/ScriptEngineBase/ScriptEngine.cs | 12 +- .../Common/ScriptEngineBase/ScriptManager.cs | 6 +- .../iScriptEngineFunctionModule.cs | 4 - .../ScriptEngine/Common/ScriptServerInterfaces.cs | 1 - OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs | 4 - .../Region/ScriptEngine/Common/TRPC/TCPClient.cs | 2 - .../Region/ScriptEngine/Common/TRPC/TCPCommon.cs | 6 +- .../Region/ScriptEngine/Common/TRPC/TCPServer.cs | 1 - OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | 32 ++-- .../DotNetEngine/Compiler/LSL/Compiler.cs | 10 +- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 22 +-- .../ScriptEngine/DotNetEngine/ScriptEngine.cs | 5 +- .../ScriptEngine/DotNetEngine/ScriptManager.cs | 2 +- .../Region/ScriptEngine/LSOEngine/LSO/Engine.cs | 25 ++- .../LSOEngine/LSO/IL_common_functions.cs | 4 - .../LSOEngine/LSO/LSL_BaseClass_OPCODES.cs | 3 - .../ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | 1 - OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs | 4 - .../Region/ScriptEngine/LSOEngine/ScriptEngine.cs | 10 +- .../Region/ScriptEngine/LSOEngine/ScriptManager.cs | 7 +- .../ScriptEngine/RemoteServer/RemoteServer.cs | 13 +- .../ScriptEngine/RemoteServer/ScriptEngine.cs | 7 +- 42 files changed, 212 insertions(+), 316 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs index a429272..1a50f0b 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; using OpenSim.Region.Environment.Scenes; diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index b6468c2..8aee94e 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -26,15 +26,14 @@ */ using System; -using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; using System.Threading; -using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; using integer = System.Int32; using key = System.String; -using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; -using rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion; +using vector = ScriptEngine.Common.LSL_Types.Vector3; +using rotation = Quaternion; namespace OpenSim.Region.ScriptEngine.Common { @@ -151,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Common // They are only forwarders to LSL_BuiltIn_Commands.cs // - public OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name) + public ICommander GetCommander(string name) { return m_LSL_Functions.GetCommander(name); } @@ -216,52 +215,52 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llRound(f); } - public double llVecMag(vector v) + public double llVecMag(LSL_Types.Vector3 v) { return m_LSL_Functions.llVecMag(v); } - public vector llVecNorm(vector v) + public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) { return m_LSL_Functions.llVecNorm(v); } - public double llVecDist(vector a, vector b) + public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) { return m_LSL_Functions.llVecDist(a, b); } - public vector llRot2Euler(rotation r) + public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Euler(r); } - public rotation llEuler2Rot(vector v) + public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) { return m_LSL_Functions.llEuler2Rot(v); } - public rotation llAxes2Rot(vector fwd, vector left, vector up) + public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) { return m_LSL_Functions.llAxes2Rot(fwd, left, up); } - public vector llRot2Fwd(rotation r) + public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Fwd(r); } - public vector llRot2Left(rotation r) + public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Left(r); } - public vector llRot2Up(rotation r) + public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Up(r); } - public rotation llRotBetween(vector start, vector end) + public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end) { return m_LSL_Functions.llRotBetween(start, end); } @@ -334,22 +333,22 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llDetectedType(number); } - public vector llDetectedPos(int number) + public LSL_Types.Vector3 llDetectedPos(int number) { return m_LSL_Functions.llDetectedPos(number); } - public vector llDetectedVel(int number) + public LSL_Types.Vector3 llDetectedVel(int number) { return m_LSL_Functions.llDetectedVel(number); } - public vector llDetectedGrab(int number) + public LSL_Types.Vector3 llDetectedGrab(int number) { return m_LSL_Functions.llDetectedGrab(number); } - public rotation llDetectedRot(int number) + public LSL_Types.Quaternion llDetectedRot(int number) { return m_LSL_Functions.llDetectedRot(number); } @@ -372,17 +371,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llDie(); } - public double llGround(vector offset) + public double llGround(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGround(offset); } - public double llCloud(vector offset) + public double llCloud(LSL_Types.Vector3 offset) { return m_LSL_Functions.llCloud(offset); } - public vector llWind(vector offset) + public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { return m_LSL_Functions.llWind(offset); } @@ -397,17 +396,17 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetStatus(status); } - public void llSetScale(vector scale) + public void llSetScale(LSL_Types.Vector3 scale) { m_LSL_Functions.llSetScale(scale); } - public vector llGetScale() + public LSL_Types.Vector3 llGetScale() { return m_LSL_Functions.llGetScale(); } - public void llSetColor(vector color, int face) + public void llSetColor(LSL_Types.Vector3 color, int face) { m_LSL_Functions.llSetColor(color, face); } @@ -422,7 +421,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetAlpha(alpha, face); } - public vector llGetColor(int face) + public LSL_Types.Vector3 llGetColor(int face) { return m_LSL_Functions.llGetColor(face); } @@ -455,47 +454,47 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public void llSetPos(vector pos) + public void llSetPos(LSL_Types.Vector3 pos) { m_LSL_Functions.llSetPos(pos); } - public vector llGetPos() + public LSL_Types.Vector3 llGetPos() { return m_LSL_Functions.llGetPos(); } - public vector llGetLocalPos() + public LSL_Types.Vector3 llGetLocalPos() { return m_LSL_Functions.llGetLocalPos(); } - public void llSetRot(rotation rot) + public void llSetRot(LSL_Types.Quaternion rot) { m_LSL_Functions.llSetRot(rot); } - public rotation llGetRot() + public LSL_Types.Quaternion llGetRot() { return m_LSL_Functions.llGetRot(); } - public rotation llGetLocalRot() + public LSL_Types.Quaternion llGetLocalRot() { return m_LSL_Functions.llGetLocalRot(); } - public void llSetForce(vector force, int local) + public void llSetForce(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llSetForce(force, local); } - public vector llGetForce() + public LSL_Types.Vector3 llGetForce() { return m_LSL_Functions.llGetForce(); } - public int llTarget(vector position, double range) + public int llTarget(LSL_Types.Vector3 position, double range) { return m_LSL_Functions.llTarget(position, range); } @@ -505,7 +504,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llTargetRemove(number); } - public int llRotTarget(rotation rot, double error) + public int llRotTarget(LSL_Types.Quaternion rot, double error) { return m_LSL_Functions.llRotTarget(rot, error); } @@ -515,7 +514,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRotTargetRemove(number); } - public void llMoveToTarget(vector target, double tau) + public void llMoveToTarget(LSL_Types.Vector3 target, double tau) { m_LSL_Functions.llMoveToTarget(target, tau); } @@ -525,7 +524,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llStopMoveToTarget(); } - public void llApplyImpulse(vector force, int local) + public void llApplyImpulse(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llApplyImpulse(force, local); } @@ -533,37 +532,37 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public void llApplyRotationalImpulse(vector force, int local) + public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llApplyRotationalImpulse(force, local); } - public void llSetTorque(vector torque, int local) + public void llSetTorque(LSL_Types.Vector3 torque, int local) { m_LSL_Functions.llSetTorque(torque, local); } - public vector llGetTorque() + public LSL_Types.Vector3 llGetTorque() { return m_LSL_Functions.llGetTorque(); } - public void llSetForceAndTorque(vector force, vector torque, int local) + public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) { m_LSL_Functions.llSetForceAndTorque(force, torque, local); } - public vector llGetVel() + public LSL_Types.Vector3 llGetVel() { return m_LSL_Functions.llGetVel(); } - public vector llGetAccel() + public LSL_Types.Vector3 llGetAccel() { return m_LSL_Functions.llGetAccel(); } - public vector llGetOmega() + public LSL_Types.Vector3 llGetOmega() { return m_LSL_Functions.llGetOmega(); } @@ -691,12 +690,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llMakeFire(); } - public void llRezObject(string inventory, vector pos, rotation rot, int param) + public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) { m_LSL_Functions.llRezObject(inventory, pos, rot, param); } - public void llLookAt(vector target, double strength, double damping) + public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) { m_LSL_Functions.llLookAt(target, strength, damping); } @@ -809,7 +808,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSoundPreload(); } - public void llRotLookAt(rotation target, double strength, double damping) + public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) { m_LSL_Functions.llRotLookAt(target, strength, damping); } @@ -842,7 +841,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llStopPointAt(); } - public void llTargetOmega(vector axis, double spinrate, double gain) + public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) { m_LSL_Functions.llTargetOmega(axis, spinrate, gain); } @@ -852,7 +851,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetStartParameter(); } - public void llGodLikeRezObject(string inventory, vector pos) + public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) { m_LSL_Functions.llGodLikeRezObject(inventory, pos); } @@ -877,7 +876,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetLinkNumber(); } - public void llSetLinkColor(int linknumber, vector color, int face) + public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) { m_LSL_Functions.llSetLinkColor(linknumber, color, face); } @@ -940,12 +939,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRemoveInventory(item); } - public void llSetText(string text, vector color, double alpha) + public void llSetText(string text, LSL_Types.Vector3 color, double alpha) { m_LSL_Functions.llSetText(text, color, alpha); } - public double llWater(vector offset) + public double llWater(LSL_Types.Vector3 offset) { return m_LSL_Functions.llWater(offset); } @@ -1005,7 +1004,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llMessageLinked(linknum, num, str, id); } - public void llPushObject(string target, vector impulse, vector ang_impulse, int local) + public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); } @@ -1028,12 +1027,12 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public rotation llAxisAngle2Rot(vector axis, double angle) + public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return m_LSL_Functions.llAxisAngle2Rot(axis, angle); } - public vector llRot2Axis(rotation rot) + public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return m_LSL_Functions.llRot2Axis(rot); } @@ -1053,7 +1052,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llAsin(val); } - public double llAngleBetween(rotation a, rotation b) + public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return m_LSL_Functions.llAngleBetween(a, b); } @@ -1068,17 +1067,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llAllowInventoryDrop(add); } - public vector llGetSunDirection() + public LSL_Types.Vector3 llGetSunDirection() { return m_LSL_Functions.llGetSunDirection(); } - public vector llGetTextureOffset(int face) + public LSL_Types.Vector3 llGetTextureOffset(int face) { return m_LSL_Functions.llGetTextureOffset(face); } - public vector llGetTextureScale(int side) + public LSL_Types.Vector3 llGetTextureScale(int side) { return m_LSL_Functions.llGetTextureScale(side); } @@ -1098,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetOwnerKey(id); } - public vector llGetCenterOfMass() + public LSL_Types.Vector3 llGetCenterOfMass() { return m_LSL_Functions.llGetCenterOfMass(); } @@ -1136,12 +1135,12 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llList2Key(src, index); } - public vector llList2Vector(LSL_Types.list src, int index) + public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) { return m_LSL_Functions.llList2Vector(src, index); } - public rotation llList2Rot(LSL_Types.list src, int index) + public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) { return m_LSL_Functions.llList2Rot(src, index); } @@ -1181,7 +1180,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llList2ListStrided(src, start, end, stride); } - public vector llGetRegionCorner() + public LSL_Types.Vector3 llGetRegionCorner() { return m_LSL_Functions.llGetRegionCorner(); } @@ -1211,7 +1210,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetDate(); } - public int llEdgeOfWorld(vector pos, vector dir) + public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { return m_LSL_Functions.llEdgeOfWorld(pos, dir); } @@ -1249,7 +1248,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate); } - public void llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) + public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west); } @@ -1269,7 +1268,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llOverMyLand(id); } - public string llGetLandOwnerAt(vector pos) + public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetLandOwnerAt(pos); } @@ -1279,7 +1278,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetNotecardLine(name, line); } - public vector llGetAgentSize(string id) + public LSL_Types.Vector3 llGetAgentSize(string id) { return m_LSL_Functions.llGetAgentSize(id); } @@ -1294,17 +1293,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llUnSit(id); } - public vector llGroundSlope(vector offset) + public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundSlope(offset); } - public vector llGroundNormal(vector offset) + public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundNormal(offset); } - public vector llGroundContour(vector offset) + public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundContour(offset); } @@ -1362,12 +1361,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetVehicledoubleParam(param, value); } - public void llSetVehicleVectorParam(int param, vector vec) + public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) { m_LSL_Functions.llSetVehicleVectorParam(param, vec); } - public void llSetVehicleRotationParam(int param, rotation rot) + public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) { m_LSL_Functions.llSetVehicleRotationParam(param, rot); } @@ -1382,7 +1381,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRemoveVehicleFlags(flags); } - public void llSitTarget(vector offset, rotation rot) + public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { m_LSL_Functions.llSitTarget(offset, rot); } @@ -1407,12 +1406,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetSitText(text); } - public void llSetCameraEyeOffset(vector offset) + public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { m_LSL_Functions.llSetCameraEyeOffset(offset); } - public void llSetCameraAtOffset(vector offset) + public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { m_LSL_Functions.llSetCameraAtOffset(offset); } @@ -1422,7 +1421,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llDumpList2String(src, seperator); } - public void llScriptDanger(vector pos) + public void llScriptDanger(LSL_Types.Vector3 pos) { m_LSL_Functions.llScriptDanger(pos); } @@ -1539,12 +1538,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetParcelMusicURL(url); } - public vector llGetRootPosition() + public LSL_Types.Vector3 llGetRootPosition() { return m_LSL_Functions.llGetRootPosition(); } - public rotation llGetRootRotation() + public LSL_Types.Quaternion llGetRootRotation() { return m_LSL_Functions.llGetRootRotation(); } @@ -1589,7 +1588,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetBoundingBox(obj); } - public vector llGetGeometricCenter() + public LSL_Types.Vector3 llGetGeometricCenter() { return m_LSL_Functions.llGetGeometricCenter(); } @@ -1622,7 +1621,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetSimulatorHostname(); } - public void llSetLocalRot(rotation rot) + public void llSetLocalRot(LSL_Types.Quaternion rot) { m_LSL_Functions.llSetLocalRot(rot); } @@ -1632,7 +1631,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers); } - public void llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, int param) + public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param); } @@ -1720,12 +1719,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons); } - public vector llGetCameraPos() + public LSL_Types.Vector3 llGetCameraPos() { return m_LSL_Functions.llGetCameraPos(); } - public rotation llGetCameraRot() + public LSL_Types.Quaternion llGetCameraRot() { return m_LSL_Functions.llGetCameraRot(); } @@ -1750,7 +1749,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llUnescapeURL(url); } - public void llMapDestination(string simname, vector pos, vector look_at) + public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { m_LSL_Functions.llMapDestination(simname, pos, look_at); } @@ -1790,7 +1789,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetUnixTime(); } - public int llGetParcelFlags(vector pos) + public int llGetParcelFlags(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetParcelFlags(pos); } @@ -1820,12 +1819,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llResetLandPassList(); } - public int llGetParcelPrimCount(vector pos, int category, int sim_wide) + public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) { return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); } - public LSL_Types.list llGetParcelPrimOwners(vector pos) + public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetParcelPrimOwners(pos); } @@ -1838,12 +1837,12 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public int llGetParcelMaxPrims(vector pos, int sim_wide) + public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); } - public LSL_Types.list llGetParcelDetails(vector pos, LSL_Types.list param) + public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) { return m_LSL_Functions.llGetParcelDetails(pos, param); } @@ -2381,7 +2380,7 @@ namespace OpenSim.Region.ScriptEngine.Common public const int OBJECT_CREATOR = 8; // Can not be public const? - public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); - public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); + public LSL_Types.Vector3 ZERO_VECTOR = new LSL_Types.Vector3(0.0, 0.0, 0.0); + public LSL_Types.Quaternion ZERO_ROTATION = new LSL_Types.Quaternion(0.0, 0, 0.0, 1.0); } } diff --git a/OpenSim/Region/ScriptEngine/Common/Executor.cs b/OpenSim/Region/ScriptEngine/Common/Executor.cs index 45f7355..8e0d6f1 100644 --- a/OpenSim/Region/ScriptEngine/Common/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Common/Executor.cs @@ -28,7 +28,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.Remoting.Lifetime; namespace OpenSim.Region.ScriptEngine.Common { diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs index 50eb56f..19fb487 100644 --- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs @@ -26,9 +26,7 @@ */ using System; -using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; -using System.Text; namespace OpenSim.Region.ScriptEngine.Common { diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index c00254d..04f8967 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -34,13 +34,12 @@ using System.Threading; using Axiom.Math; using libsecondlife; using OpenSim.Framework; -using OpenSim.Framework.Communications; +using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Modules.LandManagement; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Modules.LandManagement; + //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.Common @@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Common } catch (AppDomainUnloadedException) { - System.Console.WriteLine("[SCRIPT]: state change called when script was unloaded. Nothing to worry about, but noting the occurance"); + Console.WriteLine("[SCRIPT]: state change called when script was unloaded. Nothing to worry about, but noting the occurance"); } } } @@ -1677,10 +1676,10 @@ namespace OpenSim.Region.ScriptEngine.Common //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = new System.Guid(m_host.UUID.ToString()); // fromAgentID.UUID; - msg.fromAgentSession = new System.Guid(friendTransactionID.ToString());// fromAgentSession.UUID; - msg.toAgentID = new System.Guid(user); // toAgentID.UUID; - msg.imSessionID = new System.Guid(friendTransactionID.ToString()); // This is the item we're mucking with here + msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; + msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; + msg.toAgentID = new Guid(user); // toAgentID.UUID; + msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; @@ -2654,7 +2653,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return new LSL_Types.Vector3(0, 0, 0); } - if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3)) + if (src.Data[index].GetType() == typeof(LSL_Types.Vector3)) { return (LSL_Types.Vector3)src.Data[index]; } @@ -2675,7 +2674,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return new LSL_Types.Quaternion(0, 0, 0, 1); } - if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion)) + if (src.Data[index].GetType() == typeof(LSL_Types.Quaternion)) { return (LSL_Types.Quaternion)src.Data[index]; } @@ -2713,11 +2712,11 @@ namespace OpenSim.Region.ScriptEngine.Common return 0; } - if (src.Data[index] is System.Int32) + if (src.Data[index] is Int32) return 1; - if (src.Data[index] is System.Double) + if (src.Data[index] is Double) return 2; - if (src.Data[index] is System.String) + if (src.Data[index] is String) { LLUUID tuuid; if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) @@ -2729,11 +2728,11 @@ namespace OpenSim.Region.ScriptEngine.Common return 4; } } - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3) + if (src.Data[index] is LSL_Types.Vector3) return 5; - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion) + if (src.Data[index] is LSL_Types.Quaternion) return 6; - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.list) + if (src.Data[index] is LSL_Types.list) return 7; return 0; diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 8d8e0bc..fa957bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs @@ -25,7 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System.Collections.Generic; +using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.ScriptEngine.Common { @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Common string State { get; set; } - OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name); + ICommander GetCommander(string name); double llSin(double f); double llCos(double f); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 55c13a4..7a8b4ca 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -26,8 +26,8 @@ */ using System; -using System.Text.RegularExpressions; using System.Collections; +using System.Text.RegularExpressions; namespace OpenSim.Region.ScriptEngine.Common { @@ -639,7 +639,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double GeometricMean() { double ret = 1.0; - list nums = list.ToDoubleList(this); + list nums = ToDoubleList(this); for (int i = 0; i < nums.Data.Length; i++) { ret *= (double)nums.Data[i]; @@ -650,7 +650,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double HarmonicMean() { double ret = 0.0; - list nums = list.ToDoubleList(this); + list nums = ToDoubleList(this); for (int i = 0; i < nums.Data.Length; i++) { ret += 1.0 / (double)nums.Data[i]; @@ -661,7 +661,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double Variance() { double s = 0; - list num = list.ToDoubleList(this); + list num = ToDoubleList(this); for (int i = 0; i < num.Data.Length; i++) { s += Math.Pow((double)num.Data[i], 2); @@ -701,7 +701,7 @@ namespace OpenSim.Region.ScriptEngine.Common output = "["; foreach (object o in m_data) { - if (o is System.String) + if (o is String) { output = output + "\"" + o + "\", "; } @@ -837,7 +837,7 @@ namespace OpenSim.Region.ScriptEngine.Common #region Operators - static public implicit operator System.Boolean(key k) + static public implicit operator Boolean(key k) { if (k.value.Length == 0) { @@ -864,7 +864,7 @@ namespace OpenSim.Region.ScriptEngine.Common return new key(s); } - static public implicit operator System.String(key k) + static public implicit operator String(key k) { return k.value; } @@ -917,7 +917,7 @@ namespace OpenSim.Region.ScriptEngine.Common #endregion #region Operators - static public implicit operator System.Boolean(LSLString s) + static public implicit operator Boolean(LSLString s) { if (s.m_string.Length == 0) { @@ -929,7 +929,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - static public implicit operator System.String(LSLString s) + static public implicit operator String(LSLString s) { return s.m_string; } @@ -1017,12 +1017,12 @@ namespace OpenSim.Region.ScriptEngine.Common } #endregion - static public implicit operator System.Int32(LSLInteger i) + static public implicit operator Int32(LSLInteger i) { return i.value; } - static public implicit operator System.Boolean(LSLInteger i) + static public implicit operator Boolean(LSLInteger i) { if (i.value == 0) { @@ -1086,7 +1086,7 @@ namespace OpenSim.Region.ScriptEngine.Common #region Operators - static public implicit operator System.Double(LSLFloat f) + static public implicit operator Double(LSLFloat f) { return f.value; } @@ -1097,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Common //} - static public implicit operator System.Boolean(LSLFloat f) + static public implicit operator Boolean(LSLFloat f) { if (f.value == 0) { diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index de19f4e..b919f8d 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -25,21 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Remoting.Lifetime; -using System.Text; -using System.Threading; using Axiom.Math; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Communications; +using Nini.Config; +using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Modules.LandManagement; + //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.Common @@ -408,7 +400,7 @@ namespace OpenSim.Region.ScriptEngine.Common public bool osConsoleCommand(string command) { m_host.AddScriptLPS(1); - Nini.Config.IConfigSource config = new Nini.Config.IniConfigSource(Application.iniFilePath); + IConfigSource config = new IniConfigSource(Application.iniFilePath); if (config.Configs["LL-Functions"] == null) config.AddConfig("LL-Functions"); @@ -416,7 +408,7 @@ namespace OpenSim.Region.ScriptEngine.Common { if (World.PermissionsMngr.CanRunConsoleCommand(m_host.OwnerID)) { - OpenSim.Framework.Console.MainConsole.Instance.RunCommand(command); + MainConsole.Instance.RunCommand(command); return true; } return false; diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 3102e3f..a4dd3b0 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.ScriptEngine.Common { public interface OSSL_BuilIn_Commands_Interface diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs index 41100c9..262d75f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs @@ -29,7 +29,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index a1bb5c9..7dad7ee 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs @@ -25,16 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; using Timer=OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins.Timer; @@ -50,11 +45,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public ScriptEngine m_ScriptEngine; - public AsyncCommandPlugins.Timer m_Timer; - public AsyncCommandPlugins.HttpRequest m_HttpRequest; - public AsyncCommandPlugins.Listener m_Listener; - public AsyncCommandPlugins.SensorRepeat m_SensorRepeat; - public AsyncCommandPlugins.XmlRequest m_XmlRequest; + public Timer m_Timer; + public HttpRequest m_HttpRequest; + public Listener m_Listener; + public SensorRepeat m_SensorRepeat; + public XmlRequest m_XmlRequest; public AsyncCommandManager(ScriptEngine _ScriptEngine) { @@ -81,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase cmdHandlerThread.Priority = ThreadPriority.BelowNormal; cmdHandlerThread.IsBackground = true; cmdHandlerThread.Start(); - OpenSim.Framework.ThreadTracker.Add(cmdHandlerThread); + ThreadTracker.Add(cmdHandlerThread); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs index d62734f..521402e 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs @@ -26,16 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs index 00cbd8c..874a905 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs @@ -25,16 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index fd8dbd1..71ae80c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -26,15 +26,10 @@ */ using System; -using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 63a8d19..141e471 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs @@ -28,13 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs index be4f418..c3e1804 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs @@ -26,15 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 2f2b384..b4789a9 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. /// [Serializable] - public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule + public class EventManager : ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule { // // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index cd03699..7cbbd4f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs @@ -28,10 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Region.Environment.Scenes.Scripting; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index b8d950a..d77f698 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -27,11 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; using libsecondlife; -using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes.Scripting; @@ -123,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase EventQueueThread.Priority = MyThreadPriority; EventQueueThread.Name = "EventQueueManagerThread_" + ThreadCount; EventQueueThread.Start(); - OpenSim.Framework.ThreadTracker.Add(EventQueueThread); + ThreadTracker.Add(EventQueueThread); // Look at this... Don't you wish everyone did that solid coding everywhere? :P if (ThreadCount == int.MaxValue) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index ad41e5b..2bf0e41 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -27,9 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; +using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -94,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; MaintenanceThreadThread.IsBackground = true; MaintenanceThreadThread.Start(); - OpenSim.Framework.ThreadTracker.Add(MaintenanceThreadThread); + ThreadTracker.Add(MaintenanceThreadThread); } } @@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { while (true) { - System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass + Thread.Sleep(MaintenanceLoopms); // Sleep before next pass // Reset counters? if (MaintenanceLoopTicks_ScriptLoadUnload_ResetCount) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index 02e49a2..a7ad50d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -27,13 +27,11 @@ using System; using System.Collections.Generic; -using System.IO; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -42,9 +40,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// /// [Serializable] - public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule + public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static List ScriptEngines = new List(); public Scene World; @@ -75,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public abstract ScriptManager _GetScriptManager(); - public log4net.ILog Log + public ILog Log { get { return m_log; } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 09f84d6..cd2e530 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -32,9 +32,7 @@ using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using libsecondlife; -using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -106,9 +104,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase #region Object init/shutdown - public ScriptEngineBase.ScriptEngine m_scriptEngine; + public ScriptEngine m_scriptEngine; - public ScriptManager(ScriptEngineBase.ScriptEngine scriptEngine) + public ScriptManager(ScriptEngine scriptEngine) { m_scriptEngine = scriptEngine; } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs index 4e037b3..768ba6d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { public interface iScriptEngineFunctionModule diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index 6110251..1119fe8 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs @@ -28,7 +28,6 @@ using libsecondlife; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs index 6fe6381..14c6078 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.ScriptEngine.Common.TRPC { class MyBase diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs index 7689d69..624c3bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs @@ -25,12 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Diagnostics; using System.Net; using System.Net.Sockets; -using System.Text; namespace OpenSim.Region.ScriptEngine.Common.TRPC { diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs index 521d75b..ab9d9b4 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs @@ -25,11 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Net; + namespace OpenSim.Region.ScriptEngine.Common.TRPC { public class TCPCommon { - public delegate void ClientConnectedDelegate(int ID, System.Net.EndPoint Remote); + public delegate void ClientConnectedDelegate(int ID, EndPoint Remote); public delegate void DataReceivedDelegate(int ID, byte[] data, int offset, int length); public delegate void DataSentDelegate(int ID, int length); public delegate void CloseDelegate(int ID); @@ -46,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC public interface ClientInterface : ServerAndClientInterface { - event TCPCommon.ConnectErrorDelegate ConnectError; + event ConnectErrorDelegate ConnectError; void Connect(string RemoteHost, int RemotePort); void Disconnect(int ID); } diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index 5d1e53a..55a20e7 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs @@ -30,7 +30,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Net; using System.Net.Sockets; -using TCPCommon=OpenSim.Region.ScriptEngine.Common.TRPC.TCPCommon; namespace OpenSim.Region.ScriptEngine.Common.TRPC { diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index 4567e60..013ae0f 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Net; using System.Text; +using System.Web; using libsecondlife; using OpenSim.Region.ScriptEngine.Common.TRPC; @@ -41,24 +43,24 @@ namespace OpenSim.Region.ScriptEngine.Common public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); public event ReceiveCommandDelegate ReceiveCommand; - System.Collections.Generic.Dictionary TypeDictionary = new Dictionary(); + Dictionary TypeDictionary = new Dictionary(); Type[] Types = { - typeof(System.String), - typeof(System.Int16), - typeof(System.Int32), - typeof(System.Int64), - typeof(System.Double), - typeof(System.Decimal), - typeof(System.Array), + typeof(String), + typeof(Int16), + typeof(Int32), + typeof(Int64), + typeof(Double), + typeof(Decimal), + typeof(Array), typeof(LLUUID), - typeof(System.UInt16), - typeof(System.UInt32), - typeof(System.UInt64) + typeof(UInt16), + typeof(UInt32), + typeof(UInt64) }; // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection - private System.Collections.Generic.Dictionary InQueue = new Dictionary(); + private Dictionary InQueue = new Dictionary(); private class InQueueStruct { public byte[] Queue; @@ -81,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - void TCPS_ClientConnected(int ID, System.Net.EndPoint Remote) + void TCPS_ClientConnected(int ID, EndPoint Remote) { // Create a incoming queue for this connection InQueueStruct iq = new InQueueStruct(); @@ -165,7 +167,7 @@ namespace OpenSim.Region.ScriptEngine.Common for (int i = 1; i < parts.Length; i++) { string[] spl; - spl = System.Web.HttpUtility.UrlDecode(parts[i]).Split('|'); + spl = HttpUtility.UrlDecode(parts[i]).Split('|'); string t = spl[0]; param[i - 1] = Convert.ChangeType(spl[1], TypeLookup(t)); } @@ -192,7 +194,7 @@ namespace OpenSim.Region.ScriptEngine.Common string tmpStr = Command; for (int i = 0; i < p.Length; i++) { - tmpStr += "," + p[i].GetType().ToString() + "|" + System.Web.HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") + tmpStr += "," + p[i].GetType().ToString() + "|" + HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") } tmpStr += "\n"; byte[] byteData = Encoding.ASCII.GetBytes(tmpStr); diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index e3013c9..fc38ef2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -30,10 +30,10 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Reflection; using Microsoft.CSharp; -using Microsoft.VisualBasic; using Microsoft.JScript; +using Microsoft.VisualBasic; +using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL private bool WriteScriptSourceToDebugFile; private bool CompileWithDebugInformation; private bool CleanUpOldScriptsOnStartup; - private System.Collections.Generic.Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); - private System.Collections.Generic.Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); private string FilePrefix; private string ScriptEnginesPath = "ScriptEngines"; @@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL if (enableCommanderLSL == true && l == enumCompileType.cs) { foreach (KeyValuePair com + ICommander> com in m_scriptEngine.World.GetCommanders()) { compileScript = com.Value.GenerateRuntimeAPI() + compileScript; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 20c108d..0025b26 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -26,9 +26,9 @@ * */ +using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using System; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public string Convert(string Script) { quotes.Clear(); - string Return = System.String.Empty; + string Return = String.Empty; Script = " \r\n" + Script; // @@ -77,12 +77,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // temporarily replace quotes so we can work our magic on the script without // always considering if we are inside our outside quotes's // TODO: Does this work on half-quotes in strings? ;) - string _Script = System.String.Empty; + string _Script = String.Empty; string C; bool in_quote = false; bool quote_replaced = false; string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; - string quote = System.String.Empty; + string quote = String.Empty; bool last_was_escape = false; int quote_replaced_count = 0; for (int p = 0; p < Script.Length; p++) @@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL } else { - if (quote == System.String.Empty) + if (quote == String.Empty) { // We didn't replace quote, probably because of empty string? _Script += quote_replacement_string + @@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL quotes.Add( quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); - quote = System.String.Empty; + quote = String.Empty; } break; } @@ -155,10 +155,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // int ilevel = 0; int lastlevel = 0; - string ret = System.String.Empty; - string cache = System.String.Empty; + string ret = String.Empty; + string cache = String.Empty; bool in_state = false; - string current_statename = System.String.Empty; + string current_statename = String.Empty; for (int p = 0; p < Script.Length; p++) { C = Script.Substring(p, 1); @@ -319,9 +319,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { state_events.Add(statea, convertnametoFlag(eventa)); } - System.Console.WriteLine("State:" + statea + ", event: " + eventa); + Console.WriteLine("State:" + statea + ", event: " + eventa); } - System.Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); + Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); // Add namespace, class name and inheritance // Looking *ONLY* for state entry events diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs index 6f2dbad..99efed3 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs @@ -28,13 +28,12 @@ /* Original code: Tedd Hansen */ using System; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ScriptEngine.DotNetEngine { [Serializable] - public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine + public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine { // We need to override a few things for our DotNetEngine public override void Initialise(Scene scene, IConfigSource config) @@ -43,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine InitializeEngine(scene, config, true, GetScriptManager()); } - public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() + public override Common.ScriptEngineBase.ScriptManager _GetScriptManager() { return new ScriptManager(this); } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 05a2d06..e242748 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -34,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.DotNetEngine { - public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager + public class ScriptManager : Common.ScriptEngineBase.ScriptManager { public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) : base(scriptEngine) diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs index 54328ff..0208350 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs @@ -33,7 +33,6 @@ using System.Reflection.Emit; using System.Text; using System.Threading; using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { @@ -59,11 +58,11 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO string DLL_FileName = asmName.Name + ".dll"; string DLL_FileName_WithPath = Path.GetDirectoryName(LSO_FileName) + @"\" + DLL_FileName; - LSOEngine.LSO.Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName)); - LSOEngine.LSO.Common.SendToLog("Assembly name: " + asmName.Name); - LSOEngine.LSO.Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll"); - LSOEngine.LSO.Common.SendToLog("Starting processing of LSL ByteCode..."); - LSOEngine.LSO.Common.SendToLog(String.Empty); + Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName)); + Common.SendToLog("Assembly name: " + asmName.Name); + Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll"); + Common.SendToLog("Starting processing of LSL ByteCode..."); + Common.SendToLog(String.Empty); // Create Assembly @@ -104,7 +103,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO LSOP.Parse(); // Constructor has to be created AFTER LSO_Parser because of accumulated variables - if (LSOEngine.LSO.Common.IL_CreateConstructor) + if (Common.IL_CreateConstructor) IL_CREATE_CONSTRUCTOR(typeBuilder, LSOP); LSOP.CloseFile(); @@ -113,15 +112,15 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO */ - LSOEngine.LSO.Common.SendToLog("Attempting to compile assembly..."); + Common.SendToLog("Attempting to compile assembly..."); // Compile it Type type = typeBuilder.CreateType(); - LSOEngine.LSO.Common.SendToLog("Compilation successful!"); + Common.SendToLog("Compilation successful!"); - LSOEngine.LSO.Common.SendToLog("Saving assembly: " + DLL_FileName); + Common.SendToLog("Saving assembly: " + DLL_FileName); asmBuilder.Save(DLL_FileName); - LSOEngine.LSO.Common.SendToLog("Returning assembly filename: " + DLL_FileName); + Common.SendToLog("Returning assembly filename: " + DLL_FileName); return DLL_FileName; @@ -166,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO private static void IL_CREATE_CONSTRUCTOR(TypeBuilder typeBuilder, LSO_Parser LSOP) { - LSOEngine.LSO.Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); + Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); //ConstructorBuilder constructor = typeBuilder.DefineConstructor( // MethodAttributes.Public, // CallingConventions.Standard, @@ -235,7 +234,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO Type datatype = null; // Push data to stack - LSOEngine.LSO.Common.SendToDebug("Adding to static (" + pos + ") type: " + + Common.SendToDebug("Adding to static (" + pos + ") type: " + ((LSO_Enums.Variable_Type_Codes) sb.ObjectType).ToString() + " (" + sb.ObjectType + ")"); switch ((LSO_Enums.Variable_Type_Codes) sb.ObjectType) diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs index 60d68f5..6d0e35c 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs @@ -26,10 +26,6 @@ */ /* Original code: Tedd Hansen */ -using System; -using System.Reflection; -using System.Reflection.Emit; - namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { internal partial class LSO_Parser diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs index ad216aa..1b73311 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; - namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { //public partial class LSL_BaseClass diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs index a110c28..e4a57e8 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs @@ -33,7 +33,6 @@ using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Text; -using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs index 3b5ca0f..f035c03 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs index 8495037..3c0e9cd 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs @@ -27,18 +27,12 @@ using System; using Nini.Config; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using EventManager = OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.EventManager; -using ScriptManager=OpenSim.Region.ScriptEngine.LSOEngine.ScriptManager; namespace OpenSim.Region.ScriptEngine.LSOEngine { [Serializable] - public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine + public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine { // We need to override a few things for our DotNetEngine public override void Initialise(Scene scene, IConfigSource config) @@ -46,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine InitializeEngine(scene, config, true, GetScriptManager()); } - public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() + public override Common.ScriptEngineBase.ScriptManager _GetScriptManager() { return new ScriptManager(this); } diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index a933b08..0434f55 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs @@ -26,11 +26,6 @@ */ using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; @@ -39,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.LSOEngine { - public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager + public class ScriptManager : Common.ScriptEngineBase.ScriptManager { public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) : base(scriptEngine) diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs index 2a2f24f..603808e 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs @@ -26,8 +26,7 @@ */ using System; -using System.Collections.Generic; -using System.Text; +using System.Net.Sockets; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; @@ -61,20 +60,20 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer // Use the object if (obj.Equals(null)) { - System.Console.WriteLine("Error: unable to locate server"); + Console.WriteLine("Error: unable to locate server"); } else { return obj; } } - catch (System.Net.Sockets.SocketException) + catch (SocketException) { - System.Console.WriteLine("Error: unable to connect to server"); + Console.WriteLine("Error: unable to connect to server"); } - catch (System.Runtime.Remoting.RemotingException) + catch (RemotingException) { - System.Console.WriteLine("Error: unable to connect to server"); + Console.WriteLine("Error: unable to connect to server"); } return null; } diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index 0995afb..c33cfd1 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs @@ -28,8 +28,9 @@ /* Original code: Tedd Hansen */ using System; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -42,7 +43,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer [Serializable] public class ScriptEngine : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); internal Scene World; internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim @@ -53,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer Common.mySE = this; } - public log4net.ILog Log + public ILog Log { get { return m_log; } } -- cgit v1.1