Cargo telepad machine linking (#7756)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -2,7 +2,10 @@ using Content.Server.Cargo.Components;
|
||||
using Content.Server.Labels.Components;
|
||||
using Content.Server.Paper;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.MachineLinking.Components;
|
||||
using Content.Server.MachineLinking.Events;
|
||||
using Content.Shared.Cargo;
|
||||
using Content.Shared.Cargo.Components;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -16,6 +19,7 @@ public sealed partial class CargoSystem
|
||||
|
||||
private void InitializeTelepad()
|
||||
{
|
||||
SubscribeLocalEvent<CargoTelepadComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<CargoTelepadComponent, PowerChangedEvent>(OnTelepadPowerChange);
|
||||
// Shouldn't need re-anchored event
|
||||
SubscribeLocalEvent<CargoTelepadComponent, AnchorStateChangedEvent>(OnTelepadAnchorChange);
|
||||
@@ -57,6 +61,11 @@ public sealed partial class CargoSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, CargoTelepadComponent telepad, ComponentInit args)
|
||||
{
|
||||
_linker.EnsureReceiverPorts(uid, telepad.ReceiverPort);
|
||||
}
|
||||
|
||||
private void SetEnabled(CargoTelepadComponent component, ApcPowerReceiverComponent? receiver = null,
|
||||
TransformComponent? xform = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user