Docked airlocks no longer depressurize the room when opened. (#5431)
This commit is contained in:
committed by
GitHub
parent
af6e09c5bd
commit
2f6e069bcd
@@ -55,6 +55,9 @@ namespace Content.Server.Doors.Components
|
|||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public DamageSpecifier CrushDamage = default!;
|
public DamageSpecifier CrushDamage = default!;
|
||||||
|
|
||||||
|
[DataField("changeAirtight")]
|
||||||
|
public bool ChangeAirtight = true;
|
||||||
|
|
||||||
public override DoorState State
|
public override DoorState State
|
||||||
{
|
{
|
||||||
get => base.State;
|
get => base.State;
|
||||||
@@ -366,7 +369,7 @@ namespace Content.Server.Doors.Components
|
|||||||
occluder.Enabled = false;
|
occluder.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out AirtightComponent? airtight))
|
if (ChangeAirtight && Owner.TryGetComponent(out AirtightComponent? airtight))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
|
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
|
||||||
}
|
}
|
||||||
@@ -394,7 +397,7 @@ namespace Content.Server.Doors.Components
|
|||||||
{
|
{
|
||||||
base.OnPartialOpen();
|
base.OnPartialOpen();
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out AirtightComponent? airtight))
|
if (ChangeAirtight && Owner.TryGetComponent(out AirtightComponent? airtight))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
|
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
|
||||||
}
|
}
|
||||||
@@ -537,7 +540,7 @@ namespace Content.Server.Doors.Components
|
|||||||
base.OnPartialClose();
|
base.OnPartialClose();
|
||||||
|
|
||||||
// if safety is off, crushes people inside of the door, temporarily turning off collisions with them while doing so.
|
// 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))
|
if (becomeairtight && Owner.TryGetComponent(out AirtightComponent? airtight))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Content.Server.Atmos.Components;
|
||||||
|
using Content.Server.Atmos.EntitySystems;
|
||||||
using Content.Server.Doors.Components;
|
using Content.Server.Doors.Components;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.Shuttles.Components;
|
using Content.Server.Shuttles.Components;
|
||||||
@@ -21,6 +23,7 @@ namespace Content.Server.Shuttles.EntitySystems
|
|||||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
[Dependency] private readonly SharedBroadphaseSystem _broadphaseSystem = default!;
|
[Dependency] private readonly SharedBroadphaseSystem _broadphaseSystem = default!;
|
||||||
[Dependency] private readonly SharedJointSystem _jointSystem = default!;
|
[Dependency] private readonly SharedJointSystem _jointSystem = default!;
|
||||||
|
[Dependency] private readonly AirtightSystem _airtightSystem = default!;
|
||||||
|
|
||||||
private const string DockingFixture = "docking";
|
private const string DockingFixture = "docking";
|
||||||
private const string DockingJoint = "docking";
|
private const string DockingJoint = "docking";
|
||||||
@@ -346,11 +349,13 @@ namespace Content.Server.Shuttles.EntitySystems
|
|||||||
|
|
||||||
if (EntityManager.TryGetComponent(dockA.OwnerUid, out ServerDoorComponent? doorA))
|
if (EntityManager.TryGetComponent(dockA.OwnerUid, out ServerDoorComponent? doorA))
|
||||||
{
|
{
|
||||||
|
doorA.ChangeAirtight = false;
|
||||||
doorA.Open();
|
doorA.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EntityManager.TryGetComponent(dockB.OwnerUid, out ServerDoorComponent? doorB))
|
if (EntityManager.TryGetComponent(dockB.OwnerUid, out ServerDoorComponent? doorB))
|
||||||
{
|
{
|
||||||
|
doorB.ChangeAirtight = false;
|
||||||
doorB.Open();
|
doorB.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,11 +430,13 @@ namespace Content.Server.Shuttles.EntitySystems
|
|||||||
|
|
||||||
if (EntityManager.TryGetComponent(dock.OwnerUid, out ServerDoorComponent? doorA))
|
if (EntityManager.TryGetComponent(dock.OwnerUid, out ServerDoorComponent? doorA))
|
||||||
{
|
{
|
||||||
|
doorA.ChangeAirtight = true;
|
||||||
doorA.Close();
|
doorA.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EntityManager.TryGetComponent(dock.DockedWith.OwnerUid, out ServerDoorComponent? doorB))
|
if (EntityManager.TryGetComponent(dock.DockedWith.OwnerUid, out ServerDoorComponent? doorB))
|
||||||
{
|
{
|
||||||
|
doorB.ChangeAirtight = true;
|
||||||
doorB.Close();
|
doorB.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@
|
|||||||
# type: WiresBoundUserInterface
|
# type: WiresBoundUserInterface
|
||||||
- type: Airtight
|
- type: Airtight
|
||||||
fixVacuum: true
|
fixVacuum: true
|
||||||
|
airBlockedDirection:
|
||||||
|
- South
|
||||||
- type: Occluder
|
- type: Occluder
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
damageContainer: Inorganic
|
damageContainer: Inorganic
|
||||||
|
|||||||
Reference in New Issue
Block a user