diff options
author | Justin Clark-Casey (justincc) | 2011-08-03 04:33:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-03 04:33:45 +0100 |
commit | 797def8aa4a009ba3bc44d6b73e063e4bb61ba97 (patch) | |
tree | 7a664006c501c0a500b6cb413646675bb06accc7 | |
parent | Do a partial fix/implementation of OSSL osNpcMoveTo() (diff) | |
download | opensim-SC_OLD-797def8aa4a009ba3bc44d6b73e063e4bb61ba97.zip opensim-SC_OLD-797def8aa4a009ba3bc44d6b73e063e4bb61ba97.tar.gz opensim-SC_OLD-797def8aa4a009ba3bc44d6b73e063e4bb61ba97.tar.bz2 opensim-SC_OLD-797def8aa4a009ba3bc44d6b73e063e4bb61ba97.tar.xz |
Put config to enable disable [NPC] module.
Default is disabled. You will need to explicitly enable to toy with this.
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 6 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index fcfacc6..d139b25 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -44,15 +44,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | // private const bool m_enabled = false; | ||
48 | |||
49 | private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>(); | 47 | private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>(); |
50 | private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>(); | 48 | private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>(); |
51 | 49 | ||
52 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(Scene scene, IConfigSource source) |
53 | { | 51 | { |
54 | scene.RegisterModuleInterface<INPCModule>(this); | 52 | IConfig config = source.Configs["NPC"]; |
55 | scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; | 53 | |
54 | if (config != null && config.GetBoolean("Enabled", false)) | ||
55 | { | ||
56 | scene.RegisterModuleInterface<INPCModule>(this); | ||
57 | scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; | ||
58 | } | ||
56 | } | 59 | } |
57 | 60 | ||
58 | public void HandleOnSignificantClientMovement(ScenePresence presence) | 61 | public void HandleOnSignificantClientMovement(ScenePresence presence) |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 5da80c0..1a87b79 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -716,6 +716,12 @@ | |||
716 | ; Enabled = true; | 716 | ; Enabled = true; |
717 | 717 | ||
718 | 718 | ||
719 | [NPC] | ||
720 | ;# {Enabled} {} {Enable Non Player Character (NPC) facilities} {true false} false | ||
721 | ;; Enable media on a prim facilities | ||
722 | ; Enabled = false | ||
723 | |||
724 | |||
719 | [PrimLimitsModule] | 725 | [PrimLimitsModule] |
720 | ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false | 726 | ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false |
721 | ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior. | 727 | ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior. |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 59088c4..d74f373 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1366,6 +1366,10 @@ | |||
1366 | ; Enable media on a prim facilities | 1366 | ; Enable media on a prim facilities |
1367 | Enabled = true; | 1367 | Enabled = true; |
1368 | 1368 | ||
1369 | [NPC] | ||
1370 | ;; Enable media on a prim facilities | ||
1371 | Enabled = false | ||
1372 | |||
1369 | ;; | 1373 | ;; |
1370 | ;; If you are using a simian grid frontend you can enable | 1374 | ;; If you are using a simian grid frontend you can enable |
1371 | ;; this module to upload tile images for the mapping fn | 1375 | ;; this module to upload tile images for the mapping fn |