Make firelock warning light not require power and add a PointLight (#29024)
* Add a PointLight to firelocks when warnings are active * Remove power requirement for lights
This commit is contained in:
@@ -6,9 +6,9 @@ using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Atmos.Monitor;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Doors.Systems;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Doors.Systems
|
||||
@@ -20,6 +20,7 @@ namespace Content.Server.Doors.Systems
|
||||
[Dependency] private readonly AtmosphereSystem _atmosSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly SharedMapSystem _mapping = default!;
|
||||
[Dependency] private readonly PointLightSystem _pointLight = default!;
|
||||
|
||||
private const int UpdateInterval = 30;
|
||||
private int _accumulatedTicks;
|
||||
@@ -53,6 +54,7 @@ namespace Content.Server.Doors.Systems
|
||||
var airtightQuery = GetEntityQuery<AirtightComponent>();
|
||||
var appearanceQuery = GetEntityQuery<AppearanceComponent>();
|
||||
var xformQuery = GetEntityQuery<TransformComponent>();
|
||||
var pointLightQuery = GetEntityQuery<PointLightComponent>();
|
||||
|
||||
var query = EntityQueryEnumerator<FirelockComponent, DoorComponent>();
|
||||
while (query.MoveNext(out var uid, out var firelock, out var door))
|
||||
@@ -74,6 +76,11 @@ namespace Content.Server.Doors.Systems
|
||||
firelock.Temperature = fire;
|
||||
firelock.Pressure = pressure;
|
||||
Dirty(uid, firelock);
|
||||
|
||||
if (pointLightQuery.TryComp(uid, out var pointLight))
|
||||
{
|
||||
_pointLight.SetEnabled(uid, fire | pressure, pointLight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user