Fixing some warnings (#6250)
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
This commit is contained in:
@@ -167,7 +167,7 @@ namespace Content.Server.Atmos.Components
|
||||
if (!_entities.TryGetComponent(playerEntity, out HandsComponent? handsComponent))
|
||||
return;
|
||||
|
||||
if (handsComponent?.GetActiveHand?.Owner is not {Valid: true} activeHandEntity ||
|
||||
if (handsComponent?.GetActiveHandItem?.Owner is not {Valid: true} activeHandEntity ||
|
||||
!_entities.TryGetComponent(activeHandEntity, out GasAnalyzerComponent? gasAnalyzer))
|
||||
{
|
||||
return;
|
||||
@@ -234,7 +234,7 @@ namespace Content.Server.Atmos.Components
|
||||
return;
|
||||
}
|
||||
|
||||
if (handsComponent.GetActiveHand?.Owner is not {Valid: true} activeHandEntity ||
|
||||
if (handsComponent.GetActiveHandItem?.Owner is not {Valid: true} activeHandEntity ||
|
||||
!_entities.TryGetComponent(activeHandEntity, out GasAnalyzerComponent? gasAnalyzer))
|
||||
{
|
||||
serverMsg.Session.AttachedEntity.Value.PopupMessage(Loc.GetString("gas-analyzer-component-need-gas-analyzer-in-hand-message"));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.MobState.Components;
|
||||
@@ -45,6 +45,8 @@ namespace Content.Server.Atmos.Components
|
||||
{
|
||||
if (!_entMan.TryGetComponent(Owner, out PhysicsComponent? physics))
|
||||
return;
|
||||
if (!_entMan.TryGetComponent(Owner, out FixturesComponent? fixtureComponent))
|
||||
return;
|
||||
|
||||
// TODO ATMOS stuns?
|
||||
|
||||
@@ -65,8 +67,7 @@ namespace Content.Server.Atmos.Components
|
||||
if (_entMan.HasComponent<MobStateComponent>(physics.Owner))
|
||||
{
|
||||
physics.BodyStatus = BodyStatus.InAir;
|
||||
|
||||
foreach (var fixture in physics.Fixtures)
|
||||
foreach (var fixture in fixtureComponent.Fixtures.Values)
|
||||
{
|
||||
fixture.CollisionMask &= ~(int) CollisionGroup.VaultImpassable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user