diff options
author | Dr Scofield | 2009-02-06 16:55:34 +0000 |
---|---|---|
committer | Dr Scofield | 2009-02-06 16:55:34 +0000 |
commit | 9b66108081a8c8cf79faaa6c541554091c40850e (patch) | |
tree | 095a232ae5a9de3a9244bcd34da08294f61eeea5 /OpenSim/Region/Environment/ModuleLoader.cs | |
parent | * removed superfluous constants class (diff) | |
download | opensim-SC-9b66108081a8c8cf79faaa6c541554091c40850e.zip opensim-SC-9b66108081a8c8cf79faaa6c541554091c40850e.tar.gz opensim-SC-9b66108081a8c8cf79faaa6c541554091c40850e.tar.bz2 opensim-SC-9b66108081a8c8cf79faaa6c541554091c40850e.tar.xz |
This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only
part. This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces
into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region
modules in OpenSim.Region.Environment.
The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.
I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/ModuleLoader.cs (renamed from OpenSim/Region/Environment/ModuleLoader.cs) | 88 |
1 files changed, 8 insertions, 80 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs index f06fa0f..d393919 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Framework/ModuleLoader.cs | |||
@@ -31,18 +31,10 @@ using System.IO; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Environment.Modules.Agent.AssetTransaction; | 35 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Region.Environment.Modules.Avatar.Chat; | ||
37 | using OpenSim.Region.Environment.Modules.Avatar.InstantMessage; | ||
38 | using OpenSim.Region.Environment.Modules.Scripting.DynamicTexture; | ||
39 | using OpenSim.Region.Environment.Modules.Scripting.LoadImageURL; | ||
40 | using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; | ||
41 | using OpenSim.Region.Environment.Scenes; | ||
42 | 36 | ||
43 | //TODO: Why do we reference InstantMessageModule here? | 37 | namespace OpenSim.Region.Framework |
44 | |||
45 | namespace OpenSim.Region.Environment | ||
46 | { | 38 | { |
47 | public class ModuleLoader | 39 | public class ModuleLoader |
48 | { | 40 | { |
@@ -81,83 +73,19 @@ namespace OpenSim.Region.Environment | |||
81 | return modules; | 73 | return modules; |
82 | } | 74 | } |
83 | 75 | ||
84 | public void LoadDefaultSharedModules() | 76 | public void LoadDefaultSharedModule(IRegionModule module) |
85 | { | 77 | { |
86 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); | 78 | if (m_loadedSharedModules.ContainsKey(module.Name)) |
87 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) | ||
88 | { | ||
89 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); | ||
90 | } | ||
91 | else | ||
92 | { | ||
93 | m_loadedSharedModules.Add(dynamicModule.Name, dynamicModule); | ||
94 | } | ||
95 | |||
96 | // ChatModule chat = new ChatModule(); | ||
97 | // if (m_loadedSharedModules.ContainsKey(chat.Name)) | ||
98 | // { | ||
99 | // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); | ||
100 | // } | ||
101 | // else | ||
102 | // { | ||
103 | // m_loadedSharedModules.Add(chat.Name, chat); | ||
104 | // } | ||
105 | |||
106 | InstantMessageModule imMod = new InstantMessageModule(); | ||
107 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) | ||
108 | { | 79 | { |
109 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); | 80 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module not added!", module.Name); |
110 | } | 81 | } |
111 | else | 82 | else |
112 | { | 83 | { |
113 | m_loadedSharedModules.Add(imMod.Name, imMod); | 84 | m_loadedSharedModules.Add(module.Name, module); |
114 | } | ||
115 | |||
116 | LoadImageURLModule loadMod = new LoadImageURLModule(); | ||
117 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) | ||
118 | { | ||
119 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | m_loadedSharedModules.Add(loadMod.Name, loadMod); | ||
124 | } | ||
125 | |||
126 | // AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); | ||
127 | // if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) | ||
128 | // { | ||
129 | // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); | ||
130 | // } | ||
131 | // else | ||
132 | // { | ||
133 | // m_loadedSharedModules.Add(avatarFactory.Name, avatarFactory); | ||
134 | // } | ||
135 | |||
136 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); | ||
137 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) | ||
138 | { | ||
139 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); | ||
140 | } | ||
141 | else | ||
142 | { | ||
143 | m_loadedSharedModules.Add(xmlRpcMod.Name, xmlRpcMod); | ||
144 | } | ||
145 | //TextureDownloadModule textureModule = new TextureDownloadModule(); | ||
146 | |||
147 | //LoadedSharedModules.Add(textureModule.Name, textureModule); | ||
148 | |||
149 | AssetTransactionModule transactionsModule = new AssetTransactionModule(); | ||
150 | if (m_loadedSharedModules.ContainsKey(transactionsModule.Name)) | ||
151 | { | ||
152 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", transactionsModule.Name, "TransactionModule"); | ||
153 | } | ||
154 | else | ||
155 | { | ||
156 | m_loadedSharedModules.Add(transactionsModule.Name, transactionsModule); | ||
157 | } | 85 | } |
158 | |||
159 | } | 86 | } |
160 | 87 | ||
88 | |||
161 | public void InitialiseSharedModules(Scene scene) | 89 | public void InitialiseSharedModules(Scene scene) |
162 | { | 90 | { |
163 | foreach (IRegionModule module in m_loadedSharedModules.Values) | 91 | foreach (IRegionModule module in m_loadedSharedModules.Values) |