From e869eeb0bfc48c769f680970f99e4c67dd5a1a70 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 9 Aug 2011 03:51:34 +0100 Subject: Implement first draft functions for saving and loading NPC appearance from storage. This works by serializing and deserializing NPC AvatarAppearance to a notecard in the prim inventory and making the required baked textures permanent. By using notecards, we avoid lots of awkward, technical and user-unfriendly issues concerning retaining asset references and creating a new asset type. Notecards also allow different appearances to be swapped and manipulated easily. This also allows stored NPC appearances to work transparently with OARs/IARs since the UUID scan will pick up and store the necessary references from the notecard text. This works in my basic test but is not at all ready for user use or bug reporting yet. --- OpenSim/Region/Framework/Interfaces/INPCModule.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Interfaces/INPCModule.cs') diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index fa8d6b6..54575ca 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs @@ -26,6 +26,7 @@ */ using OpenMetaverse; +using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.Framework.Interfaces @@ -44,6 +45,23 @@ namespace OpenSim.Region.Framework.Interfaces UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, UUID cloneAppearanceFrom); /// + /// Check if the agent is an NPC. + /// + /// + /// + /// True if the agent is an NPC in the given scene. False otherwise. + bool IsNPC(UUID agentID, Scene scene); + + /// + /// Set the appearance for an NPC. + /// + /// + /// + /// + /// + bool SetNPCAppearance(UUID agentID, AvatarAppearance appearance, Scene scene); + + /// /// Move an NPC to a target over time. /// /// The UUID of the NPC @@ -59,7 +77,6 @@ namespace OpenSim.Region.Framework.Interfaces /// void Say(UUID agentID, Scene scene, string text); - /// /// Delete an NPC. /// -- cgit v1.1