PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -43,7 +43,7 @@ public sealed partial class TriggerSystem
|
||||
|
||||
if (component.PreventSuicide)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("suicide-prevented"), args.Victim, Filter.Entities(args.Victim));
|
||||
_popupSystem.PopupEntity(Loc.GetString("suicide-prevented"), args.Victim, args.Victim);
|
||||
args.BlockSuicideAttempt(component.PreventSuicide);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public sealed partial class TriggerSystem
|
||||
Act = () =>
|
||||
{
|
||||
component.Delay = option;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), args.User, args.User);
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public sealed partial class TriggerSystem
|
||||
if (component.DelayOptions[^1] <= component.Delay)
|
||||
{
|
||||
component.Delay = component.DelayOptions[0];
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", component.Delay)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", component.Delay)), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public sealed partial class TriggerSystem
|
||||
if (option > component.Delay)
|
||||
{
|
||||
component.Delay = option;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), user, user);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -130,12 +130,12 @@ public sealed partial class TriggerSystem
|
||||
if (comp.StartOnStick)
|
||||
{
|
||||
comp.StartOnStick = false;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-off"), grenade, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-off"), grenade, user);
|
||||
}
|
||||
else
|
||||
{
|
||||
comp.StartOnStick = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-on"), grenade, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-on"), grenade, user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
_adminLogger.Add(LogType.Trigger, LogImpact.Low,
|
||||
$"A voice-trigger on {ToPrettyString(component.Owner):entity} has started recording. User: {ToPrettyString(user):user}");
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-start-recording"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-start-recording"), component.Owner);
|
||||
}
|
||||
|
||||
public void StopRecording(TriggerOnVoiceComponent component)
|
||||
@@ -95,7 +95,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
if (string.IsNullOrWhiteSpace(component.KeyPhrase))
|
||||
RemComp<ActiveListenerComponent>(component.Owner);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-stop-recording"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-stop-recording"), component.Owner);
|
||||
}
|
||||
|
||||
public void FinishRecording(TriggerOnVoiceComponent component, EntityUid source, string message)
|
||||
@@ -106,7 +106,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
_adminLogger.Add(LogType.Trigger, LogImpact.Low,
|
||||
$"A voice-trigger on {ToPrettyString(component.Owner):entity} has recorded a new keyphrase: '{component.KeyPhrase}'. Recorded from {ToPrettyString(source):speaker}");
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-recorded", ("keyphrase", component.KeyPhrase!)), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-recorded", ("keyphrase", component.KeyPhrase!)), component.Owner);
|
||||
}
|
||||
|
||||
private void OnVoiceExamine(EntityUid uid, TriggerOnVoiceComponent component, ExaminedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user