Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions Content.Shared/PDA/SharedRingerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,37 @@ private void StartRingtone(Entity<RingerComponent> ent)

UpdateRingerUi(ent);

_popup.PopupPredicted(Loc.GetString("comp-ringer-vibration-popup"),
ent,
ent.Owner,
Filter.Pvs(ent, 0.05f),
false,
PopupType.Medium);
// Hardlight start - differentiate ringer popup text recipients.
EntityUid? recipient = null;
string? ownerName = null;

if (TryComp<PdaComponent>(ent.Owner, out var pda))
{
recipient = pda.PdaOwner;
ownerName = pda.OwnerName;
}

var selfMessage = Loc.GetString("comp-ringer-vibration-popup-self");
var othersMessage = ownerName != null
? Loc.GetString("comp-ringer-vibration-popup-other-owner", ("owner", ownerName))
: Loc.GetString("comp-ringer-vibration-popup-other-unknown"); // Fallback if no owner.

if (recipient != null)
{
_popup.PopupEntity(selfMessage, ent.Owner, recipient.Value, PopupType.Medium);

_popup.PopupEntity(
othersMessage,
ent.Owner,
Filter.PvsExcept(recipient.Value, entityManager: EntityManager),
true,
PopupType.Small);
}
else
{
_popup.PopupPredicted(selfMessage, othersMessage, ent.Owner, recipient, PopupType.Medium);
}
// Hardlight end

DirtyFields(ent.AsNullable(),
null,
Expand Down
6 changes: 5 additions & 1 deletion Resources/Locale/en-US/pda/Ringer/ringer-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

# For the PDA Ringer screen

comp-ringer-vibration-popup = Your PDA vibrates
# Hardlight start
comp-ringer-vibration-popup-self = Your PDA vibrates
comp-ringer-vibration-popup-other-owner = {$owner}'s PDA vibrates
comp-ringer-vibration-popup-other-unknown = A nearby PDA rings
# Hardlight end

comp-ringer-ui-menu-title = Ringtone

Expand Down
Loading