makes conveyors to use machine linking & refactors machine linking a bit (#2464)

* makes conveyors to use machine linking & refactors machine linking a bit

* nullable errors

* temp commit, starting work on construction

* working recipies & graphs

* fixes crash

* makes items gravitate towards the center when on a conveyor

* makes conveyors take bool signal too

* ignores components clientside

* default arm
entitymanager
maxtransmitters
unsubscribe methods

* twowayLEVER

* _

* componentreference
struct

* yaml run
leverDefinitelyNotCopiedFromGirderNoNoNo dies today :(

* nullable

* no divide by 0

* making sloth happy

* space gone - happy?

* final fix

* yes

* adds item to lathe

* conveyor item -> conveyor assembly

* technology

* reviews ADRESSED

* Update Content.Shared/GameObjects/Verbs/VerbUtility.cs

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
Paul Ritter
2020-11-18 14:53:46 +01:00
committed by GitHub
parent 2cae1ac641
commit 501156f84c
24 changed files with 345 additions and 447 deletions

View File

@@ -10,6 +10,7 @@ using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.MachineLinking
@@ -87,11 +88,10 @@ namespace Content.Server.GameObjects.Components.MachineLinking
}
}
public bool TransmitSignal<T>(IEntity user, T signal)
public bool TransmitSignal<T>(T signal)
{
if (_receivers.Count == 0)
{
Owner.PopupMessage(user, Loc.GetString("No receivers connected."));
return false;
}
@@ -150,8 +150,9 @@ namespace Content.Server.GameObjects.Components.MachineLinking
{
base.Shutdown();
foreach (var receiver in _receivers)
for (var i = _receivers.Count-1; i >= 0; i++)
{
var receiver = _receivers[i];
if (receiver.Deleted)
{
continue;
@@ -159,6 +160,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking
receiver.Unsubscribe(this);
}
_receivers.Clear();
}
}