* Refactored out circular reference in Region.Environment <-> Framework.Data.Base
We REALLY need to get the db layer sorted soon...0.6.0-stable
parent
e3ca113075
commit
ba2de258f4
|
@ -27,10 +27,9 @@
|
|||
|
||||
using System.Data.Common;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace OpenSim.Framework.Data.MySQL
|
||||
|
||||
namespace OpenSim.Framework.Data.MySQLMapper
|
||||
{
|
||||
/*
|
||||
public class MySQLDatabaseMapper : OpenSimDatabaseConnector
|
||||
{
|
||||
public MySQLDatabaseMapper(string connectionString)
|
||||
|
@ -48,5 +47,5 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
return "?" + fieldName;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@
|
|||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using libsecondlife;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
using OpenSim.Framework.Data.Base;
|
||||
|
||||
|
@ -55,23 +54,4 @@ namespace OpenSim.Framework.Data
|
|||
return new OpenSimDataReader(reader);
|
||||
}
|
||||
}
|
||||
|
||||
public class MySQLDatabaseMapper : OpenSimDatabaseConnector
|
||||
{
|
||||
public MySQLDatabaseMapper(string connectionString)
|
||||
: base(connectionString)
|
||||
{
|
||||
}
|
||||
|
||||
public override DbConnection GetNewConnection()
|
||||
{
|
||||
MySqlConnection connection = new MySqlConnection(m_connectionString);
|
||||
return connection;
|
||||
}
|
||||
|
||||
public override string CreateParamName(string fieldName)
|
||||
{
|
||||
return "?" + fieldName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ using libsecondlife;
|
|||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Data;
|
||||
using OpenSim.Framework.Data.MySQLMapper;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
using OpenSim.Framework.Data.Base;
|
||||
|
|
|
@ -1360,8 +1360,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectPart part = GetChildPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.Text = text;
|
||||
}
|
||||
part.SetText( text );
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPartText(string text, LLUUID partID)
|
||||
|
@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectPart part = GetChildPart(partID);
|
||||
if (part != null)
|
||||
{
|
||||
part.Text = text;
|
||||
part.SetText( text );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1905,12 +1905,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
return null;
|
||||
}
|
||||
|
||||
public void UpdateText(string text)
|
||||
{
|
||||
m_rootPart.Text = text;
|
||||
m_rootPart.ScheduleTerseUpdate();
|
||||
}
|
||||
|
||||
public void ObjectGrabHandler(uint localId, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
if (m_rootPart.LocalId == localId)
|
||||
|
@ -1995,6 +1989,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
(int) (color.y*0xff),
|
||||
(int) (color.z*0xff));
|
||||
Text = text;
|
||||
|
||||
m_rootPart.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
public void ApplyPhysics(bool m_physicalPrim)
|
||||
|
|
|
@ -509,7 +509,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
set
|
||||
{
|
||||
m_text = value;
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2289,13 +2288,20 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
public void SetText(string text)
|
||||
{
|
||||
Text = text;
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
public void SetText(string text, Vector3 color, double alpha)
|
||||
{
|
||||
Color = Color.FromArgb(0xff - (int) (alpha*0xff),
|
||||
(int) (color.x*0xff),
|
||||
(int) (color.y*0xff),
|
||||
(int) (color.z*0xff));
|
||||
Text = text;
|
||||
SetText( text );
|
||||
}
|
||||
|
||||
protected SceneObjectPart(SerializationInfo info, StreamingContext context)
|
||||
|
@ -2411,5 +2417,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
info.AddValue("m_shape", m_shape);
|
||||
info.AddValue("m_parentGroup", m_parentGroup);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
: base(world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, PrimitiveBaseShape.Default)
|
||||
{
|
||||
Text = fileInfo.Name;
|
||||
ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
||||
protected override bool InSceneBackup
|
||||
|
|
|
@ -55,8 +55,8 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
LLVector3 pos = new LLVector3(110, 129, 27);
|
||||
|
||||
AddCpuCounter(regionInfo, pos);
|
||||
AddComplexObjects(regionInfo, pos);
|
||||
AddAvatars();
|
||||
// AddComplexObjects(regionInfo, pos);
|
||||
// AddAvatars();
|
||||
AddFileSystemObjects();
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
|
||||
FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
|
||||
m_scene.AddEntity(fileObject);
|
||||
fileObject.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
32
prebuild.xml
32
prebuild.xml
|
@ -177,6 +177,35 @@
|
|||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="OpenSim.Framework.Data.MySQLMapper" path="OpenSim/Framework/Data.MySQLMapper" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../bin/</ReferencePath>
|
||||
<Reference name="System" localCopy="false"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Data"/>
|
||||
<Reference name="OpenSim.Framework.Data.Base"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="MySql.Data.dll"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="log4net"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
|
@ -196,7 +225,6 @@
|
|||
<Reference name="XMLRPC.dll"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="MySql.Data.dll"/>
|
||||
<Reference name="OpenSim.Framework.Data.Base"/>
|
||||
<Reference name="log4net"/>
|
||||
<Files>
|
||||
|
@ -711,7 +739,6 @@
|
|||
<Reference name="System.Drawing"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="Axiom.MathLib.dll"/>
|
||||
<Reference name="Db4objects.Db4o.dll"/>
|
||||
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Data" />
|
||||
|
@ -723,6 +750,7 @@
|
|||
<Reference name="XMLRPC.dll"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework.Data.Base"/>
|
||||
<Reference name="OpenSim.Framework.Data.MySQLMapper"/>
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="log4net"/>
|
||||
<Files>
|
||||
|
|
Loading…
Reference in New Issue