Pow3r: stage 1 (#4208)

Co-authored-by: 20kdc <asdd2808@gmail.com>
This commit is contained in:
Pieter-Jan Briers
2021-07-04 18:11:52 +02:00
committed by GitHub
parent ea60a81fdf
commit 103bc19508
212 changed files with 8584 additions and 4426 deletions

View File

@@ -26,7 +26,7 @@ namespace Content.Server.Research.Components
private const string SoundCollectionName = "keyboard";
[ViewVariables] private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered;
[ViewVariables] private bool Powered => !Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) || receiver.Powered;
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(ResearchConsoleUiKey.Key);

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Research.Components
private int _pointsPerSecond;
[DataField("active")]
private bool _active;
private PowerReceiverComponent? _powerReceiver;
private ApcPowerReceiverComponent? _powerReceiver;
[ViewVariables(VVAccess.ReadWrite)]
public int PointsPerSecond
@@ -35,7 +35,7 @@ namespace Content.Server.Research.Components
/// <summary>
/// Whether this can be used to produce research points.
/// </summary>
/// <remarks>If no <see cref="PowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
/// <remarks>If no <see cref="ApcPowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
[ViewVariables]
public bool CanProduce => Active && (_powerReceiver is null || _powerReceiver.Powered);

View File

@@ -61,11 +61,11 @@ namespace Content.Server.Research.Components
}
}
/// <remarks>If no <see cref="PowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
/// <remarks>If no <see cref="ApcPowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
[ViewVariables]
public bool CanRun => _powerReceiver is null || _powerReceiver.Powered;
private PowerReceiverComponent? _powerReceiver;
private ApcPowerReceiverComponent? _powerReceiver;
protected override void Initialize()
{