aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-08-07 05:39:20 +0100
committerMelanie2010-08-07 05:39:20 +0100
commita04efe4a4df06c6d1e4adccc1e5d3d6f4842f067 (patch)
treeb2e36a0e20227fc45465e8f12ddab83044408586 /OpenSim/Region
parentCorrect display of landmark about info. Also correct region maturity rating (diff)
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-a04efe4a4df06c6d1e4adccc1e5d3d6f4842f067.zip
opensim-SC_OLD-a04efe4a4df06c6d1e4adccc1e5d3d6f4842f067.tar.gz
opensim-SC_OLD-a04efe4a4df06c6d1e4adccc1e5d3d6f4842f067.tar.bz2
opensim-SC_OLD-a04efe4a4df06c6d1e4adccc1e5d3d6f4842f067.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs5
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs (renamed from OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs)77
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs147
8 files changed, 52 insertions, 196 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 2d80382..3fb2c8c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
741 public void TestMergeIarPath() 741 public void TestMergeIarPath()
742 { 742 {
743 TestHelper.InMethod(); 743 TestHelper.InMethod();
744 log4net.Config.XmlConfigurator.Configure(); 744// log4net.Config.XmlConfigurator.Configure();
745 745
746 Scene scene = SceneSetupHelpers.SetupScene("inventory"); 746 Scene scene = SceneSetupHelpers.SetupScene("inventory");
747 UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); 747 UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index b2e3f4f..023a44c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -233,6 +233,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
233 return m_GridService.GetFallbackRegions(scopeID, x, y); 233 return m_GridService.GetFallbackRegions(scopeID, x, y);
234 } 234 }
235 235
236 public List<GridRegion> GetHyperlinks(UUID scopeID)
237 {
238 return m_GridService.GetHyperlinks(scopeID);
239 }
240
236 public int GetRegionFlags(UUID scopeID, UUID regionID) 241 public int GetRegionFlags(UUID scopeID, UUID regionID)
237 { 242 {
238 return m_GridService.GetRegionFlags(scopeID, regionID); 243 return m_GridService.GetRegionFlags(scopeID, regionID);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
index 95d8737..2726ae8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
@@ -136,6 +136,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
136 900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize); 136 900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize);
137 Assert.IsNotNull(results, "Retrieved GetRegionRange list is null"); 137 Assert.IsNotNull(results, "Retrieved GetRegionRange list is null");
138 Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); 138 Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
139
140 results = m_LocalConnector.GetHyperlinks(UUID.Zero);
141 Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null");
142 Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected");
143
139 } 144 }
140 } 145 }
141} 146}
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index f47450f..9f38a99 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1720,6 +1720,8 @@ namespace OpenSim.Region.Framework.Scenes
1720 /// <param name="originalPrim"></param> 1720 /// <param name="originalPrim"></param>
1721 /// <param name="offset"></param> 1721 /// <param name="offset"></param>
1722 /// <param name="flags"></param> 1722 /// <param name="flags"></param>
1723 /// <param name="AgentID"></param>
1724 /// <param name="GroupID"></param>
1723 protected internal void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) 1725 protected internal void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID)
1724 { 1726 {
1725 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1727 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
@@ -1734,7 +1736,10 @@ namespace OpenSim.Region.Framework.Scenes
1734 /// <param name="originalPrim"></param> 1736 /// <param name="originalPrim"></param>
1735 /// <param name="offset"></param> 1737 /// <param name="offset"></param>
1736 /// <param name="flags"></param> 1738 /// <param name="flags"></param>
1737 protected internal SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) 1739 /// <param name="AgentID"></param>
1740 /// <param name="GroupID"></param>
1741 /// <param name="rot"></param>
1742 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
1738 { 1743 {
1739 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1744 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
1740 SceneObjectGroup original = GetGroupByPrim(originalPrimID); 1745 SceneObjectGroup original = GetGroupByPrim(originalPrimID);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 3dac0ad..0c35eec 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1162,6 +1162,10 @@ namespace OpenSim.Region.Framework.Scenes
1162 set { _nextOwnerMask = value; } 1162 set { _nextOwnerMask = value; }
1163 } 1163 }
1164 1164
1165 /// <summary>
1166 /// Property flags. See OpenMetaverse.PrimFlags
1167 /// </summary>
1168 /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge
1165 public PrimFlags Flags 1169 public PrimFlags Flags
1166 { 1170 {
1167 get { return _flags; } 1171 get { return _flags; }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
index 42587c1..8a103d7 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -26,61 +26,46 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Reflection;
29using NUnit.Framework; 30using NUnit.Framework;
31using NUnit.Framework.SyntaxHelpers;
30using OpenMetaverse; 32using OpenMetaverse;
31using OpenSim.Framework; 33using OpenSim.Framework;
32using GridRegion = OpenSim.Services.Interfaces.GridRegion; 34using OpenSim.Framework.Communications;
35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Tests.Common;
37using OpenSim.Tests.Common.Mock;
38using OpenSim.Tests.Common.Setup;
33 39
34namespace OpenSim.Region.Framework.Scenes.Tests 40namespace OpenSim.Region.Framework.Scenes.Tests
35{ 41{
36 /// <summary>
37 /// Scene presence tests
38 /// </summary>
39 [TestFixture] 42 [TestFixture]
40 public class SceneBaseTests 43 public class SceneGraphTests
41 { 44 {
42 private class SceneBaseImpl : SceneBase 45 [Test]
46 public void TestDuplicateObject()
43 { 47 {
44 public override void Update() 48 TestHelper.InMethod();
45 { 49 Scene scene = SceneSetupHelpers.SetupScene();
46 throw new NotImplementedException();
47 }
48
49 public override void LoadWorldMap()
50 {
51 throw new NotImplementedException();
52 }
53
54 public override void AddNewClient(IClientAPI client)
55 {
56 throw new NotImplementedException();
57 }
58
59 public override void RemoveClient(UUID agentID)
60 {
61 throw new NotImplementedException();
62 }
63 50
64 public override void OtherRegionUp(GridRegion otherRegion) 51 UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010");
65 { 52 string objName = "obj1";
66 throw new NotImplementedException(); 53 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
67 }
68 54
69 public override bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence) 55 SceneObjectPart part
70 { 56 = new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
71 throw new NotImplementedException(); 57 { Name = objName, UUID = objUuid };
72 }
73 58
74 public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) 59 scene.AddNewSceneObject(new SceneObjectGroup(part), false);
75 { 60
76 throw new NotImplementedException(); 61 SceneObjectGroup duplicatedSo
77 } 62 = scene.SceneGraph.DuplicateObject(
78 } 63 part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity);
79 64
80 [Test] 65 Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1));
81 public void TestConstructor() 66 Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId));
82 { 67
83 new SceneBaseImpl(); 68 //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
84 } 69 }
85 } 70 }
86} 71} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 4baa22c..d4f9f18 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -32,7 +32,6 @@ using NUnit.Framework.SyntaxHelpers;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications; 34using OpenSim.Framework.Communications;
35
36using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
37using OpenSim.Tests.Common; 36using OpenSim.Tests.Common;
38using OpenSim.Tests.Common.Mock; 37using OpenSim.Tests.Common.Mock;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
deleted file mode 100644
index 8b2d387..0000000
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using NUnit.Framework;
31using OpenMetaverse;
32using OpenSim.Framework;
33using OpenSim.Region.Framework.Interfaces;
34
35namespace OpenSim.Region.Framework.Scenes.Tests
36{
37 /// <summary>
38 /// Scene presence tests
39 /// </summary>
40 [TestFixture]
41 public class SceneTests
42 {
43 private class FakeStorageManager : StorageManager
44 {
45 private class FakeRegionDataStore : IRegionDataStore
46 {
47 public void Initialise(string filename)
48 {
49 }
50
51 public void Dispose()
52 {
53 }
54
55 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
56 {
57 throw new NotImplementedException();
58 }
59
60 public void RemoveObject(UUID uuid, UUID regionUUID)
61 {
62 throw new NotImplementedException();
63 }
64
65 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
66 {
67 throw new NotImplementedException();
68 }
69
70 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
71 {
72 throw new NotImplementedException();
73 }
74
75 public void StoreTerrain(double[,] terrain, UUID regionID)
76 {
77 throw new NotImplementedException();
78 }
79
80 public double[,] LoadTerrain(UUID regionID)
81 {
82 throw new NotImplementedException();
83 }
84
85 public void StoreLandObject(ILandObject Parcel)
86 {
87 throw new NotImplementedException();
88 }
89
90 public void RemoveLandObject(UUID globalID)
91 {
92 throw new NotImplementedException();
93 }
94
95 public List<LandData> LoadLandObjects(UUID regionUUID)
96 {
97 throw new NotImplementedException();
98 }
99
100 public void StoreRegionSettings(RegionSettings rs)
101 {
102 throw new NotImplementedException();
103 }
104 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
105 {
106 //This connector doesn't support the windlight module yet
107 //Return default LL windlight settings
108 return new RegionLightShareData();
109 }
110 public void StoreRegionWindlightSettings(RegionLightShareData wl)
111 {
112 //This connector doesn't support the windlight module yet
113 }
114 public RegionSettings LoadRegionSettings(UUID regionUUID)
115 {
116 return null;
117 }
118
119 public void Shutdown()
120 {
121 throw new NotImplementedException();
122 }
123 }
124
125 public FakeStorageManager() : base(new FakeRegionDataStore())
126 {
127 }
128
129 public FakeStorageManager(IRegionDataStore storage) : this()
130 {
131 }
132
133 public FakeStorageManager(string dllName, string connectionstring, string estateconnectionstring) : this()
134 {
135 }
136 }
137
138 [Test]
139 public void TestConstructor()
140 {
141 RegionInfo regionInfo = new RegionInfo(0,0,null,null);
142 FakeStorageManager storageManager = new FakeStorageManager();
143
144 new Scene(regionInfo, null, null, storageManager, null, false, false, false, null, null);
145 }
146 }
147}