This commit is contained in:
Mister_Nebula 2021-03-07 09:27:23 +00:00
parent f137bd37ae
commit 0453666141
12 changed files with 19 additions and 32 deletions

View File

@ -3,7 +3,7 @@ using UnityEngine;
namespace QSB.ItemSync
{
class CustomNomaiRemoteCamera : MonoBehaviour
internal class CustomNomaiRemoteCamera : MonoBehaviour
{
private OWCamera _camera;
private AudioListener _audioListener;

View File

@ -8,7 +8,7 @@ using UnityEngine;
namespace QSB.ItemSync
{
class CustomNomaiRemoteCameraPlatform : NomaiShared
internal class CustomNomaiRemoteCameraPlatform : NomaiShared
{
private static List<CustomNomaiRemoteCameraPlatform> s_platforms;
private static MaterialPropertyBlock s_matPropBlock;
@ -594,7 +594,7 @@ namespace QSB.ItemSync
private void DisconnectCamera()
{
DebugLog.DebugWrite($"{_oldPlatform.name} DisconnectCamera");
var cameraState = this._cameraState;
var cameraState = _cameraState;
if (cameraState != CameraState.Connected && cameraState != CameraState.Connecting_FadeOut)
{
if (cameraState == CameraState.Connecting_FadeIn)
@ -692,15 +692,9 @@ namespace QSB.ItemSync
return null;
}
public SharedStone GetSocketedStone()
{
return _sharedStone;
}
public SharedStone GetSocketedStone() => _sharedStone;
public bool IsPlatformActive()
{
return _platformActive;
}
public bool IsPlatformActive() => _platformActive;
public enum CameraState
{

View File

@ -1,10 +1,9 @@
using OWML.Utils;
using QSB.Utility;
using UnityEngine;
namespace QSB.ItemSync
{
class CustomNomaiRemoteCameraStreaming : SectoredMonoBehaviour
internal class CustomNomaiRemoteCameraStreaming : SectoredMonoBehaviour
{
private OWTriggerVolume _owTriggerVolume;
public CustomNomaiRemoteCameraPlatform _remoteCameraPlatform

View File

@ -33,10 +33,7 @@ namespace QSB.ItemSync.Patches
}
public static bool Platform_ReturnFalse()
{
return false;
}
public static bool Platform_ReturnFalse() => false;
public static bool ItemTool_MoveItemToCarrySocket(OWItem item)
{

View File

@ -1,5 +1,4 @@
using System;
using UnityEngine;
using UnityEngine;
namespace QSB
{

View File

@ -59,7 +59,7 @@ namespace QSB.QuantumSync.WorldObjects
component.MoveToRelativeLocation(location, AttachedObject.transform);
}
if ((QuantumManager.Instance.Shrine as SocketedQuantumObject) != AttachedObject)
if (QuantumManager.Instance.Shrine != AttachedObject)
{
AttachedObject.transform.localRotation = message.LocalRotation;
}

View File

@ -67,7 +67,7 @@ namespace QSB.Utility
}
}
private static IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private static readonly IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private class EventData
{

View File

@ -67,7 +67,7 @@ namespace QSB.Utility
}
}
private static IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private static readonly IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private class EventData
{

View File

@ -67,7 +67,7 @@ namespace QSB.Utility
}
}
private static IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private static readonly IDictionary<string, EventData> _eventTable = new Dictionary<string, EventData>(ComparerLibrary.stringEqComparer);
private class EventData
{

View File

@ -141,11 +141,9 @@ namespace Popcron
private void OnDisable() => Camera.onPostRender -= OnRendered;
private void Update()
{
private void Update() =>
//always render something
Gizmos.Line(default, default);
}
private void OnRendered(Camera camera)
{

View File

@ -24,7 +24,7 @@ namespace QSB.WorldSync
| BindingFlags.Public
| BindingFlags.NonPublic
| BindingFlags.DeclaredOnly;
private static Dictionary<MonoBehaviour, IWorldObject> WorldObjectsToUnityObjects = new Dictionary<MonoBehaviour, IWorldObject>();
private static readonly Dictionary<MonoBehaviour, IWorldObject> WorldObjectsToUnityObjects = new Dictionary<MonoBehaviour, IWorldObject>();
public static IEnumerable<TWorldObject> GetWorldObjects<TWorldObject>()
=> WorldObjects.OfType<TWorldObject>();