Add pressure and temperature warning text to firelocks (#28341)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Prying.Components;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -26,6 +27,8 @@ public abstract class SharedFirelockSystem : EntitySystem
|
||||
// Visuals
|
||||
SubscribeLocalEvent<FirelockComponent, MapInitEvent>(UpdateVisuals);
|
||||
SubscribeLocalEvent<FirelockComponent, ComponentStartup>(UpdateVisuals);
|
||||
|
||||
SubscribeLocalEvent<FirelockComponent, ExaminedEvent>(OnExamined);
|
||||
}
|
||||
|
||||
public bool EmergencyPressureStop(EntityUid uid, FirelockComponent? firelock = null, DoorComponent? door = null)
|
||||
@@ -107,4 +110,15 @@ public abstract class SharedFirelockSystem : EntitySystem
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void OnExamined(Entity<FirelockComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
using (args.PushGroup(nameof(FirelockComponent)))
|
||||
{
|
||||
if (ent.Comp.Pressure)
|
||||
args.PushMarkup(Loc.GetString("firelock-component-examine-pressure-warning"));
|
||||
if (ent.Comp.Temperature)
|
||||
args.PushMarkup(Loc.GetString("firelock-component-examine-temperature-warning"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user