Glass airlocks actually let light through.
This commit is contained in:
@@ -8,7 +8,9 @@ using Robust.Shared.GameObjects.Components;
|
|||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.Interfaces.Network;
|
using Robust.Shared.Interfaces.Network;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Timers;
|
using Robust.Shared.Timers;
|
||||||
|
using Robust.Shared.ViewVariables;
|
||||||
using CancellationTokenSource = System.Threading.CancellationTokenSource;
|
using CancellationTokenSource = System.Threading.CancellationTokenSource;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects
|
namespace Content.Server.GameObjects
|
||||||
@@ -38,6 +40,16 @@ namespace Content.Server.GameObjects
|
|||||||
private static readonly TimeSpan OpenTimeTwo = TimeSpan.FromSeconds(0.9f);
|
private static readonly TimeSpan OpenTimeTwo = TimeSpan.FromSeconds(0.9f);
|
||||||
private static readonly TimeSpan DenyTime = TimeSpan.FromSeconds(0.45f);
|
private static readonly TimeSpan DenyTime = TimeSpan.FromSeconds(0.45f);
|
||||||
|
|
||||||
|
[ViewVariables]
|
||||||
|
private bool _occludes;
|
||||||
|
|
||||||
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
|
{
|
||||||
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref _occludes, "occludes", true);
|
||||||
|
}
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -136,7 +148,7 @@ namespace Content.Server.GameObjects
|
|||||||
|
|
||||||
State = DoorState.Opening;
|
State = DoorState.Opening;
|
||||||
SetAppearance(DoorVisualState.Opening);
|
SetAppearance(DoorVisualState.Opening);
|
||||||
if (Owner.TryGetComponent(out OccluderComponent occluder))
|
if (_occludes && Owner.TryGetComponent(out OccluderComponent occluder))
|
||||||
{
|
{
|
||||||
occluder.Enabled = false;
|
occluder.Enabled = false;
|
||||||
}
|
}
|
||||||
@@ -194,7 +206,7 @@ namespace Content.Server.GameObjects
|
|||||||
{
|
{
|
||||||
State = DoorState.Closed;
|
State = DoorState.Closed;
|
||||||
SetAppearance(DoorVisualState.Closed);
|
SetAppearance(DoorVisualState.Closed);
|
||||||
if (Owner.TryGetComponent(out OccluderComponent occluder))
|
if (_occludes && Owner.TryGetComponent(out OccluderComponent occluder))
|
||||||
{
|
{
|
||||||
occluder.Enabled = true;
|
occluder.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,3 +50,13 @@
|
|||||||
|
|
||||||
placement:
|
placement:
|
||||||
mode: SnapgridCenter
|
mode: SnapgridCenter
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: airlock_glass
|
||||||
|
parent: airlock
|
||||||
|
components:
|
||||||
|
- type: Airlock
|
||||||
|
occludes: false
|
||||||
|
|
||||||
|
- type: Occluder
|
||||||
|
enabled: false
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
sprite: Buildings/airlock_medical.rsi
|
sprite: Buildings/airlock_medical.rsi
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: airlock
|
parent: airlock_glass
|
||||||
id: airlock_medical_glass
|
id: airlock_medical_glass
|
||||||
name: Glass Medical Airlock
|
name: Glass Medical Airlock
|
||||||
components:
|
components:
|
||||||
@@ -59,6 +59,7 @@
|
|||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Buildings/airlock_medical_glass.rsi
|
sprite: Buildings/airlock_medical_glass.rsi
|
||||||
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: airlock
|
parent: airlock
|
||||||
id: airlock_science
|
id: airlock_science
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
sprite: Buildings/airlock_science.rsi
|
sprite: Buildings/airlock_science.rsi
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: airlock
|
parent: airlock_glass
|
||||||
id: airlock_science_glass
|
id: airlock_science_glass
|
||||||
name: Glass Science Airlock
|
name: Glass Science Airlock
|
||||||
components:
|
components:
|
||||||
|
|||||||
Reference in New Issue
Block a user