From b0fe0464af9a11dda184d3613eca734cd8c9f21e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 22 Nov 2011 22:13:57 +0000 Subject: Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines. This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry. Callers adjusted to stop checking for the list reference being null (which never happened anyway) --- OpenSim/Framework/IScene.cs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/IScene.cs') diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index f1b4732..76b731f 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -102,12 +102,28 @@ namespace OpenSim.Framework bool TryGetScenePresence(UUID agentID, out object scenePresence); - T RequestModuleInterface(); - T[] RequestModuleInterfaces(); - + /// + /// Register an interface to a region module. This allows module methods to be called directly as + /// well as via events. If there is already a module registered for this interface, it is not replaced + /// (is this the best behaviour?) + /// + /// void RegisterModuleInterface(M mod); + void StackModuleInterface(M mod); + /// + /// For the given interface, retrieve the region module which implements it. + /// + /// null if there is no registered module implementing that interface + T RequestModuleInterface(); + + /// + /// For the given interface, retrieve an array of region modules that implement it. + /// + /// an empty array if there are no registered modules implementing that interface + T[] RequestModuleInterfaces(); + // void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback); ISceneObject DeserializeObject(string representation); -- cgit v1.1