aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 9dc4489..97c15a9 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -52,6 +52,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
52 private Dictionary<UUID, NPCAvatar> m_avatars = 52 private Dictionary<UUID, NPCAvatar> m_avatars =
53 new Dictionary<UUID, NPCAvatar>(); 53 new Dictionary<UUID, NPCAvatar>();
54 54
55
56
57 private NPCOptionsFlags m_NPCOptionFlags;
58 public NPCOptionsFlags NPCOptionFlags {get {return m_NPCOptionFlags;}}
59
55 public bool Enabled { get; private set; } 60 public bool Enabled { get; private set; }
56 61
57 public void Initialise(IConfigSource source) 62 public void Initialise(IConfigSource source)
@@ -59,6 +64,27 @@ namespace OpenSim.Region.OptionalModules.World.NPC
59 IConfig config = source.Configs["NPC"]; 64 IConfig config = source.Configs["NPC"];
60 65
61 Enabled = (config != null && config.GetBoolean("Enabled", false)); 66 Enabled = (config != null && config.GetBoolean("Enabled", false));
67 m_NPCOptionFlags = NPCOptionsFlags.None;
68 if(Enabled)
69 {
70 bool opt = false;
71
72 opt = config.GetBoolean("AllowNotOwned", false);
73 if(opt)
74 m_NPCOptionFlags |= NPCOptionsFlags.AllowNotOwned;
75
76 opt = config.GetBoolean("AllowSenseAsAvatar", false);
77 if(opt)
78 m_NPCOptionFlags |= NPCOptionsFlags.AllowSenseAsAvatar;
79
80 opt = config.GetBoolean("AllowCloneOtherAvatars", false);
81 if(opt)
82 m_NPCOptionFlags |= NPCOptionsFlags.AllowCloneOtherAvatars;
83
84 opt = config.GetBoolean("NoNPCGroup", false);
85 if(opt)
86 m_NPCOptionFlags |= NPCOptionsFlags.NoNPCGroup;
87 }
62 } 88 }
63 89
64 public void AddRegion(Scene scene) 90 public void AddRegion(Scene scene)