Handheld Crew Monitor and Station Map use power (#15983)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server.PowerCell;
|
||||
using Content.Shared.Pinpointer;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
@@ -6,6 +7,7 @@ namespace Content.Server.Pinpointer;
|
||||
public sealed class StationMapSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly PowerCellSystem _cell = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -36,6 +38,9 @@ public sealed class StationMapSystem : EntitySystem
|
||||
if (args.Session.AttachedEntity == null)
|
||||
return;
|
||||
|
||||
if (!_cell.TryUseActivatableCharge(uid))
|
||||
return;
|
||||
|
||||
var comp = EnsureComp<StationMapUserComponent>(args.Session.AttachedEntity.Value);
|
||||
comp.Map = uid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user