diff --git a/Content.Server/Prayer/PrayableComponent.cs b/Content.Server/Prayer/PrayableComponent.cs
index b174bb8c28..ba172b238b 100644
--- a/Content.Server/Prayer/PrayableComponent.cs
+++ b/Content.Server/Prayer/PrayableComponent.cs
@@ -12,6 +12,34 @@
[DataField("bibleUserOnly")]
[ViewVariables(VVAccess.ReadWrite)]
public bool BibleUserOnly;
+
+ ///
+ /// Message given to user to notify them a message was sent
+ ///
+ [DataField("sentMessage")]
+ [ViewVariables(VVAccess.ReadWrite)]
+ public string SentMessage = "prayer-popup-notify-pray-sent";
+
+ ///
+ /// Prefix used in the notification to admins
+ ///
+ [DataField("notifiactionPrefix")]
+ [ViewVariables(VVAccess.ReadWrite)]
+ public string NotifiactionPrefix = "prayer-chat-notify-pray";
+
+ ///
+ /// Used in window title and context menu
+ ///
+ [DataField("verb")]
+ [ViewVariables(VVAccess.ReadOnly)]
+ public string Verb = "prayer-verbs-pray";
+
+ ///
+ /// Context menu image
+ ///
+ [DataField("verbImage")]
+ [ViewVariables(VVAccess.ReadOnly)]
+ public string VerbImage = "/Textures/Interface/pray.svg.png";
}
}
diff --git a/Content.Server/Prayer/PrayerSystem.cs b/Content.Server/Prayer/PrayerSystem.cs
index 7dbd65d9d1..5545231d3e 100644
--- a/Content.Server/Prayer/PrayerSystem.cs
+++ b/Content.Server/Prayer/PrayerSystem.cs
@@ -1,4 +1,4 @@
-using Content.Server.Administration;
+using Content.Server.Administration;
using Content.Server.Administration.Logs;
using Content.Server.Bible.Components;
using Content.Server.Chat.Managers;
@@ -44,8 +44,8 @@ public sealed class PrayerSystem : EntitySystem
var prayerVerb = new ActivationVerb
{
- Text = Loc.GetString("prayer-verbs-pray"),
- IconTexture = "/Textures/Interface/pray.svg.png",
+ Text = Loc.GetString(comp.Verb),
+ IconTexture = comp.VerbImage == "" ? null : comp.VerbImage,
Act = () =>
{
if (comp.BibleUserOnly && !EntityManager.TryGetComponent(args.User, out var bibleUser))
@@ -54,9 +54,9 @@ public sealed class PrayerSystem : EntitySystem
return;
}
- _quickDialog.OpenDialog(actor.PlayerSession, "Pray", "Message", (string message) =>
+ _quickDialog.OpenDialog(actor.PlayerSession, Loc.GetString(comp.Verb), "Message", (string message) =>
{
- Pray(actor.PlayerSession, message);
+ Pray(actor.PlayerSession, comp, message);
});
},
Impact = LogImpact.Low,
@@ -78,7 +78,7 @@ public sealed class PrayerSystem : EntitySystem
if (target.AttachedEntity == null)
return;
- var message = popupMessage == "" ? "" : popupMessage + $" \"{messageString}\"";
+ var message = popupMessage == "" ? "" : popupMessage + (messageString == "" ? "" : $" \"{messageString}\"");
_popupSystem.PopupEntity(popupMessage, target.AttachedEntity.Value, target, PopupType.Large);
_chatManager.ChatMessageToOne(ChatChannel.Local, messageString, message, EntityUid.Invalid, false, target.ConnectedClient);
@@ -89,20 +89,21 @@ public sealed class PrayerSystem : EntitySystem
/// Sends a message to the admin channel with a message and username
///
/// The IPlayerSession who sent the original message
+ /// Prayable component used to make the prayer
/// Message to be sent to the admin chat
///
/// You may be wondering, "Why the admin chat, specifically? Nobody even reads it!"
/// Exactly.
///
- public void Pray(IPlayerSession sender, string message)
+ public void Pray(IPlayerSession sender, PrayableComponent comp, string message)
{
if (sender.AttachedEntity == null)
return;
- _popupSystem.PopupEntity(Loc.GetString("prayer-popup-notify-sent"), sender.AttachedEntity.Value, sender, PopupType.Medium);
+ _popupSystem.PopupEntity(Loc.GetString(comp.SentMessage), sender.AttachedEntity.Value, sender, PopupType.Medium);
- _chatManager.SendAdminAnnouncement(Loc.GetString("prayer-chat-notify", ("name", sender.Name), ("message", message)));
- _adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(sender.AttachedEntity.Value):player} sent prayer: {message}");
+ _chatManager.SendAdminAnnouncement($"{Loc.GetString(comp.NotifiactionPrefix)} <{sender.Name}>: {message}");
+ _adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(sender.AttachedEntity.Value):player} sent prayer ({Loc.GetString(comp.NotifiactionPrefix)}): {message}");
}
}
diff --git a/Resources/Locale/en-US/prayers/prayers.ftl b/Resources/Locale/en-US/prayers/prayers.ftl
index 3b7a399197..1a8518bdd8 100644
--- a/Resources/Locale/en-US/prayers/prayers.ftl
+++ b/Resources/Locale/en-US/prayers/prayers.ftl
@@ -1,7 +1,13 @@
prayer-verbs-subtle-message = Subtle Message
prayer-verbs-pray = Pray
-prayer-chat-notify = PRAYER: <{$name}>: {$message}
+prayer-verbs-call = Call
+prayer-chat-notify-pray = PRAYER
+prayer-chat-notify-honkmother = HONKMOTHER
+prayer-chat-notify-centcom = CENTCOM
prayer-popup-subtle-default = You hear a voice in your head...
-prayer-popup-notify-sent = Your message has been sent to the gods...
-prayer-popup-notify-locked = You don't feel worthy enough...
+
+prayer-popup-notify-honkmother-sent = You left a voicemail message for the Honkmother...
+prayer-popup-notify-centcom-sent = You left a voicemail message for Central Command...
+prayer-popup-notify-pray-sent = Your message has been sent to the gods...
+prayer-popup-notify-pray-locked = You don't feel worthy enough...
diff --git a/Resources/Prototypes/Entities/Objects/Fun/Instruments/instruments_misc.yml b/Resources/Prototypes/Entities/Objects/Fun/Instruments/instruments_misc.yml
index e4c686c3f5..42255be5ae 100644
--- a/Resources/Prototypes/Entities/Objects/Fun/Instruments/instruments_misc.yml
+++ b/Resources/Prototypes/Entities/Objects/Fun/Instruments/instruments_misc.yml
@@ -56,6 +56,11 @@
program: 124
- type: Item
size: 10
+ - type: Prayable
+ sentMessage: prayer-popup-notify-centcom-sent
+ notifiactionPrefix: prayer-chat-notify-centcom
+ verb: prayer-verbs-call
+ verbImage: ""
- type: entity
parent: BaseHandheldInstrument
@@ -158,4 +163,9 @@
bounds: "-0.4,-0.3,0.4,0.3"
density: 5
mask:
- - ItemMask
\ No newline at end of file
+ - ItemMask
+ - type: Prayable
+ sentMessage: prayer-popup-notify-honkmother-sent
+ notifiactionPrefix: prayer-chat-notify-honkmother
+ verb: prayer-verbs-call
+ verbImage: ""