Docked airlocks no longer depressurize the room when opened. (#5431)

This commit is contained in:
Vera Aguilera Puerto
2021-11-21 13:17:30 +01:00
committed by GitHub
parent af6e09c5bd
commit 2f6e069bcd
3 changed files with 15 additions and 3 deletions

View File

@@ -55,6 +55,9 @@ namespace Content.Server.Doors.Components
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier CrushDamage = default!;
[DataField("changeAirtight")]
public bool ChangeAirtight = true;
public override DoorState State
{
get => base.State;
@@ -366,7 +369,7 @@ namespace Content.Server.Doors.Components
occluder.Enabled = false;
}
if (Owner.TryGetComponent(out AirtightComponent? airtight))
if (ChangeAirtight && Owner.TryGetComponent(out AirtightComponent? airtight))
{
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
}
@@ -394,7 +397,7 @@ namespace Content.Server.Doors.Components
{
base.OnPartialOpen();
if (Owner.TryGetComponent(out AirtightComponent? airtight))
if (ChangeAirtight && Owner.TryGetComponent(out AirtightComponent? airtight))
{
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
}
@@ -537,7 +540,7 @@ namespace Content.Server.Doors.Components
base.OnPartialClose();
// if safety is off, crushes people inside of the door, temporarily turning off collisions with them while doing so.
var becomeairtight = SafetyCheck() || !TryCrush();
var becomeairtight = ChangeAirtight && (SafetyCheck() || !TryCrush());
if (becomeairtight && Owner.TryGetComponent(out AirtightComponent? airtight))
{

View File

@@ -1,3 +1,5 @@
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Doors.Components;
using Content.Server.Power.Components;
using Content.Server.Shuttles.Components;
@@ -21,6 +23,7 @@ namespace Content.Server.Shuttles.EntitySystems
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly SharedBroadphaseSystem _broadphaseSystem = default!;
[Dependency] private readonly SharedJointSystem _jointSystem = default!;
[Dependency] private readonly AirtightSystem _airtightSystem = default!;
private const string DockingFixture = "docking";
private const string DockingJoint = "docking";
@@ -346,11 +349,13 @@ namespace Content.Server.Shuttles.EntitySystems
if (EntityManager.TryGetComponent(dockA.OwnerUid, out ServerDoorComponent? doorA))
{
doorA.ChangeAirtight = false;
doorA.Open();
}
if (EntityManager.TryGetComponent(dockB.OwnerUid, out ServerDoorComponent? doorB))
{
doorB.ChangeAirtight = false;
doorB.Open();
}
@@ -425,11 +430,13 @@ namespace Content.Server.Shuttles.EntitySystems
if (EntityManager.TryGetComponent(dock.OwnerUid, out ServerDoorComponent? doorA))
{
doorA.ChangeAirtight = true;
doorA.Close();
}
if (EntityManager.TryGetComponent(dock.DockedWith.OwnerUid, out ServerDoorComponent? doorB))
{
doorB.ChangeAirtight = true;
doorB.Close();
}

View File

@@ -67,6 +67,8 @@
# type: WiresBoundUserInterface
- type: Airtight
fixVacuum: true
airBlockedDirection:
- South
- type: Occluder
- type: Damageable
damageContainer: Inorganic