Santa Claus can now hear prayers that mention him or christmas. (#96406)

## About The Pull Request
Santa Claus can hear prayers that contain the words "santa", "claus",
"christmas" or "xmas". Prayers containing the word "satan" have a 40%
probability to being "erroneously" relayed to Santa instead. Talk about
a terrible typo. I'm toooootally sure nobody will do it on purpose
(totally forced joke ik ik).
Santa cannot know who the person praying is if not told inside the
prayer itself, however he can tell if the person is naughty (either
antag or has the evil trait) or not, so be mindful of that. If tired or
harassed by unwanted prayers, Santa can also click an action button at
any time to silence them. The prayers will still be sent to admins, they
just won't be heard by Mr. Claus.

This PR comes with a new component and a mild refactor of prayers. For
admins, the message from the pray verb is now wrapped in boxed message
spans. This will make prayers a bit easier to notice, since the lack of
message box coupled with lack of sound (for now, unless it's the
chaplain praying) makes them easy to miss.

Also tinfoil hats prevent you from hearing prayers, Santa (redundant
with the action button, this is just a little touch).

## Why It's Good For The Game
Early Christmas PR ! Yeah, I know, headsets exist and Santa Claus is
very capable of wearing one, but he's the same guy who rides a flying
sleight, climb down chimneys (notwithstanding his corpulent body). The
prayer thing makes a bit sense if you think of the more religious roots
of the character, though our Santa Claus is a bit more secular ya know,
and this is more of an excuse to give him something extra.

Oh, yeah, if people will abuse the feature, I guess I could add an
incapacitated check for the praying mob so that Santa won't hear prayers
from people dying or restrained, or remove the tidbit that says if the
person who sent the prayer is naughty or not.

## Changelog

🆑
admin: Prayers from players are now boxed (like examine messages and
some health readouts for example), making them easier to tell apart from
the constant stream of text in your chat tabs.
add: Santa Claus can now hear prayers that mention him or Christmas. He
won't know who's praying unless told, though he can tell if they're
naughty.
/🆑
This commit is contained in:
Ghom
2026-06-12 06:44:04 +03:00
committed by GitHub
parent 84c72671ac
commit 3c485aa614
12 changed files with 199 additions and 19 deletions
+21 -19
View File
@@ -16,31 +16,33 @@
if(src.client.handle_spam_prevention(message, MUTE_PRAY))
return
var/mutable_appearance/cross = mutable_appearance('icons/obj/storage/book.dmi', "bible")
var/font_color = "purple"
var/prayer_type = "PRAYER"
var/deity
var/prayer_type = DEFAULT_PRAYER
var/list/deities = list()
if(src.job == JOB_CHAPLAIN)
cross.icon_state = "kingyellow"
font_color = "blue"
prayer_type = "CHAPLAIN PRAYER"
prayer_type = CHAPLAIN_PRAYER
if(GLOB.deity)
deity = GLOB.deity
deities += GLOB.deity
else if(IS_CULTIST(src))
cross.icon_state = "tome"
font_color = "red"
prayer_type = "CULTIST PRAYER"
deity = "Nar'Sie"
else if(isliving(src))
var/mob/living/L = src
if(HAS_TRAIT(L, TRAIT_SPIRITUAL))
cross.icon_state = "holylight"
font_color = "blue"
prayer_type = "SPIRITUAL PRAYER"
prayer_type = CULT_PRAYER
deities += "Nar'Sie"
else if(IS_HERETIC_OR_MONSTER(src))
prayer_type = HERETIC_PRAYER
deities += "the Mansus"
else if(HAS_TRAIT(src, TRAIT_SPIRITUAL))
prayer_type = SPIRITUAL_PRAYER
else if(HAS_TRAIT(src, TRAIT_EVIL))
prayer_type = EVIL_PRAYER
var/mutable_appearance/cross = mutable_appearance('icons/obj/storage/book.dmi', GLOB.prayer_type_to_icon_state[prayer_type])
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SEND_PRAYER, src, message, prayer_type, cross, deities)
var/msg_tmp = message
GLOB.requests.pray(src.client, message, src.job == JOB_CHAPLAIN)
message = span_adminnotice("[icon2html(cross, GLOB.admins)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> [span_linkify(message)]")
message = span_adminnotice("[icon2html(cross, GLOB.admins)]<b><font color=[GLOB.prayer_type_to_font_color[prayer_type]]>[prayer_type][length(deities) ? " (to [english_list(deities)])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> [span_linkify(message)]")
message = custom_boxed_message(GLOB.prayer_type_to_message_box[prayer_type], message)
for(var/client/C in GLOB.admins)
if(get_chat_toggles(C) & CHAT_PRAYER)
to_chat(C, message, type = MESSAGE_TYPE_PRAYER, confidential = TRUE)