remove logs

This commit is contained in:
Mister_Nebula 2021-07-04 19:10:50 +01:00
parent bb2ee5a627
commit 642aad795a
7 changed files with 25 additions and 62 deletions

View File

@ -33,8 +33,6 @@ namespace QSB.ProbeSync.Events
public override void OnReceiveRemote(bool server, EnumMessage<ProbeEvent> message)
{
DebugLog.DebugWrite($"recieve probe event type:{message.EnumValue} from:{message.AboutId}");
var player = QSBPlayerManager.GetPlayer(message.AboutId);
var probe = player.Probe;

View File

@ -35,38 +35,23 @@ namespace QSB.ProbeSync
}
private void OnLaunchProbe()
{
DebugLog.DebugWrite($"LOCAL OnLaunchProbe");
QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Launch);
}
=> QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Launch);
private void OnAnchorProbe()
{
DebugLog.DebugWrite($"LOCAL OnAnchorProbe");
QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Anchor);
}
=> QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Anchor);
private void OnUnanchorProbe()
{
DebugLog.DebugWrite($"LOCAL OnUnanchorProbe");
QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Unanchor);
}
=> QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Unanchor);
private void OnRetrieveProbe()
{
DebugLog.DebugWrite($"LOCAL OnRetrieveProbe");
QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Retrieve);
}
=> QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Retrieve);
private void OnProbeDestroyed()
{
DebugLog.DebugWrite($"LOCAL OnProbeDestroyed");
QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Destroy);
}
=> QSBEventManager.FireEvent(EventNames.QSBProbeEvent, ProbeEvent.Destroy);
private void OnStartRetrieveProbe(float length)
{
DebugLog.DebugWrite($"LOCAL OnStartRetrieveProbe length:{length}");
}
}
}

View File

@ -38,7 +38,6 @@ namespace QSB.ProbeSync
break;
}
DebugLog.DebugWrite($"OnLaunchProbe");
OnLaunchProbe();
break;
case ProbeEvent.Anchor:
@ -48,7 +47,6 @@ namespace QSB.ProbeSync
break;
}
DebugLog.DebugWrite($"OnAnchorProbe");
OnAnchorProbe();
break;
case ProbeEvent.Unanchor:
@ -62,11 +60,15 @@ namespace QSB.ProbeSync
break;
}
DebugLog.DebugWrite($"OnRetrieveProbe");
OnRetrieveProbe();
break;
case ProbeEvent.Destroy:
DebugLog.DebugWrite($"OnDestroyProbe");
if (OnProbeDestroyed == null)
{
DebugLog.ToConsole($"Warning - OnProbeDestroyed is null!", OWML.Common.MessageType.Warning);
break;
}
OnProbeDestroyed();
break;
case ProbeEvent.Invalid:

View File

@ -15,7 +15,6 @@ namespace QSB.ProbeSync
private void Awake()
{
DebugLog.DebugWrite("Awake");
_probe = Resources.FindObjectsOfTypeAll<QSBProbe>().First(x => gameObject.transform.IsChildOf(x.transform));
if (_probe == null)
{
@ -36,10 +35,7 @@ namespace QSB.ProbeSync
_probe.OnStartRetrieveProbe -= OnStartRetrieve;
}
private void OnLaunch()
{
_flightLoopAudio.FadeIn(0.1f, true, true, 1f);
}
private void OnLaunch() => _flightLoopAudio.FadeIn(0.1f, true, true, 1f);
private void OnAnchor()
{
@ -58,13 +54,9 @@ namespace QSB.ProbeSync
}
private void OnUnanchor()
{
_flightLoopAudio.FadeIn(0.5f, false, false, 1f);
}
=> _flightLoopAudio.FadeIn(0.5f, false, false, 1f);
private void OnStartRetrieve(float retrieveLength)
{
_flightLoopAudio.FadeOut(retrieveLength, OWAudioSource.FadeOutCompleteAction.STOP, 0f);
}
=> _flightLoopAudio.FadeOut(retrieveLength, OWAudioSource.FadeOutCompleteAction.STOP, 0f);
}
}

