From d2c91f5d5ad9e95710c6789ad897ea3b0aeb8082 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:20:59 +0100 Subject: [PATCH] rename _isReady to IsReady, make {get; private set;} --- QSB/SectorSync/SectorSync.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/QSB/SectorSync/SectorSync.cs b/QSB/SectorSync/SectorSync.cs index 4765bf8f..aa55d862 100644 --- a/QSB/SectorSync/SectorSync.cs +++ b/QSB/SectorSync/SectorSync.cs @@ -13,12 +13,12 @@ namespace QSB.SectorSync { public class SectorSync : MonoBehaviour { + public bool IsReady { get; private set; } public List SectorList = new List(); private OWRigidbody _attachedOWRigidbody; private SectorDetector _sectorDetector; private TargetType _targetType; - private bool _isReady; private void OnDestroy() { @@ -27,7 +27,7 @@ namespace QSB.SectorSync _sectorDetector.OnEnterSector -= AddSector; _sectorDetector.OnExitSector -= RemoveSector; } - _isReady = false; + IsReady = false; } public void Init(SectorDetector detector, ISectoredSync sectoredSync) @@ -58,7 +58,7 @@ namespace QSB.SectorSync PopulateSectorList(); _targetType = sectoredSync.Type; - _isReady = true; + IsReady = true; } private void PopulateSectorList() @@ -119,7 +119,7 @@ namespace QSB.SectorSync return null; } - if (!_isReady) + if (!IsReady) { DebugLog.ToConsole($"Warning - Tried to use GetClosestSector before it was initialized. Transform:{trans.name} Stacktrace:{Environment.StackTrace}", MessageType.Warning); return null; @@ -127,7 +127,7 @@ namespace QSB.SectorSync if (_sectorDetector == null || _attachedOWRigidbody == null || _targetType == TargetType.None) { - _isReady = false; + IsReady = false; DebugLog.ToConsole($"Error - SectorSync is no longer ready. Detector Null : {_sectorDetector == null}, OWRigidbody Null : {_attachedOWRigidbody == null}, None TargetType : {_targetType == TargetType.None}", MessageType.Error); return null; }