From 0b27d4822fae18fa2543a6f5f9fd62948966dd04 Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Mon, 11 Oct 2021 12:38:16 -0400
Subject: [PATCH] Allows ghosts to mute dead chat for 2 wizard points.
---
code/game/gamemodes/wizard/spellbook.dm | 15 +++++++++++++++
code/modules/events/wizard/ghost.dm | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 0eef296334d..a83a2280657 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -343,6 +343,21 @@
playsound(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1)
return TRUE
+/datum/spellbook_entry/summon/slience_ghosts
+ name = "Silence Ghosts"
+ desc = "Tired of people talking behind your back, and spooking you? Why not silence them, and make the dead deader."
+ cost = 2
+ log_name = "SLG"
+ is_ragin_restricted = TRUE //Salt needs to flow here, to be honest
+
+/datum/spellbook_entry/summon/slience_ghosts/Buy(mob/living/carbon/human/user, obj/item/spellbook/book)
+ new /datum/event/wizard/ghost_mute()
+ active = TRUE
+ to_chat(user, "You have silenced all ghosts!")
+ playsound(get_turf(user), 'sound/effects/ghost.ogg', 50, 1)
+ message_admins("[key_name_admin(usr)] silenced all ghosts as a wizard!", 1)
+ return TRUE
+
/datum/spellbook_entry/summon/guns
name = "Summon Guns"
desc = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill you. There is a good chance that they will shoot each other first."
diff --git a/code/modules/events/wizard/ghost.dm b/code/modules/events/wizard/ghost.dm
index 11529e3080d..8c3daf00bba 100644
--- a/code/modules/events/wizard/ghost.dm
+++ b/code/modules/events/wizard/ghost.dm
@@ -3,3 +3,11 @@
/datum/event/wizard/ghost/start()
var/msg = "You suddenly feel extremely obvious..."
set_observer_default_invisibility(0, msg)
+
+/datum/event/wizard/ghost_mute //The spook is silent
+
+/datum/event/wizard/ghost_mute/start()
+ GLOB.dsay_enabled = FALSE
+ for(var/mob/dead/observer/silenced in GLOB.player_list)
+ to_chat(silenced, "Magical forces wrap around your spectral form. You can no longer speak to other ghosts!")
+ SEND_SOUND(silenced, 'sound/hallucinations/wail.ogg')