* Add just enough to allow the scene presences test to establish a new user connection (though not yet an actual ScenePresence)

0.6.1-post-fixes
Justin Clarke Casey 2008-11-19 20:13:51 +00:00
parent 6f0e068cf1
commit 14f3ac1440
6 changed files with 69 additions and 9 deletions

View File

@ -34,7 +34,6 @@ namespace OpenSim.Region.Environment.Interfaces
{ {
public interface ILandChannel public interface ILandChannel
{ {
List<ILandObject> ParcelsNearPoint(Vector3 position); List<ILandObject> ParcelsNearPoint(Vector3 position);
List<ILandObject> AllParcels(); List<ILandObject> AllParcels();
ILandObject GetLandObject(int x, int y); ILandObject GetLandObject(int x, int y);

View File

@ -95,7 +95,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public ILandObject GetLandObject(int x, int y) public ILandObject GetLandObject(int x, int y)
{ {
if (m_landManagementModule != null) if (m_landManagementModule != null)
{ {
return m_landManagementModule.GetLandObject(x, y); return m_landManagementModule.GetLandObject(x, y);
@ -185,6 +184,5 @@ namespace OpenSim.Region.Environment.Modules.World.Land
} }
#endregion #endregion
} }
} }

View File

@ -71,6 +71,9 @@ namespace OpenSim.Region.Environment.Scenes
//public TerrainEngine Terrain; //public TerrainEngine Terrain;
public ITerrainChannel Heightmap; public ITerrainChannel Heightmap;
/// <value>
/// Allows retrieval of land information for this scene.
/// </value>
public ILandChannel LandChannel; public ILandChannel LandChannel;
protected EventManager m_eventManager; protected EventManager m_eventManager;

View File

@ -57,8 +57,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
[Test] [Test]
public void TestAddRootAgent() public void TestAddRootAgent()
{ {
// Scene scene = SceneTestUtils.SetupScene(); Scene scene = SceneTestUtils.SetupScene();
SceneTestUtils.SetupScene();
AgentCircuitData agent = new AgentCircuitData(); AgentCircuitData agent = new AgentCircuitData();
agent.AgentID = UUID.Zero; agent.AgentID = UUID.Zero;
@ -72,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
agent.startpos = Vector3.Zero; agent.startpos = Vector3.Zero;
agent.CapsPath = "http://wibble.com"; agent.CapsPath = "http://wibble.com";
//scene.NewUserConnection(agent); scene.NewUserConnection(agent);
// There are going to be more parts to this. // There are going to be more parts to this.
} }

View File

@ -29,6 +29,7 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Servers;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Scenes.Tests namespace OpenSim.Region.Environment.Scenes.Tests
@ -41,19 +42,27 @@ namespace OpenSim.Region.Environment.Scenes.Tests
/// <summary> /// <summary>
/// Set up a test scene /// Set up a test scene
/// </summary> /// </summary>
/// <returns></returns>
public static TestScene SetupScene() public static TestScene SetupScene()
{ {
RegionInfo regInfo = new RegionInfo(1000, 1000, null, null); RegionInfo regInfo = new RegionInfo(1000, 1000, null, null);
regInfo.RegionName = "Unit test region"; regInfo.RegionName = "Unit test region";
regInfo.ExternalHostName = "1.2.3.4";
AgentCircuitManager acm = new AgentCircuitManager(); AgentCircuitManager acm = new AgentCircuitManager();
//CommunicationsManager cm = new CommunicationsManager(null, null, null, false, null); CommunicationsManager cm = new CommunicationsManager(null, null, null, false, null);
CommunicationsManager cm = null;
//SceneCommunicationService scs = new SceneCommunicationService(cm); //SceneCommunicationService scs = new SceneCommunicationService(cm);
SceneCommunicationService scs = null; SceneCommunicationService scs = null;
StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", "");
BaseHttpServer httpServer = new BaseHttpServer(666);
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();
return new TestScene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null); TestScene testScene = new TestScene(
regInfo, acm, cm, scs, null, sm, httpServer, null, false, false, false, configSource, null);
testScene.LandChannel = new TestLandChannel();
return testScene;
} }
/// <summary> /// <summary>

View File

@ -0,0 +1,52 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Scenes.Tests
{
/// <summary>
/// Land channel for test purposes
/// </summary>
public class TestLandChannel : ILandChannel
{
public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; }
public List<ILandObject> AllParcels() { return null; }
public ILandObject GetLandObject(int x, int y) { return null; }
public ILandObject GetLandObject(float x, float y) { return null; }
public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; }
public void UpdateLandObject(int localID, LandData data) {}
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {}
}
}