diff options
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces/INPCModule.cs')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/INPCModule.cs | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index b65f82c..2731291 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -31,6 +31,19 @@ using OpenSim.Region.Framework.Scenes; | |||
31 | 31 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 32 | namespace OpenSim.Region.Framework.Interfaces |
33 | { | 33 | { |
34 | /// <summary> | ||
35 | /// Temporary interface. More methods to come at some point to make NPCs more object oriented rather than | ||
36 | /// controlling purely through module level interface calls (e.g. sit/stand). | ||
37 | /// </summary> | ||
38 | public interface INPC | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// Should this NPC be sensed by LSL sensors as an 'agent' (interpreted here to mean a normal user) | ||
42 | /// rather than an OpenSim specific NPC extension? | ||
43 | /// </summary> | ||
44 | bool SenseAsAgent { get; } | ||
45 | } | ||
46 | |||
34 | public interface INPCModule | 47 | public interface INPCModule |
35 | { | 48 | { |
36 | /// <summary> | 49 | /// <summary> |
@@ -39,10 +52,21 @@ namespace OpenSim.Region.Framework.Interfaces | |||
39 | /// <param name="firstname"></param> | 52 | /// <param name="firstname"></param> |
40 | /// <param name="lastname"></param> | 53 | /// <param name="lastname"></param> |
41 | /// <param name="position"></param> | 54 | /// <param name="position"></param> |
55 | /// <param name="senseAsAgent"> | ||
56 | /// Make the NPC show up as an agent on LSL sensors. The default is that they | ||
57 | /// show up as the NPC type instead, but this is currently an OpenSim-only extension. | ||
58 | /// </param> | ||
42 | /// <param name="scene"></param> | 59 | /// <param name="scene"></param> |
43 | /// <param name="appearance">The avatar appearance to use for the new NPC.</param> | 60 | /// <param name="appearance">The avatar appearance to use for the new NPC.</param> |
44 | /// <returns>The UUID of the ScenePresence created.</returns> | 61 | /// <returns>The UUID of the ScenePresence created.</returns> |
45 | UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, AvatarAppearance appearance); | 62 | UUID CreateNPC( |
63 | string firstname, | ||
64 | string lastname, | ||
65 | Vector3 position, | ||
66 | UUID owner, | ||
67 | bool senseAsAgent, | ||
68 | Scene scene, | ||
69 | AvatarAppearance appearance); | ||
46 | 70 | ||
47 | /// <summary> | 71 | /// <summary> |
48 | /// Check if the agent is an NPC. | 72 | /// Check if the agent is an NPC. |
@@ -53,6 +77,22 @@ namespace OpenSim.Region.Framework.Interfaces | |||
53 | bool IsNPC(UUID agentID, Scene scene); | 77 | bool IsNPC(UUID agentID, Scene scene); |
54 | 78 | ||
55 | /// <summary> | 79 | /// <summary> |
80 | /// Get the NPC. This is not currently complete - manipulation of NPCs still occurs through the region interface | ||
81 | /// </summary> | ||
82 | /// <param name="agentID"></param> | ||
83 | /// <param name="scene"></param> | ||
84 | /// <returns>The NPC. null if it does not exist.</returns> | ||
85 | INPC GetNPC(UUID agentID, Scene scene); | ||
86 | |||
87 | /// <summary> | ||
88 | /// Check if the caller has permission to manipulate the given NPC. | ||
89 | /// </summary> | ||
90 | /// <param name="npcID"></param> | ||
91 | /// <param name="callerID"></param> | ||
92 | /// <returns>true if they do, false if they don't or if there's no NPC with the given ID.</returns> | ||
93 | bool CheckPermissions(UUID npcID, UUID callerID); | ||
94 | |||
95 | /// <summary> | ||
56 | /// Set the appearance for an NPC. | 96 | /// Set the appearance for an NPC. |
57 | /// </summary> | 97 | /// </summary> |
58 | /// <param name="agentID"></param> | 98 | /// <param name="agentID"></param> |
@@ -118,5 +158,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
118 | /// <param name="scene"></param> | 158 | /// <param name="scene"></param> |
119 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | 159 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> |
120 | bool DeleteNPC(UUID agentID, Scene scene); | 160 | bool DeleteNPC(UUID agentID, Scene scene); |
161 | |||
162 | /// <summary> | ||
163 | /// Get the owner of a NPC | ||
164 | /// </summary> | ||
165 | /// <param name="agentID">The UUID of the NPC</param> | ||
166 | /// <returns>UUID of owner if the NPC exists, UUID.Zero if there was no such agent, the agent is unowned or the agent was not an NPC</returns> | ||
167 | UUID GetOwner(UUID agentID); | ||
121 | } | 168 | } |
122 | } \ No newline at end of file | 169 | } \ No newline at end of file |