UsedInUnityProjectAttribute

This commit is contained in:
JohnCorby 2022-08-27 11:44:52 -07:00
parent f0d882d16f
commit 673ede6a06
33 changed files with 68 additions and 14 deletions

View File

@ -12,6 +12,7 @@ using UnityEngine;
namespace QSB.Animation.Player; namespace QSB.Animation.Player;
[UsedInUnityProject]
public class AnimationSync : PlayerSyncObject public class AnimationSync : PlayerSyncObject
{ {
private RuntimeAnimatorController _suitedAnimController; private RuntimeAnimatorController _suitedAnimController;

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Animation.Player; namespace QSB.Animation.Player;
[UsedInUnityProject]
public class PlayerHeadRotationSync : MonoBehaviour public class PlayerHeadRotationSync : MonoBehaviour
{ {
private Animator _attachedAnimator; private Animator _attachedAnimator;

View File

@ -1,8 +1,10 @@
using Mirror; using Mirror;
using QSB.Utility;
using QSB.Utility.VariableSync; using QSB.Utility.VariableSync;
namespace QSB.Animation.Player.Thrusters; namespace QSB.Animation.Player.Thrusters;
[UsedInUnityProject]
public class JetpackAccelerationSync : NetworkBehaviour public class JetpackAccelerationSync : NetworkBehaviour
{ {
public Vector3VariableSyncer AccelerationVariableSyncer; public Vector3VariableSyncer AccelerationVariableSyncer;

View File

@ -1,9 +1,11 @@
using QSB.Player; using QSB.Player;
using QSB.Utility;
using QSB.WorldSync; using QSB.WorldSync;
using UnityEngine; using UnityEngine;
namespace QSB.Animation.Player.Thrusters; namespace QSB.Animation.Player.Thrusters;
[UsedInUnityProject]
internal class RemoteThrusterFlameController : MonoBehaviour internal class RemoteThrusterFlameController : MonoBehaviour
{ {
[SerializeField] [SerializeField]

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Animation.Player.Thrusters; namespace QSB.Animation.Player.Thrusters;
[UsedInUnityProject]
internal class RemoteThrusterParticlesBehaviour : MonoBehaviour internal class RemoteThrusterParticlesBehaviour : MonoBehaviour
{ {
[SerializeField] [SerializeField]

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Animation.Player.Thrusters; namespace QSB.Animation.Player.Thrusters;
[UsedInUnityProject]
internal class RemoteThrusterWashController : MonoBehaviour internal class RemoteThrusterWashController : MonoBehaviour
{ {
[SerializeField] [SerializeField]

View File

@ -1,5 +1,8 @@
namespace QSB.Audio; using QSB.Utility;
namespace QSB.Audio;
[UsedInUnityProject]
internal class QSBJetpackThrusterAudio : QSBThrusterAudio internal class QSBJetpackThrusterAudio : QSBThrusterAudio
{ {
public OWAudioSource _underwaterSource; public OWAudioSource _underwaterSource;

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.Audio; namespace QSB.Audio;
[UsedInUnityProject]
public class QSBPlayerAudioController : MonoBehaviour public class QSBPlayerAudioController : MonoBehaviour
{ {
public OWAudioSource _oneShotExternalSource; public OWAudioSource _oneShotExternalSource;

View File

@ -3,6 +3,7 @@ using UnityEngine;
namespace QSB.Player; namespace QSB.Player;
[UsedInUnityProject]
public class PlayerHUDMarker : HUDDistanceMarker public class PlayerHUDMarker : HUDDistanceMarker
{ {
private PlayerInfo _player; private PlayerInfo _player;

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.Player; namespace QSB.Player;
[UsedInUnityProject]
public class PlayerMapMarker : MonoBehaviour public class PlayerMapMarker : MonoBehaviour
{ {
private PlayerInfo _player; private PlayerInfo _player;

View File

@ -7,6 +7,7 @@ using UnityEngine;
namespace QSB.Player; namespace QSB.Player;
[UsedInUnityProject]
public class RemotePlayerFluidDetector : PriorityDetector public class RemotePlayerFluidDetector : PriorityDetector
{ {
private SplashEffect[] _splashEffects; private SplashEffect[] _splashEffects;

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.Player; namespace QSB.Player;
[UsedInUnityProject]
public class RemotePlayerVelocity : MonoBehaviour public class RemotePlayerVelocity : MonoBehaviour
{ {
private Vector3 _prevRelPosition; private Vector3 _prevRelPosition;

View File

@ -12,6 +12,7 @@ using Gizmos = Popcron.Gizmos;
namespace QSB.Player.TransformSync; namespace QSB.Player.TransformSync;
[UsedInUnityProject]
public class PlayerTransformSync : SectoredTransformSync public class PlayerTransformSync : SectoredTransformSync
{ {
protected override bool IsPlayerObject => true; protected override bool IsPlayerObject => true;

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.PlayerBodySetup.Remote; namespace QSB.PlayerBodySetup.Remote;
[UsedInUnityProject]
public class DreamWorldSpawnAnimator : MonoBehaviour public class DreamWorldSpawnAnimator : MonoBehaviour
{ {
[SerializeField] [SerializeField]

View File

@ -1,9 +1,11 @@
using System.Linq; using QSB.Utility;
using System.Linq;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
namespace QSB.PlayerBodySetup.Remote; namespace QSB.PlayerBodySetup.Remote;
[UsedInUnityProject]
public class QSBDitheringAnimator : MonoBehaviour public class QSBDitheringAnimator : MonoBehaviour
{ {
public bool FullyVisible => !enabled && OWMath.ApproxEquals(_visibleFraction, 1); public bool FullyVisible => !enabled && OWMath.ApproxEquals(_visibleFraction, 1);

View File

@ -1,9 +1,11 @@
using QSB.Player; using QSB.Player;
using QSB.Utility;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace QSB.RoastingSync; namespace QSB.RoastingSync;
[UsedInUnityProject]
public class QSBMarshmallow : MonoBehaviour public class QSBMarshmallow : MonoBehaviour
{ {
public const float RAW_TOASTED_FRACTION = 0.2f; public const float RAW_TOASTED_FRACTION = 0.2f;

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Syncs; namespace QSB.Syncs;
[UsedInUnityProject]
public class QSBNetworkTransformChild : QSBNetworkBehaviour public class QSBNetworkTransformChild : QSBNetworkBehaviour
{ {
public Transform Target; public Transform Target;

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.TimeSync; namespace QSB.TimeSync;
[UsedInUnityProject]
public class StopMeditation : MonoBehaviour public class StopMeditation : MonoBehaviour
{ {
public void Init() public void Init()

View File

@ -16,6 +16,7 @@ using UnityEngine;
namespace QSB.TimeSync; namespace QSB.TimeSync;
[UsedInUnityProject]
public class WakeUpSync : NetworkBehaviour public class WakeUpSync : NetworkBehaviour
{ {
public static WakeUpSync LocalInstance { get; private set; } public static WakeUpSync LocalInstance { get; private set; }

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Tools.FlashlightTool; namespace QSB.Tools.FlashlightTool;
[UsedInUnityProject]
public class QSBFlashlight : MonoBehaviour, ILightSource public class QSBFlashlight : MonoBehaviour, ILightSource
{ {
[SerializeField] [SerializeField]

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.Tools.ProbeLauncherTool; namespace QSB.Tools.ProbeLauncherTool;
[UsedInUnityProject]
public class QSBProbeLauncherTool : QSBTool public class QSBProbeLauncherTool : QSBTool
{ {
public GameObject PreLaunchProbeProxy; public GameObject PreLaunchProbeProxy;

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Tools.ProbeTool; namespace QSB.Tools.ProbeTool;
[UsedInUnityProject]
public class QSBProbe : MonoBehaviour, ILightSource public class QSBProbe : MonoBehaviour, ILightSource
{ {
public delegate void SurveyorProbeEvent(); public delegate void SurveyorProbeEvent();

View File

@ -5,6 +5,7 @@ using UnityEngine;
namespace QSB.Tools.ProbeTool; namespace QSB.Tools.ProbeTool;
[UsedInUnityProject]
internal class QSBProbeEffects : MonoBehaviour internal class QSBProbeEffects : MonoBehaviour
{ {
public OWAudioSource _flightLoopAudio; public OWAudioSource _flightLoopAudio;

View File

@ -5,6 +5,7 @@ using UnityEngine;
namespace QSB.Tools.ProbeTool; namespace QSB.Tools.ProbeTool;
[UsedInUnityProject]
internal class QSBProbeLantern : MonoBehaviour internal class QSBProbeLantern : MonoBehaviour
{ {
public float _fadeInDuration; public float _fadeInDuration;

View File

@ -5,6 +5,7 @@ using UnityEngine;
namespace QSB.Tools.ProbeTool; namespace QSB.Tools.ProbeTool;
[UsedInUnityProject]
internal class QSBProbeSpotlight : MonoBehaviour internal class QSBProbeSpotlight : MonoBehaviour
{ {
public ProbeCamera.ID _id; public ProbeCamera.ID _id;

View File

@ -5,6 +5,7 @@ using UnityEngine;
namespace QSB.Tools; namespace QSB.Tools;
[UsedInUnityProject]
public class QSBTool : PlayerTool public class QSBTool : PlayerTool
{ {
public PlayerInfo Player { get; set; } public PlayerInfo Player { get; set; }

View File

@ -1,7 +1,9 @@
using UnityEngine; using QSB.Utility;
using UnityEngine;
namespace QSB.Tools.TranslatorTool; namespace QSB.Tools.TranslatorTool;
[UsedInUnityProject]
public class QSBNomaiTranslator : QSBTool public class QSBNomaiTranslator : QSBTool
{ {
public static float distToClosestTextCenter = 1f; public static float distToClosestTextCenter = 1f;

View File

@ -1,10 +1,12 @@
using System.Collections.Generic; using QSB.Utility;
using System.Collections.Generic;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace QSB.Tools.TranslatorTool; namespace QSB.Tools.TranslatorTool;
[UsedInUnityProject]
internal class QSBNomaiTranslatorProp : MonoBehaviour internal class QSBNomaiTranslatorProp : MonoBehaviour
{ {
private static MaterialPropertyBlock s_matPropBlock; private static MaterialPropertyBlock s_matPropBlock;

View File

@ -1,8 +1,10 @@
using QSB.WorldSync; using QSB.Utility;
using QSB.WorldSync;
using UnityEngine; using UnityEngine;
namespace QSB.Tools.TranslatorTool; namespace QSB.Tools.TranslatorTool;
[UsedInUnityProject]
internal class QSBTranslatorScanBeam : MonoBehaviour internal class QSBTranslatorScanBeam : MonoBehaviour
{ {
public Renderer _projectorRenderer; public Renderer _projectorRenderer;

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace QSB.Utility; namespace QSB.Utility;
[UsedInUnityProject]
internal class CustomRelativisticParticleSystem : MonoBehaviour internal class CustomRelativisticParticleSystem : MonoBehaviour
{ {
private ParticleSystem _particleSystem; private ParticleSystem _particleSystem;

View File

@ -0,0 +1,9 @@
using System;
namespace QSB.Utility;
/// <summary>
/// denotes that the given type is used in the unity project
/// and therefore caution should be used when moving/renaming/deleting
/// </summary>
public class UsedInUnityProjectAttribute : Attribute { }

View File

@ -1,5 +1,4 @@
namespace QSB.Utility.VariableSync; namespace QSB.Utility.VariableSync;
public class BoolVariableSyncer : BaseVariableSyncer<bool> [UsedInUnityProject]
{ public class BoolVariableSyncer : BaseVariableSyncer<bool> { }
}

View File

@ -2,6 +2,7 @@
namespace QSB.Utility.VariableSync; namespace QSB.Utility.VariableSync;
[UsedInUnityProject]
public class Vector3VariableSyncer : BaseVariableSyncer<Vector3> public class Vector3VariableSyncer : BaseVariableSyncer<Vector3>
{ {
/// <summary> /// <summary>