Merge pull request #4472 from Citadel-Station-13/upstream-merge-33634

[MIRROR] (probably?) Fixes being able to create two Eminences at a time + other Eminence issues
This commit is contained in:
LetterJay
2017-12-26 05:29:42 -06:00
committed by GitHub
4 changed files with 25 additions and 3 deletions
@@ -1,3 +1,7 @@
//Helper proc to get an Eminence mob if it exists
/proc/get_eminence()
return locate(/mob/camera/eminence) in servants_and_ghosts()
//The Eminence is a unique mob that functions like the leader of the cult. It's incorporeal but can interact with the world in several ways.
/mob/camera/eminence
name = "\the Emininence"
@@ -39,6 +43,9 @@
if(prob(166 - (get_dist(src, T) * 33)))
T.ratvar_act() //Causes moving to leave a swath of proselytized area behind the Eminence
/mob/camera/eminence/Process_Spacemove(movement_dir = 0)
return TRUE
/mob/camera/eminence/Login()
..()
var/datum/antagonist/clockcult/C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE)
@@ -63,6 +70,12 @@
E.Grant(src)
/mob/camera/eminence/say(message)
if(client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).")
return
if(client.handle_spam_prevention(message,MUTE_IC))
return
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(!message)
return
@@ -70,7 +83,13 @@
if(GLOB.ratvar_awakens)
visible_message("<span class='brass'><b>You feel light slam into your mind and form words:</b> \"[capitalize(message)]\"</span>")
playsound(src, 'sound/machines/clockcult/ark_scream.ogg', 50, FALSE)
hierophant_message("<span class='large_brass'><b>The Eminence:</b> \"[message]\"</span>")
message = "<span class='big brass'><b>The [GLOB.ratvar_awakens ? "Radiance" : "Eminence"]:</b> \"[message]\"</span>"
for(var/mob/M in servants_and_ghosts())
if(isobserver(M))
var/link = FOLLOW_LINK(M, src)
to_chat(M, "[link] [message]")
else
to_chat(M, message)
/mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
if(z == ZLEVEL_CITYOFCOGS || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything
@@ -113,7 +113,7 @@
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/mass_recall()
for(var/V in SSticker.mode.servants_of_ratvar)
var/datum/mind/M = V
if(!M.current.stat)
if(M.current.stat != DEAD)
M.current.forceMove(get_turf(src))
M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
M.current.clear_fullscreen("flash", 5)
@@ -38,7 +38,6 @@
/obj/structure/destructible/clockwork/eminence_spire/attack_ghost(mob/user)
if(!IsAdminGhost(user))
return
var/datum/antagonist/clockcult/random_cultist = locate() in GLOB.antagonists //if theres no cultists new team without eminence will be created anyway.
if(random_cultist && random_cultist.clock_team && random_cultist.clock_team.eminence)
to_chat(user, "<span class='warning'>There's already an Eminence - too late!</span>")
@@ -70,6 +70,10 @@
if(realappearence)
qdel(realappearence)
realappearence = null
if(heated)
var/mob/camera/eminence/E = get_eminence()
if(E)
E.superheated_walls--
return ..()
/turf/closed/wall/clockwork/ReplaceWithLattice()