Skip to content

Commit

Permalink
More code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emily9031 committed Jan 22, 2025
1 parent f640c98 commit 76ade67
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using Content.Shared.DeviceLinking;
using Robust.Shared.Prototypes;

namespace Content.Server._DV.DeviceLinking.Components
{
[RegisterComponent]
public sealed partial class DeadMansSignallerComponent : Component
namespace Content.Server._DV.DeviceLinking.Components;

{
/// <summary>
/// The port that gets signaled when the switch turns on.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> Port = "Pressed";
}
[RegisterComponent]
public sealed partial class DeadMansSignallerComponent : Component
{
/// <summary>
/// The port that gets signaled when the switch turns on.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> Port = "Pressed";
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public override void Initialize()
SubscribeLocalEvent<DeadMansSignallerComponent, GotUnequippedHandEvent>(DeadMans);
}

private void DeadMans(EntityUid uid, DeadMansSignallerComponent component, GotUnequippedHandEvent args)
private void DeadMans(Entity<DeadMansSignallerComponent> ent, ref GotUnequippedHandEvent args)
{
if (_toggle.IsActivated(uid))
if (_toggle.IsActivated(ent.Owner))
{
_link.InvokePort(uid, component.Port);
_link.InvokePort(ent.Owner, ent.Comp.Port);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@
range: 50
- type: StaticPrice
price: 30

0 comments on commit 76ade67

Please sign in to comment.