Power Rework (#863)

Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
py01
2020-06-28 09:23:26 -06:00
committed by GitHub
parent ffe25de723
commit 23cc6b1d4e
154 changed files with 11253 additions and 3913 deletions

View File

@@ -20,6 +20,7 @@ using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Timers;
using Robust.Shared.ViewVariables;
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
namespace Content.Server.GameObjects.Components.Research
{
@@ -47,8 +48,8 @@ namespace Content.Server.GameObjects.Components.Research
}
private LatheRecipePrototype _producingRecipe = null;
private PowerDeviceComponent _powerDevice;
private bool Powered => _powerDevice.Powered;
private PowerReceiverComponent _powerReceiver;
private bool Powered => _powerReceiver.Powered;
private static readonly TimeSpan InsertionTime = TimeSpan.FromSeconds(0.9f);
@@ -57,7 +58,7 @@ namespace Content.Server.GameObjects.Components.Research
base.Initialize();
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>().GetBoundUserInterface(LatheUiKey.Key);
_userInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage;
_powerDevice = Owner.GetComponent<PowerDeviceComponent>();
_powerReceiver = Owner.GetComponent<PowerReceiverComponent>();
_appearance = Owner.GetComponent<AppearanceComponent>();
}