Fix even more warnings (#11968)
Also more instances of someone using TryComp instead of HasComp Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Content.Shared.Singularity
|
||||
public abstract class SharedSingularitySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly FixtureSystem _fixtures = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
|
||||
public const string DeleteFixture = "DeleteCircle";
|
||||
|
||||
@@ -102,7 +104,7 @@ namespace Content.Shared.Singularity
|
||||
// Prevents it getting stuck (see SingularityController.MoveSingulo)
|
||||
if (physics != null)
|
||||
{
|
||||
physics.LinearVelocity = Vector2.Zero;
|
||||
_physics.SetLinearVelocity(physics, Vector2.Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,10 +115,7 @@ namespace Content.Shared.Singularity
|
||||
source.Intensity = singularity.RadsPerLevel * value;
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(singularity.Owner, out AppearanceComponent? appearance))
|
||||
{
|
||||
appearance.SetData(SingularityVisuals.Level, value);
|
||||
}
|
||||
_appearance.SetData(singularity.Owner, SingularityVisuals.Level, value);
|
||||
|
||||
if (physics != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user