From 0bb2b7f18d57bf1ec230ffc906d2e9a1d04417c9 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Sat, 14 Jul 2007 14:15:58 +0000 Subject: [PATCH] * encapsulated some public fields --- OpenSim/Region/Environment/Scenes/Scene.cs | 37 +++++++++++++------ .../Region/Environment/Scenes/SceneObject.cs | 2 +- .../Scenes/scripting/ScriptInfo.cs | 2 +- OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 4 +- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 6a4b7355ee..01e67529da 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -68,10 +68,6 @@ namespace OpenSim.Region.Environment.Scenes protected Dictionary capsHandlers = new Dictionary(); protected BaseHttpServer httpListener; - public EstateManager estateManager; - public EventManager eventManager; - public ScriptManager scriptManager; - #region Properties /// /// @@ -89,12 +85,29 @@ namespace OpenSim.Region.Environment.Scenes } private ParcelManager m_parcelManager; - public ParcelManager ParcelManager { get { return m_parcelManager; } } + private EstateManager m_estateManager; + public EstateManager EstateManager + { + get { return m_estateManager; } + } + + private EventManager m_eventManager; + public EventManager EventManager + { + get { return m_eventManager; } + } + + private ScriptManager m_scriptManager; + public ScriptManager ScriptManager + { + get { return m_scriptManager; } + } + #endregion #region Constructors @@ -118,9 +131,9 @@ namespace OpenSim.Region.Environment.Scenes this.RegisterRegionWithComms(); m_parcelManager = new ParcelManager(this, this.m_regInfo); - estateManager = new EstateManager(this, this.m_regInfo); - scriptManager = new ScriptManager(this); - eventManager = new EventManager(); + m_estateManager = new EstateManager(this, this.m_regInfo); + m_scriptManager = new ScriptManager(this); + m_eventManager = new EventManager(); MainLog.Instance.Verbose("World.cs - creating new entitities instance"); Entities = new Dictionary(); @@ -189,7 +202,7 @@ namespace OpenSim.Region.Environment.Scenes } // General purpose event manager - eventManager.TriggerOnFrame(); + m_eventManager.TriggerOnFrame(); //backup world data this.storageCount++; @@ -453,7 +466,7 @@ namespace OpenSim.Region.Environment.Scenes public override void AddNewClient(IClientAPI client, bool child) { SubscribeToClientEvents(client); - this.estateManager.sendRegionHandshake(client); + this.m_estateManager.sendRegionHandshake(client); CreateAndAddScenePresence(client); this.m_parcelManager.sendParcelOverlay(client); @@ -489,7 +502,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnParcelDivideRequest += new ParcelDivideRequest(m_parcelManager.handleParcelDivideRequest); client.OnParcelJoinRequest += new ParcelJoinRequest(m_parcelManager.handleParcelJoinRequest); client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_parcelManager.handleParcelPropertiesUpdateRequest); - client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); + client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); } @@ -541,7 +554,7 @@ namespace OpenSim.Region.Environment.Scenes /// public override void RemoveClient(LLUUID agentID) { - eventManager.TriggerOnRemovePresence(agentID); + m_eventManager.TriggerOnRemovePresence(agentID); ScenePresence avatar = this.RequestAvatar(agentID); diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index 7058ece182..d1a3e7059f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.Environment.Scenes this.CreateRootFromShape(ownerID, localID, shape, pos); // Setup a backup event listener - world.eventManager.OnBackup += new EventManager.OnBackupDelegate(ProcessBackup); + world.EventManager.OnBackup += new EventManager.OnBackupDelegate(ProcessBackup); } /// diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index e1f711e673..c3be22a413 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.Scripting public ScriptInfo(Scene scene) { world = scene; - events = world.eventManager; + events = world.EventManager; logger = MainLog.Instance; api = new ScriptAPI(scene); } diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 1f40052f14..f46e40322b 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs @@ -97,7 +97,7 @@ namespace SimpleApp { this.StartTimer(); - scriptManager.AddPreCompiledScript(new PulseScript()); + ScriptManager.AddPreCompiledScript(new PulseScript()); PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); @@ -113,7 +113,7 @@ namespace SimpleApp { Entities[UUID].update(); } - eventManager.TriggerOnFrame(); + EventManager.TriggerOnFrame(); } #endregion