aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Config/SimConfigDb4o
diff options
context:
space:
mode:
authorMW2007-04-02 10:46:59 +0000
committerMW2007-04-02 10:46:59 +0000
commit1ea4ba3a18cf0ccdc512a1cc800e44bc5cf16210 (patch)
tree4022048c8ad28d31a2dd9c87f27bab213a731468 /OpenSim.Config/SimConfigDb4o
parentFinished putting user server config into Db4o (diff)
downloadopensim-SC-1ea4ba3a18cf0ccdc512a1cc800e44bc5cf16210.zip
opensim-SC-1ea4ba3a18cf0ccdc512a1cc800e44bc5cf16210.tar.gz
opensim-SC-1ea4ba3a18cf0ccdc512a1cc800e44bc5cf16210.tar.bz2
opensim-SC-1ea4ba3a18cf0ccdc512a1cc800e44bc5cf16210.tar.xz
Moved database storage of the world map to the Db4LocalStorage so its in the same database as in world prims are stored.
Diffstat (limited to '')
-rw-r--r--OpenSim.Config/SimConfigDb4o/DbSimConfig.cs42
-rw-r--r--OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.csproj225
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/MapStorage.cs (renamed from OpenSim.Config/SimConfigDb4o/MapStorage.cs)4
3 files changed, 114 insertions, 157 deletions
diff --git a/OpenSim.Config/SimConfigDb4o/DbSimConfig.cs b/OpenSim.Config/SimConfigDb4o/DbSimConfig.cs
index 250f3fd..9b51b45 100644
--- a/OpenSim.Config/SimConfigDb4o/DbSimConfig.cs
+++ b/OpenSim.Config/SimConfigDb4o/DbSimConfig.cs
@@ -29,7 +29,6 @@ using System.Collections.Generic;
29using OpenSim; 29using OpenSim;
30using OpenSim.Framework.Utilities; 30using OpenSim.Framework.Utilities;
31using OpenSim.Framework.Interfaces; 31using OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Terrain;
33//using OpenSim.world; 32//using OpenSim.world;
34using Db4objects.Db4o; 33using Db4objects.Db4o;
35 34
@@ -96,6 +95,7 @@ namespace OpenSim.Config.SimConfigDb4o
96 LoadDefaults(); 95 LoadDefaults();
97 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Writing out default settings to local database"); 96 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Writing out default settings to local database");
98 db.Set(this); 97 db.Set(this);
98 db.Commit();
99 } 99 }
100 } catch(Exception e) { 100 } catch(Exception e) {
101 db.Close(); 101 db.Close();
@@ -114,46 +114,6 @@ namespace OpenSim.Config.SimConfigDb4o
114 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid URL: " + this.GridURL); 114 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid URL: " + this.GridURL);
115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid key: " + this.GridSendKey); 115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid key: " + this.GridSendKey);
116 } 116 }
117
118 public override float[] LoadWorld()
119 {
120 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - Loading world....");
121 //World blank = new World();
122 float[] heightmap = null;
123 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - Looking for a heightmap in local DB");
124 IObjectSet world_result = db.Get(typeof(MapStorage));
125 if(world_result.Count>0) {
126 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - Found a heightmap in local database, loading");
127 MapStorage map=(MapStorage)world_result.Next();
128 //blank.LandMap = map.Map;
129 heightmap = map.Map;
130 } else {
131 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - No heightmap found, generating new one");
132 HeightmapGenHills hills = new HeightmapGenHills();
133 // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false);
134 heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false);
135 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - Saving heightmap to local database");
136 MapStorage map= new MapStorage();
137 map.Map = heightmap; //blank.LandMap;
138 db.Set(map);
139 db.Commit();
140 }
141 return heightmap;
142 }
143
144 public override void SaveMap(float[] heightmap)
145 {
146 IObjectSet world_result = db.Get(typeof(MapStorage));
147 if(world_result.Count>0) {
148 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadWorld() - updating saved copy of heightmap in local database");
149 MapStorage map=(MapStorage)world_result.Next();
150 db.Delete(map);
151 }
152 MapStorage map1= new MapStorage();
153 map1.Map = heightmap; //OpenSim_Main.local_world.LandMap;
154 db.Set(map1);
155 db.Commit();
156 }
157 117
158 public override void LoadFromGrid() { 118 public override void LoadFromGrid() {
159 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadFromGrid() - dummy function, DOING ABSOLUTELY NOTHING AT ALL!!!"); 119 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadFromGrid() - dummy function, DOING ABSOLUTELY NOTHING AT ALL!!!");
diff --git a/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.csproj b/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.csproj
index da72dcd..5e0577e 100644
--- a/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.csproj
+++ b/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.csproj
@@ -1,114 +1,111 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup> 2 <PropertyGroup>
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{CB5EADE7-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{83C87BE6-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Config.SimConfigDb4o</AssemblyName> 12 <AssemblyName>OpenSim.Config.SimConfigDb4o</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Config.SimConfigDb4o</RootNamespace> 19 <RootNamespace>OpenSim.Config.SimConfigDb4o</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
23 </PropertyGroup> 23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress> 26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> 27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile> 28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile> 29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE</DefineConstants> 30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile> 31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>False</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>True</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>../../bin/</OutputPath> 35 <OutputPath>..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel> 39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn> 40 <NoWarn></NoWarn>
41 </PropertyGroup> 41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress> 44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> 45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile> 46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile> 47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE;DEBUG</DefineConstants> 48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile> 49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>True</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>False</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>../../bin/</OutputPath> 53 <OutputPath>..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel> 57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn> 58 <NoWarn></NoWarn>
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="System" > 61 <Reference Include="System" >
62 <HintPath>System.dll</HintPath> 62 <HintPath>System.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System.Data.dll" > 65 <Reference Include="System.Data.dll" >
66 <HintPath>..\..\bin\System.Data.dll</HintPath> 66 <HintPath>..\..\bin\System.Data.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System.Xml" > 69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath> 70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="libsecondlife.dll" > 73 <Reference Include="libsecondlife.dll" >
74 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 74 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
75 <Private>False</Private> 75 <Private>False</Private>
76 </Reference> 76 </Reference>
77 <Reference Include="Db4objects.Db4o.dll" > 77 <Reference Include="Db4objects.Db4o.dll" >
78 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 78 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
79 <Private>False</Private> 79 <Private>False</Private>
80 </Reference> 80 </Reference>
81 </ItemGroup> 81 </ItemGroup>
82 <ItemGroup> 82 <ItemGroup>
83 <ProjectReference Include="../../OpenSim.Framework/OpenSim.Framework.csproj"> 83 <ProjectReference Include="..\..\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name> 84 <Name>OpenSim.Framework</Name>
85 <Project>{7404933D-0000-0000-0000-000000000000}</Project> 85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private> 87 <Private>False</Private>
88 </ProjectReference> 88 </ProjectReference>
89 <ProjectReference Include="../../OpenSim.Framework.Console/OpenSim.Framework.Console.csproj"> 89 <ProjectReference Include="..\..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name> 90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{16759386-0000-0000-0000-000000000000}</Project> 91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private> 93 <Private>False</Private>
94 </ProjectReference> 94 </ProjectReference>
95 </ItemGroup> 95 </ItemGroup>
96 <ItemGroup> 96 <ItemGroup>
97 <Compile Include="AssemblyInfo.cs"> 97 <Compile Include="AssemblyInfo.cs">
98 <SubType>Code</SubType> 98 <SubType>Code</SubType>
99 </Compile> 99 </Compile>
100 <Compile Include="DbSimConfig.cs"> 100 <Compile Include="DbSimConfig.cs">
101 <SubType>Code</SubType> 101 <SubType>Code</SubType>
102 </Compile> 102 </Compile>
103 <Compile Include="MapStorage.cs"> 103 </ItemGroup>
104 <SubType>Code</SubType> 104 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
105 </Compile> 105 <PropertyGroup>
106 </ItemGroup> 106 <PreBuildEvent>
107 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 107 </PreBuildEvent>
108 <PropertyGroup> 108 <PostBuildEvent>
109 <PreBuildEvent> 109 </PostBuildEvent>
110 </PreBuildEvent> 110 </PropertyGroup>
111 <PostBuildEvent> 111</Project>
112 </PostBuildEvent>
113 </PropertyGroup>
114</Project>
diff --git a/OpenSim.Config/SimConfigDb4o/MapStorage.cs b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs
index eb68a94..db590ff 100644
--- a/OpenSim.Config/SimConfigDb4o/MapStorage.cs
+++ b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs
@@ -2,7 +2,7 @@ using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Config.SimConfigDb4o 5namespace OpenSim.Storage.LocalStorageDb4o
6{ 6{
7 public class MapStorage 7 public class MapStorage
8 { 8 {
@@ -13,4 +13,4 @@ namespace OpenSim.Config.SimConfigDb4o
13 13
14 } 14 }
15 } 15 }
16} 16} \ No newline at end of file