This commit is contained in:
Rane
2022-02-17 21:43:24 -05:00
committed by GitHub
parent 94c56980cb
commit 8049a709e6
29 changed files with 323 additions and 8 deletions

View File

@@ -2,9 +2,11 @@ using Content.Server.Power.Components;
using Content.Server.Recycling.Components;
using Content.Shared.Body.Components;
using Content.Shared.Recycling;
using Content.Shared.Emag.Systems;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Player;
namespace Content.Server.Recycling
{
@@ -14,6 +16,7 @@ namespace Content.Server.Recycling
{
base.Initialize();
SubscribeLocalEvent<RecyclerComponent, StartCollideEvent>(HandleCollide);
SubscribeLocalEvent<RecyclerComponent, GotEmaggedEvent>(OnEmagged);
}
private void HandleCollide(EntityUid uid, RecyclerComponent component, StartCollideEvent args)
@@ -53,5 +56,14 @@ namespace Content.Server.Recycling
appearance.SetData(RecyclerVisuals.Bloody, true);
}
}
private void OnEmagged(EntityUid uid, RecyclerComponent component, GotEmaggedEvent args)
{
if (component.Safe == true)
{
component.Safe = false;
args.Handled = true;
}
}
}
}