diff options
author | Adam Frisby | 2008-03-30 09:03:38 +0000 |
---|---|---|
committer | Adam Frisby | 2008-03-30 09:03:38 +0000 |
commit | fadd19f3140107d7c09e7a82a97dfb490146ccb9 (patch) | |
tree | 3ce4581ef1af79d451f0b24ce50128f09482f386 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | This update has good news and bad news, first the bad. (diff) | |
download | opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.zip opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.gz opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.bz2 opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.xz |
**Big ass update warning**
* Renamed plugin console message, to send a message to a plugin, use either "plugin <message>", or any unrecognised message will be sent ("plugin" sends explicitly) This replaces the old "script <message>".
* Terrain commands - "terrain <command>" now works again. "Script terrain <command>" does not. Many of the commands have now been reimplemented, eg load-tile. However some have new syntax.
* New console command handler, you can now use things like "terrain help" or "terrain save help". See TerrainModule.cs for an example of how to use the new "Commander" class.
* Commander class - advanced processing of console input and also enables a script API to be generated from registered console commands.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 819815b..2f277f9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -40,10 +40,8 @@ using OpenSim.Framework.Communications; | |||
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Environment.Interfaces; | 42 | using OpenSim.Region.Environment.Interfaces; |
43 | using OpenSim.Region.Environment.Modules; | ||
44 | using OpenSim.Region.Environment.Scenes.Scripting; | 43 | using OpenSim.Region.Environment.Scenes.Scripting; |
45 | using OpenSim.Region.Physics.Manager; | 44 | using OpenSim.Region.Physics.Manager; |
46 | using OpenSim.Region.Terrain; | ||
47 | using Caps = OpenSim.Region.Capabilities.Caps; | 45 | using Caps = OpenSim.Region.Capabilities.Caps; |
48 | using Image = System.Drawing.Image; | 46 | using Image = System.Drawing.Image; |
49 | using Timer = System.Timers.Timer; | 47 | using Timer = System.Timers.Timer; |
@@ -75,7 +73,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
75 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 73 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
76 | 74 | ||
77 | private int m_timePhase = 24; | 75 | private int m_timePhase = 24; |
78 | private int m_timeUpdateCount; | ||
79 | 76 | ||
80 | private readonly Mutex updateLock; | 77 | private readonly Mutex updateLock; |
81 | public bool m_physicalPrim; | 78 | public bool m_physicalPrim; |
@@ -104,6 +101,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
104 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); | 101 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); |
105 | public Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>(); | 102 | public Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>(); |
106 | protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>(); | 103 | protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>(); |
104 | public Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); | ||
107 | 105 | ||
108 | //API module interfaces | 106 | //API module interfaces |
109 | 107 | ||
@@ -1949,6 +1947,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
1949 | } | 1947 | } |
1950 | } | 1948 | } |
1951 | 1949 | ||
1950 | public void RegisterModuleCommander(string name, ICommander commander) | ||
1951 | { | ||
1952 | lock (m_moduleCommanders) | ||
1953 | { | ||
1954 | m_moduleCommanders.Add(name, commander); | ||
1955 | } | ||
1956 | } | ||
1957 | |||
1958 | public ICommander GetCommander(string name) | ||
1959 | { | ||
1960 | lock (m_moduleCommanders) | ||
1961 | { | ||
1962 | return m_moduleCommanders[name]; | ||
1963 | } | ||
1964 | } | ||
1965 | |||
1966 | public Dictionary<string, ICommander> GetCommanders() | ||
1967 | { | ||
1968 | return m_moduleCommanders; | ||
1969 | } | ||
1970 | |||
1952 | /// <summary> | 1971 | /// <summary> |
1953 | /// | 1972 | /// |
1954 | /// </summary> | 1973 | /// </summary> |