Adds edge firelocks

This commit is contained in:
Víctor Aguilera Puerto
2020-09-08 15:20:58 +02:00
parent 95ba81fa32
commit 511147f299
24 changed files with 467 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ namespace Content.Server.GameObjects.Components.Atmos
Owner.EntityManager.EventBus.SubscribeEvent<RotateEvent>(EventSource.Local, this, RotateEvent);
if(_fixAirBlockedDirectionInitialize)
RotateEvent(new RotateEvent(Owner, Angle.Zero, Owner.Transform.LocalRotation));
RotateEvent(new RotateEvent(Owner, Angle.South, Owner.Transform.LocalRotation));
UpdatePosition();
}

View File

@@ -84,6 +84,7 @@ namespace Content.Server.GameObjects.Components.Doors
private bool _isWeldedShut;
private bool _canWeldShut = true;
private bool _canCrush = true;
public override void ExposeData(ObjectSerializer serializer)
{
@@ -91,6 +92,7 @@ namespace Content.Server.GameObjects.Components.Doors
serializer.DataField(ref _occludes, "occludes", true);
serializer.DataField(ref _isWeldedShut, "welded", false);
serializer.DataField(ref _canCrush, "canCrush", true);
}
public override void OnRemove()
@@ -367,7 +369,7 @@ namespace Content.Server.GameObjects.Components.Doors
{
bool shouldCheckCrush = false;
if (Owner.TryGetComponent(out ICollidableComponent? collidable) && collidable.IsColliding(Vector2.Zero, false))
if (_canCrush && Owner.TryGetComponent(out ICollidableComponent? collidable) && collidable.IsColliding(Vector2.Zero, false))
{
if (Safety)
return false;
@@ -386,7 +388,7 @@ namespace Content.Server.GameObjects.Components.Doors
Timer.Spawn(CloseTimeOne, async () =>
{
if (shouldCheckCrush)
if (shouldCheckCrush && _canCrush)
{
CheckCrush();
}