Я починил дилдо блять... (#165)

This commit is contained in:
BIGZi0348
2024-11-08 20:56:26 +03:00
committed by GitHub
parent 0f35e94fa2
commit e4fbe81aa7
3 changed files with 22 additions and 18 deletions

View File

@@ -13,26 +13,30 @@ public sealed class VibratorSystem : SharedVibratorSystem
{
base.Initialize();
SubscribeLocalEvent<VibratorComponent,UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<VibratorComponent,ComponentInit>(OnInit);
SubscribeLocalEvent<VibratorComponent,SignalReceivedEvent>(OnsignalReceived);
SubscribeLocalEvent<VibratorComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<VibratorComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<VibratorComponent, SignalReceivedEvent>(OnsignalReceived);
}
private void OnsignalReceived(EntityUid uid, VibratorComponent component,ref SignalReceivedEvent args)
private void OnsignalReceived(EntityUid uid, VibratorComponent component, ref SignalReceivedEvent args)
{
if(args.Port != component.TogglePort)
if (args.Port != component.TogglePort)
return;
ToggleVibration(uid,component);
ToggleVibration(uid, component);
}
private void OnInit(EntityUid uid, VibratorComponent component, ComponentInit args)
{
_signalSystem.EnsureSinkPorts(uid,component.TogglePort);
_signalSystem.EnsureSinkPorts(uid, component.TogglePort);
}
private void OnUseInHand(EntityUid uid, VibratorComponent component, UseInHandEvent args)
{
ToggleVibration(uid,component);
if (args.Handled)
return;
ToggleVibration(uid, component);
args.Handled = true;
}
}