Improves AirtightComponent.
- Atmos now nulls air in fully airblocked tiles ONLY if one of the airtight entities in it has NoAirWhenFullyAirBlocked to true. - Fixes edge firelocks atmos airtight direction - Fixes atmos debug overlay not accounting for angle 0 being south.
This commit is contained in:
@@ -39,6 +39,10 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
[DataField("fixAirBlockedDirectionInitialize")]
|
||||
private bool _fixAirBlockedDirectionInitialize = true;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("noAirWhenFullyAirBlocked")]
|
||||
public bool NoAirWhenFullyAirBlocked { get; } = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool AirBlocked
|
||||
{
|
||||
@@ -78,7 +82,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
Owner.EnsureComponentWarn(out SnapGridComponent _);
|
||||
|
||||
if (_fixAirBlockedDirectionInitialize)
|
||||
RotateEvent(new RotateEvent(Owner, Angle.Zero, Owner.Transform.LocalRotation));
|
||||
RotateEvent(new RotateEvent(Owner, Angle.Zero, Owner.Transform.WorldRotation));
|
||||
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
@@ -288,7 +288,19 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
} else if (isAirBlocked)
|
||||
{
|
||||
tile.Air = null;
|
||||
var nullAir = false;
|
||||
|
||||
foreach (var airtight in GetObstructingComponents(indices))
|
||||
{
|
||||
if (airtight.NoAirWhenFullyAirBlocked)
|
||||
{
|
||||
nullAir = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(nullAir)
|
||||
tile.Air = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user