Fixes crates phasing through firelocks. (#12329)

This commit is contained in:
keronshb
2022-11-03 21:18:59 -04:00
committed by GitHub
parent 4720201607
commit 9fe53959ec
2 changed files with 5 additions and 9 deletions

View File

@@ -7,11 +7,8 @@ using Content.Server.Power.EntitySystems;
using Content.Server.Recycling; using Content.Server.Recycling;
using Content.Server.Recycling.Components; using Content.Server.Recycling.Components;
using Content.Shared.Conveyor; using Content.Shared.Conveyor;
using Content.Shared.Item;
using Content.Shared.Maps; using Content.Shared.Maps;
using Content.Shared.Movement.Components;
using Content.Shared.Physics; using Content.Shared.Physics;
using Robust.Shared.Containers;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Physics; using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes; using Robust.Shared.Physics.Collision.Shapes;
@@ -32,6 +29,7 @@ namespace Content.Server.Physics.Controllers
[Dependency] private readonly RecyclerSystem _recycler = default!; [Dependency] private readonly RecyclerSystem _recycler = default!;
[Dependency] private readonly SignalLinkerSystem _signalSystem = default!; [Dependency] private readonly SignalLinkerSystem _signalSystem = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public const string ConveyorFixture = "conveyor"; public const string ConveyorFixture = "conveyor";
@@ -94,9 +92,8 @@ namespace Content.Server.Physics.Controllers
private void UpdateAppearance(ConveyorComponent component) private void UpdateAppearance(ConveyorComponent component)
{ {
if (!EntityManager.TryGetComponent<AppearanceComponent?>(component.Owner, out var appearance)) return;
var isPowered = this.IsPowered(component.Owner, EntityManager); var isPowered = this.IsPowered(component.Owner, EntityManager);
appearance.SetData(ConveyorVisuals.State, isPowered ? component.State : ConveyorState.Off); _appearance.SetData(component.Owner, ConveyorVisuals.State, isPowered ? component.State : ConveyorState.Off);
} }
private void OnSignalReceived(EntityUid uid, ConveyorComponent component, SignalReceivedEvent args) private void OnSignalReceived(EntityUid uid, ConveyorComponent component, SignalReceivedEvent args)
@@ -154,9 +151,7 @@ namespace Content.Server.Physics.Controllers
continue; continue;
if (physics.BodyType != BodyType.Static) if (physics.BodyType != BodyType.Static)
{
_physics.WakeBody(physics); _physics.WakeBody(physics);
}
} }
} }
} }

View File

@@ -49,8 +49,9 @@
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close
density: 100
mask: mask:
- TabletopMachineMask - FullTileMask
layer: layer:
- AirlockLayer - AirlockLayer
- type: Door - type: Door
@@ -118,7 +119,7 @@
- type: ContainerFill - type: ContainerFill
containers: containers:
board: [ FirelockElectronics ] board: [ FirelockElectronics ]
- type: entity - type: entity
id: FirelockGlass id: FirelockGlass
parent: Firelock parent: Firelock