Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -18,6 +18,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using static Robust.Shared.Input.Binding.PointerInputCmdHandler;
using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
namespace Content.Client.Tabletop
@@ -51,7 +52,7 @@ namespace Content.Client.Tabletop
public override void Update(float frameTime)
{
// If there is no player entity, return
if (_playerManager.LocalPlayer is not { ControlledEntity: { (EntityUid) this: var playerEntity } }) return;
if (_playerManager.LocalPlayer is not {ControlledEntity: var playerEntity}) return;
if (StunnedOrNoHands(playerEntity))
{
@@ -153,7 +154,7 @@ namespace Content.Client.Tabletop
_window = null;
}
private bool OnUse(in PointerInputCmdHandler.PointerInputCmdArgs args)
private bool OnUse(in PointerInputCmdArgs args)
{
return args.State switch
{
@@ -163,13 +164,13 @@ namespace Content.Client.Tabletop
};
}
private bool OnMouseDown(in PointerInputCmdHandler.PointerInputCmdArgs args)
private bool OnMouseDown(in PointerInputCmdArgs args)
{
// Return if no player entity
if (_playerManager.LocalPlayer is not { ControlledEntity: { (EntityUid) this : var playerEntityUid } }) return false;
if (_playerManager.LocalPlayer is not { ControlledEntity: var playerEntity}) return false;
// Return if can not see table or stunned/no hands
if (!CanSeeTable(playerEntityUid, _table) || StunnedOrNoHands(playerEntityUid))
if (!CanSeeTable(playerEntity, _table) || StunnedOrNoHands(playerEntity))
{
return false;
}
@@ -198,7 +199,7 @@ namespace Content.Client.Tabletop
return true;
}
private bool OnMouseUp(in PointerInputCmdHandler.PointerInputCmdArgs args)
private bool OnMouseUp(in PointerInputCmdArgs args)
{
StopDragging();
return false;

View File

@@ -2,6 +2,7 @@ using Content.Shared.Tabletop;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
namespace Content.Client.Tabletop.Visualizers
@@ -11,7 +12,8 @@ namespace Content.Client.Tabletop.Visualizers
{
public override void OnChangeData(AppearanceComponent appearance)
{
if (!appearance.Owner.TryGetComponent<ISpriteComponent>(out var sprite))
var entities = IoCManager.Resolve<IEntityManager>();
if (!entities.TryGetComponent<ISpriteComponent>(appearance.Owner, out var sprite))
{
return;
}