Put config to enable disable [NPC] module.

Default is disabled.  You will need to explicitly enable to toy with this.
bulletsim
Justin Clark-Casey (justincc) 2011-08-03 04:33:45 +01:00
parent 6e4ec29722
commit 797def8aa4
3 changed files with 17 additions and 4 deletions

View File

@ -44,15 +44,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private const bool m_enabled = false;
private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>(); private Dictionary<UUID, NPCAvatar> m_avatars = new Dictionary<UUID, NPCAvatar>();
private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>(); private Dictionary<UUID, AvatarAppearance> m_appearanceCache = new Dictionary<UUID, AvatarAppearance>();
public void Initialise(Scene scene, IConfigSource source) public void Initialise(Scene scene, IConfigSource source)
{ {
scene.RegisterModuleInterface<INPCModule>(this); IConfig config = source.Configs["NPC"];
scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement;
if (config != null && config.GetBoolean("Enabled", false))
{
scene.RegisterModuleInterface<INPCModule>(this);
scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement;
}
} }
public void HandleOnSignificantClientMovement(ScenePresence presence) public void HandleOnSignificantClientMovement(ScenePresence presence)

View File

@ -716,6 +716,12 @@
; Enabled = true; ; Enabled = true;
[NPC]
;# {Enabled} {} {Enable Non Player Character (NPC) facilities} {true false} false
;; Enable media on a prim facilities
; Enabled = false
[PrimLimitsModule] [PrimLimitsModule]
;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false
;; Enable parcel prim limits. Off by default to emulate pre-existing behavior. ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior.

View File

@ -1366,6 +1366,10 @@
; Enable media on a prim facilities ; Enable media on a prim facilities
Enabled = true; Enabled = true;
[NPC]
;; Enable media on a prim facilities
Enabled = false
;; ;;
;; If you are using a simian grid frontend you can enable ;; If you are using a simian grid frontend you can enable
;; this module to upload tile images for the mapping fn ;; this module to upload tile images for the mapping fn