Fix a few warnings (#11576)

This commit is contained in:
metalgearsloth
2022-10-04 14:24:19 +11:00
committed by GitHub
parent a6d20803a6
commit 600c0e3255
43 changed files with 185 additions and 167 deletions

View File

@@ -23,15 +23,16 @@ namespace Content.Shared.Blocking;
public sealed class BlockingSystem : EntitySystem
{
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
public override void Initialize()
{
@@ -231,7 +232,7 @@ public sealed class BlockingSystem : EntitySystem
_actionsSystem.SetToggled(component.BlockingToggleAction, false);
_fixtureSystem.DestroyFixture(physicsComponent, BlockingComponent.BlockFixtureID);
physicsComponent.BodyType = blockingUserComponent.OriginalBodyType;
_physics.SetBodyType(physicsComponent, blockingUserComponent.OriginalBodyType);
_popupSystem.PopupEntity(msgUser, user, Filter.Entities(user));
_popupSystem.PopupEntity(msgOther, user, Filter.Pvs(user).RemoveWhereAttachedEntity(e => e == user));
}

View File

@@ -13,6 +13,7 @@ public sealed class BlockingUserSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly BlockingSystem _blockingSystem = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
public override void Initialize()
{
@@ -71,7 +72,7 @@ public sealed class BlockingUserSystem : EntitySystem
if (_proto.TryIndex(blockingComponent.ActiveBlockDamageModifier, out DamageModifierSetPrototype? activeBlockModifier) && blockingComponent.IsBlocking)
{
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage, activeBlockModifier);
SoundSystem.Play(blockingComponent.BlockSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner, AudioHelpers.WithVariation(0.2f));
_audio.PlayPvs(blockingComponent.BlockSound, component.Owner, AudioParams.Default.WithVariation(0.2f));
}
}
}