@@ -9,6 +9,7 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Research
|
||||
{
|
||||
@@ -65,11 +66,11 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks>If no <see cref="PowerDeviceComponent"/> is found, it's assumed power is not required.</remarks>
|
||||
/// <remarks>If no <see cref="PowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
|
||||
[ViewVariables]
|
||||
public bool CanRun => _powerDevice is null || _powerDevice.Powered;
|
||||
public bool CanRun => _powerReceiver is null || _powerReceiver.Powered;
|
||||
|
||||
private PowerDeviceComponent _powerDevice;
|
||||
private PowerReceiverComponent _powerReceiver;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -77,7 +78,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
Id = ServerCount++;
|
||||
EntitySystem.Get<ResearchSystem>()?.RegisterServer(this);
|
||||
Database = Owner.GetComponent<TechnologyDatabaseComponent>();
|
||||
Owner.TryGetComponent(out _powerDevice);
|
||||
Owner.TryGetComponent(out _powerReceiver);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user