machine linking refactor to ecs (#4323)

* started work

* some more work, ui working (somewhat)

* stuff

* reorganization

* some more reorg

* conveyors

* conveyors working

* finalized (dis)connection
added linkattempt
added feedback text
work on conveyors

* removed command
add rangecheck

* fixed inrange check

* handling

* ui no longer kanser, ship it

* adresses reviews

* reformats file

* reformats file

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
This commit is contained in:
Paul Ritter
2021-08-27 17:46:02 +02:00
committed by GitHub
parent 4a68032ea1
commit e11a9b282a
47 changed files with 1059 additions and 633 deletions

View File

@@ -3,8 +3,6 @@ using System.Threading.Tasks;
using Content.Server.Ghost;
using Content.Server.Hands.Components;
using Content.Server.Items;
using Content.Server.MachineLinking.Components;
using Content.Server.MachineLinking.Signals;
using Content.Server.Power.Components;
using Content.Server.Temperature.Components;
using Content.Shared.Actions.Behaviors;
@@ -12,7 +10,6 @@ using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.Interaction;
using Content.Shared.Light;
using Content.Shared.Notification;
using Content.Shared.Notification.Managers;
using Content.Shared.Sound;
using Robust.Server.GameObjects;
@@ -33,7 +30,7 @@ namespace Content.Server.Light.Components
/// Component that represents a wall light. It has a light bulb that can be replaced when broken.
/// </summary>
[RegisterComponent]
public class PoweredLightComponent : Component, IInteractHand, IInteractUsing, IMapInit, ISignalReceiver<bool>, ISignalReceiver<ToggleSignal>, IGhostBooAffected
public class PoweredLightComponent : Component, IInteractHand, IInteractUsing, IMapInit, IGhostBooAffected
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
@@ -309,13 +306,7 @@ namespace Content.Server.Light.Components
UpdateLight();
}
public void TriggerSignal(bool signal)
{
_on = signal;
UpdateLight();
}
public void TriggerSignal(ToggleSignal signal)
public void ToggleLight()
{
_on = !_on;
UpdateLight();