- add: dildos
This commit is contained in:
38
Content.Server/_Amour/Vibrator/VibratorSystem.cs
Normal file
38
Content.Server/_Amour/Vibrator/VibratorSystem.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Content.Server.DeviceLinking.Events;
|
||||
using Content.Server.DeviceLinking.Systems;
|
||||
using Content.Shared._Amour.Vibrator;
|
||||
using Content.Shared.Interaction.Events;
|
||||
|
||||
namespace Content.Server._Amour.Vibrator;
|
||||
|
||||
public sealed class VibratorSystem : SharedVibratorSystem
|
||||
{
|
||||
[Dependency] private readonly DeviceLinkSystem _signalSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<VibratorComponent,UseInHandEvent>(OnUseInHand);
|
||||
SubscribeLocalEvent<VibratorComponent,ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<VibratorComponent,SignalReceivedEvent>(OnsignalReceived);
|
||||
}
|
||||
|
||||
private void OnsignalReceived(EntityUid uid, VibratorComponent component,ref SignalReceivedEvent args)
|
||||
{
|
||||
if(args.Port != component.TogglePort)
|
||||
return;
|
||||
|
||||
ToggleVibration(uid,component);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, VibratorComponent component, ComponentInit args)
|
||||
{
|
||||
_signalSystem.EnsureSinkPorts(uid,component.TogglePort);
|
||||
}
|
||||
|
||||
private void OnUseInHand(EntityUid uid, VibratorComponent component, UseInHandEvent args)
|
||||
{
|
||||
ToggleVibration(uid,component);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user