Makes cult leader handling work off of the Cult datum (#76556)

## About The Pull Request

Removes Cult master's datum, it's not handled by the Cultist itself,
using a helper to promote/demote people to leader.
In practice, the only way someone would be demoted is through Admins, so
this adds support for Admins to intervene in this Cult stuff if
necessary.

Moves cult objectives and cult team to their own files

Removes the cult master's status effect that constantly processes to
send a deathrattle, and instead moves it to a signal hooked to stat
change.

Also moves some things from ``get_antag_minds`` to checking the team,
which doesn't change anything in-game but it does help add the currently
non-functional support for several cult teams. Iunno.


https://github.com/tgstation/tgstation/assets/53777086/573a4f13-35e1-4f34-9952-62fed10b49c9

## Why It's Good For The Game

Having the cult leader be its own datum has actually been handled like
shit. To promote someone to cult leader, we currently make their current
cult datum silent, then remove it, and finally add the cult leader
datum. This means they lose their spells unless manually given back
post-promotion, which sucks (and also, no one has done yet, meaning they
just lose all their spells).
It also means there's a lot more snowflake things, did you know there's
a var to bypass converting mindshielded people? That's so cult masters
can be promoted by Cultists who were mindshielded, and they have to be
"ownable", that var is to bypass the check for mindshield to "convert"
them to leader cultist.

## Changelog

🆑
fix: Cultists promoted to Leader no longer lose their spells (rip
whoever tried saving up blood rites)
admin: Admins can now force promote/demote people from Cult Leader if
necessary.
/🆑
This commit is contained in:
John Willard
2023-07-07 06:27:31 -04:00
committed by GitHub
parent 40be92b1fd
commit 32afa856db
10 changed files with 499 additions and 500 deletions
-29
View File
@@ -72,35 +72,6 @@
desc = "You are being resurrected!"
icon_state = "wish_granter"
/datum/status_effect/cult_master
id = "The Cult Master"
duration = -1
alert_type = null
on_remove_on_mob_delete = TRUE
var/alive = TRUE
/datum/status_effect/cult_master/proc/deathrattle()
if(!QDELETED(GLOB.cult_narsie))
return //if Nar'Sie is alive, don't even worry about it
var/area/A = get_area(owner)
for(var/datum/mind/B as anything in get_antag_minds(/datum/antagonist/cult))
if(isliving(B.current))
var/mob/living/M = B.current
SEND_SOUND(M, sound('sound/hallucinations/veryfar_noise.ogg'))
to_chat(M, span_cultlarge("The Cult's Master, [owner], has fallen in \the [A]!"))
/datum/status_effect/cult_master/tick()
if(owner.stat != DEAD && !alive)
alive = TRUE
return
if(owner.stat == DEAD && alive)
alive = FALSE
deathrattle()
/datum/status_effect/cult_master/on_remove()
deathrattle()
. = ..()
/datum/status_effect/blooddrunk
id = "blooddrunk"
duration = 10