baba booey

This commit is contained in:
JohnCorby 2021-12-26 20:12:50 -08:00
parent 108fe3da04
commit c7fc392be3
3 changed files with 10 additions and 11 deletions

View File

@ -41,8 +41,8 @@ namespace QSB.Messaging
/// checked before calling either OnReceive
/// </summary>
public virtual bool ShouldReceive => true;
public virtual void OnReceiveRemote() { }
public virtual void OnReceiveLocal() { }
public virtual void OnReceiveRemote() { }
public override string ToString() => GetType().Name;
}

View File

@ -6,10 +6,10 @@ namespace QSB.Tools.ProbeTool.Messages
{
internal class ProbeStartRetrieveMessage : QSBFloatMessage
{
public override bool ShouldReceive => WorldObjectManager.AllObjectsReady;
public ProbeStartRetrieveMessage(float duration) => Value = duration;
public override bool ShouldReceive => WorldObjectManager.AllObjectsReady;
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);

View File

@ -72,9 +72,9 @@ namespace QSB.Tools.TranslatorTool
{
tooCloseToTarget = num < _currentNomaiText.GetMinimumReadableDistance();
if (_currentNomaiText is NomaiWallText)
if (_currentNomaiText is NomaiWallText nomaiWallText)
{
var nomaiTextLine = (_currentNomaiText as NomaiWallText).GetClosestTextLineByCenter(raycastHit.point);
var nomaiTextLine = nomaiWallText.GetClosestTextLineByCenter(raycastHit.point);
if (_lastLineLocked)
{
var distToCenter = _lastHighlightedTextLine.GetDistToCenter(raycastHit.point);
@ -119,27 +119,26 @@ namespace QSB.Tools.TranslatorTool
_lastLineLocked = false;
}
}
else if (_currentNomaiText is NomaiComputer)
else if (_currentNomaiText is NomaiComputer nomaiComputer)
{
var closestRing = (_currentNomaiText as NomaiComputer).GetClosestRing(raycastHit.point, out var num2);
var closestRing = nomaiComputer.GetClosestRing(raycastHit.point, out var num2);
if (closestRing)
{
distToClosestTextCenter = Mathf.Min(num2 * 2f, 1f);
_translatorProp.SetNomaiComputerRing(closestRing);
}
}
else if (_currentNomaiText is NomaiVesselComputer)
else if (_currentNomaiText is NomaiVesselComputer nomaiVesselComputer)
{
var closestRing2 = (_currentNomaiText as NomaiVesselComputer).GetClosestRing(raycastHit.point, out var num3);
var closestRing2 = nomaiVesselComputer.GetClosestRing(raycastHit.point, out var num3);
if (closestRing2)
{
distToClosestTextCenter = Mathf.Min(num3 * 2f, 1f);
_translatorProp.SetNomaiVesselComputerRing(closestRing2);
}
}
else if (_currentNomaiText is GhostWallText)
else if (_currentNomaiText is GhostWallText ghostWallText)
{
var ghostWallText = _currentNomaiText as GhostWallText;
_translatorProp.SetNomaiTextLine(ghostWallText.GetTextLine());
}
}