public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { if (m_landManagementModule != null) { m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); } }
public void TestSubdivide() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); UUID userId = TestHelpers.ParseTail(0x1); LandManagementModule lmm = new LandManagementModule(); Scene scene = new SceneHelpers().SetupScene(); SceneHelpers.SetupSceneModules(scene, lmm); ILandObject lo = new LandObject(userId, false, scene); lo.LandData.Name = "lo1"; lo.SetLandBitmap( lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); lo = lmm.AddLandObject(lo); lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId); { ILandObject loAtCoord = lmm.GetLandObject(0, 0); Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID)); Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID)); } { ILandObject loAtCoord = lmm.GetLandObject(LandManagementModule.LandUnit, LandManagementModule.LandUnit); Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID)); Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID)); } }
public void TestSubdivide() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); UUID userId = TestHelpers.ParseTail(0x1); LandManagementModule lmm = new LandManagementModule(); Scene scene = new SceneHelpers().SetupScene(); SceneHelpers.SetupSceneModules(scene, lmm); ILandObject lo = new LandObject(userId, false, scene); lo.LandData.Name = "lo1"; lo.SetLandBitmap( lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); lo = lmm.AddLandObject(lo); lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId); { ILandObject loAtCoord = lmm.GetLandObject(0, 0); Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID)); Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID)); } { ILandObject loAtCoord = lmm.GetLandObject(LandManagementModule.LandUnit, LandManagementModule.LandUnit); Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID)); Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID)); } }