View File

@ -22,7 +22,6 @@ namespace QSB.ProbeSync
private void Awake()
{
DebugLog.DebugWrite($"Awake");
_probe = Resources.FindObjectsOfTypeAll<QSBProbe>().First(x => gameObject.transform.IsChildOf(x.transform));
if (_probe == null)
{
@ -37,7 +36,6 @@ namespace QSB.ProbeSync
private void Start()
{
DebugLog.DebugWrite($"Start");
if (_emissiveRenderer != null)
{
_emissiveRenderer.SetEmissiveScale(0f);
@ -50,7 +48,6 @@ namespace QSB.ProbeSync
private void OnDestroy()
{
DebugLog.DebugWrite($"OnDestroy");
_probe.OnAnchorProbe -= OnProbeAnchorToSurface;
_probe.OnStartRetrieveProbe -= OnStartRetrieveProbe;
_probe.OnRetrieveProbe -= OnFinishRetrieveProbe;
@ -86,7 +83,6 @@ namespace QSB.ProbeSync
private void FadeTo(float fade, float duration)
{
DebugLog.DebugWrite($"Fade to {fade} in {duration}");
_startFadeTime = Time.time;
_fadeDuration = duration;
_startFade = _fadeFraction;
@ -96,7 +92,7 @@ namespace QSB.ProbeSync
private void OnProbeAnchorToSurface()
{
DebugLog.DebugWrite($"OnProbeAnchorToSurface");
//TODO : look at this
//if (!_probe.IsRetrieving())
//{
_light.GetLight().enabled = true;
@ -106,14 +102,10 @@ namespace QSB.ProbeSync
}
private void OnStartRetrieveProbe(float retrieveLength)
{
DebugLog.DebugWrite($"OnStartRetrieveProbe");
FadeTo(0f, retrieveLength);
}
=> FadeTo(0f, retrieveLength);
private void OnFinishRetrieveProbe()
{
DebugLog.DebugWrite($"OnFinishRetrieveProbe");
_light.GetLight().enabled = false;
_light.range = 0f;
_fadeFraction = 0f;

View File

@ -17,7 +17,6 @@ namespace QSB.ProbeSync
private void Awake()
{
DebugLog.DebugWrite("Awake");
_probe = Resources.FindObjectsOfTypeAll<QSBProbe>().First(x => gameObject.transform.IsChildOf(x.transform));
if (_probe == null)
{
@ -35,7 +34,6 @@ namespace QSB.ProbeSync
private void OnDestroy()
{
DebugLog.DebugWrite("OnDestroy");
_probe.OnLaunchProbe -= OnLaunch;
_probe.OnAnchorProbe -= OnAnchorOrRetrieve;
_probe.OnRetrieveProbe -= OnAnchorOrRetrieve;
@ -51,7 +49,6 @@ namespace QSB.ProbeSync
private void StartFadeIn()
{
DebugLog.DebugWrite("StartFadeIn");
if (!enabled)
{
_light.GetLight().enabled = true;
@ -63,7 +60,6 @@ namespace QSB.ProbeSync
private void OnLaunch()
{
DebugLog.DebugWrite("OnLaunch");
if (_id == ProbeCamera.ID.Forward)
{
StartFadeIn();
@ -74,7 +70,6 @@ namespace QSB.ProbeSync
private void OnAnchorOrRetrieve()
{
DebugLog.DebugWrite("OnAnchorOrRetrieve");
_light.GetLight().enabled = false;
enabled = false;
_inFlight = false;

View File

@ -42,7 +42,6 @@ namespace QSB.Tools
public static void CreateProbe(Transform newProbe, PlayerInfo player)
{
DebugLog.DebugWrite($"Added QSBProbe");
var qsbProbe = newProbe.gameObject.AddComponent<QSBProbe>();
player.Probe = qsbProbe;