//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" real_name = "\the Eminence" desc = "The leader-elect of the servants of Ratvar." icon = 'icons/effects/clockwork_effects.dmi' icon_state = "eminence" mouse_opacity = MOUSE_OPACITY_OPAQUE move_on_shuttle = TRUE see_in_dark = 8 invisibility = INVISIBILITY_OBSERVER layer = FLY_LAYER faction = list("ratvar") lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE var/static/superheated_walls = 0 /mob/camera/eminence/CanPass(atom/movable/mover, turf/target) return TRUE /mob/camera/eminence/Move(NewLoc, direct) var/OldLoc = loc if(NewLoc && !istype(NewLoc, /turf/open/indestructible/reebe_void)) forceMove(get_turf(NewLoc)) Moved(OldLoc, direct) if(GLOB.ratvar_awakens) for(var/turf/T in range(5, src)) 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/Login() ..() var/datum/antagonist/clockcult/C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE) if(!C) add_servant_of_ratvar(src, TRUE) C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE) if(C && C.clock_team) if(C.clock_team.eminence) remove_servant_of_ratvar(src,TRUE) qdel(src) else C.clock_team.eminence = src to_chat(src, "You have been selected as the Eminence!") to_chat(src, "As the Eminence, you lead the servants. Anything you say will be heard by the entire cult.") to_chat(src, "Though you can move through walls, you're also incorporeal, and largely can't interact with the world except for a few ways.") to_chat(src, "Additionally, unless the herald's beacon is activated, you can't understand any speech while away from Reebe.") eminence_help() for(var/V in actions) var/datum/action/A = V A.Remove(src) //So we get rid of duplicate actions; this also removes Hierophant network, since our say() goes across it anyway var/datum/action/innate/eminence/E for(var/V in subtypesof(/datum/action/innate/eminence)) E = new V E.Grant(src) /mob/camera/eminence/say(message) message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) if(!message) return log_talk(src, "[key_name(src)] : [message]", LOGSAY) if(GLOB.ratvar_awakens) visible_message("You feel light slam into your mind and form words: \"[capitalize(message)]\"") playsound(src, 'sound/machines/clockcult/ark_scream.ogg', 50, FALSE) hierophant_message("The Eminence: \"[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 to_chat(src, message) return to_chat(src, "[speaker] says something, but you can't understand any of it...") /mob/camera/eminence/ClickOn(atom/A, params) var/list/modifiers = params2list(params) if(modifiers["shift"]) A.examine(src) return if(modifiers["alt"] && istype(A, /turf/closed/wall/clockwork)) superheat_wall(A) return if(modifiers["middle"] || modifiers["ctrl"]) issue_command(A) return if(GLOB.ark_of_the_clockwork_justiciar == A) var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G.recalling) return if(!G.recalls_remaining) to_chat(src, "The Ark can no longer recall!") return if(alert(src, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity) return G.initiate_mass_recall() //wHOOPS LOOKS LIKE A HULK GOT THROUGH else if(istype(A, /obj/structure/destructible/clockwork/trap/trigger)) var/obj/structure/destructible/clockwork/trap/trigger/T = A T.visible_message("[T] clunks as it's activated remotely.") to_chat(src, "You activate [T].") T.activate() /mob/camera/eminence/ratvar_act() name = "\improper Radiance" real_name = "\improper Radiance" desc = "The light, forgotten." transform = matrix() * 2 invisibility = SEE_INVISIBLE_MINIMUM /mob/camera/eminence/proc/issue_command(atom/movable/A) var/list/commands var/atom/movable/command_location if(A == src) commands = list("Defend the Ark!", "Advance!", "Retreat!", "Generate Power", "Build Defenses (Bottom-Up)", "Build Defenses (Top-Down)") else command_location = A commands = list("Rally Here", "Regroup Here", "Avoid This Area", "Reinforce This Area") if(istype(A, /obj/structure/destructible/clockwork/powered)) var/obj/structure/destructible/clockwork/powered/P = A if(!can_access_clockwork_power(P)) commands += "Power This Structure" if(P.obj_integrity < P.max_integrity) commands += "Repair This Structure" var/roma_invicta = input(src, "Choose a command to issue to your cult!", "Issue Commands") as null|anything in commands if(!roma_invicta) return var/command_text = "" var/marker_icon switch(roma_invicta) if("Rally Here") command_text = "The Eminence orders an offensive rally at [command_location] to the GETDIR!" marker_icon = "eminence_rally" if("Regroup Here") command_text = "The Eminence orders a regroup to [command_location] to the GETDIR!" marker_icon = "eminence_rally" if("Avoid This Area") command_text = "The Eminence has designated the area to your GETDIR as dangerous and to be avoided!" marker_icon = "eminence_avoid" if("Reinforce This Area") command_text = "The Eminence orders the defense and fortification of the area to your GETDIR!" marker_icon = "eminence_reinforce" if("Power This Structure") command_text = "[command_location] to your GETDIR has no power! Turn it on and make sure there's a sigil of transmission nearby!" marker_icon = "eminence_unlimited_power" if("Repair This Structure") command_text = "The Eminence orders that [command_location] to your GETDIR should be repaired ASAP!" marker_icon = "eminence_repair" if("Defend the Ark!") command_text = "The Eminence orders immediate defense of the Ark!" if("Advance!") command_text = "The Eminence commands you push forward!" if("Retreat!") command_text = "The Eminence has sounded the retreat! Fall back!" if("Generate Power") command_text = "The Eminence orders more power! Build power generations on the station!" if("Build Defenses (Bottom-Up)") command_text = "The Eminence orders that defenses should be built starting from the bottom of Reebe!" if("Build Defenses (Top-Down)") command_text = "The Eminence orders that defenses should be built starting from the top of Reebe!" if(marker_icon) new/obj/effect/temp_visual/ratvar/command_point(get_turf(A), marker_icon) for(var/mob/M in servants_and_ghosts()) to_chat(M, "[replacetext(command_text, "GETDIR", dir2text(get_dir(M, command_location)))]") M.playsound_local(M, 'sound/machines/clockcult/eminence_command.ogg', 75, FALSE, pressure_affected = FALSE) else hierophant_message("[command_text]") for(var/mob/M in servants_and_ghosts()) M.playsound_local(M, 'sound/machines/clockcult/eminence_command.ogg', 75, FALSE, pressure_affected = FALSE) /mob/camera/eminence/proc/superheat_wall(turf/closed/wall/clockwork/wall) if(!istype(wall)) return if(superheated_walls >= SUPERHEATED_CLOCKWORK_WALL_LIMIT && !wall.heated) to_chat(src, "You're exerting all of your power superheating this many walls already! Cool some down first!") return wall.turn_up_the_heat() if(wall.heated) superheated_walls++ to_chat(src, "You superheat [wall]. Superheated walls: [superheated_walls]/[SUPERHEATED_CLOCKWORK_WALL_LIMIT]") else superheated_walls-- to_chat(src, "You cool [wall]. Superheated walls: [superheated_walls]/[SUPERHEATED_CLOCKWORK_WALL_LIMIT]") /mob/camera/eminence/proc/eminence_help() to_chat(src, "You can make use of certain shortcuts to perform different actions:") to_chat(src, "Alt-Click a clockwork wall to superheat or cool it down. \ Superheated walls can't be destroyed by hulks or mechs and are much slower to deconstruct, and are marked by a bright red glow. \ This lasts indefinitely, but only [SUPERHEATED_CLOCKWORK_WALL_LIMIT] clockwork walls can be superheated at once.") to_chat(src, "Interact with the Ark to initiate an emergency recall that teleports all servants directly to its location after a short delay. \ This can only be used a single time, or twice if the herald's beacon was activated,") to_chat(src, "Middle or Ctrl-Click anywhere to allow you to issue a variety of contextual commands to your cult. Different objects allow for different \ commands. Doing this on yourself will provide commands that tell the entire cult a goal.") //Eminence actions below this point /datum/action/innate/eminence name = "Eminence Action" desc = "You shouldn't see this. File a bug report!" icon_icon = 'icons/mob/actions/actions_clockcult.dmi' background_icon_state = "bg_clock" buttontooltipstyle = "clockcult" /datum/action/innate/eminence/IsAvailable() if(!iseminence(owner)) qdel(src) return return ..() //Lists available powers /datum/action/innate/eminence/power_list name = "Eminence Powers" desc = "Forgot what you can do? This refreshes you on your powers as Eminence." button_icon_state = "eminence_rally" /datum/action/innate/eminence/power_list/Activate() var/mob/camera/eminence/E = owner E.eminence_help() //Returns to the Ark /datum/action/innate/eminence/ark_jump name = "Return to Ark" desc = "Warps you to the Ark." button_icon_state = "Abscond" /datum/action/innate/eminence/ark_jump/Activate() var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G) owner.forceMove(get_turf(G)) owner.playsound_local(owner, 'sound/magic/magic_missile.ogg', 50, TRUE) flash_color(owner, flash_color = "#AF0AAF", flash_time = 25) else to_chat(owner, "There is no Ark!") //Warps to the Station /datum/action/innate/eminence/station_jump name = "Warp to Station" desc = "Warps to Space Station 13. You cannot hear anything while there!" button_icon_state = "warp_down" /datum/action/innate/eminence/station_jump/Activate() if(owner.z == ZLEVEL_CITYOFCOGS) owner.forceMove(get_turf(pick(GLOB.generic_event_spawns))) owner.playsound_local(owner, 'sound/magic/magic_missile.ogg', 50, TRUE) flash_color(owner, flash_color = "#AF0AAF", flash_time = 25) else to_chat(owner, "You're already on the station!") //A quick-use button for recalling the servants to the Ark /datum/action/innate/eminence/mass_recall name = "Mass Recall" desc = "Initiates a mass recall, warping all servants to the Ark after a short delay. This can only be used once." button_icon_state = "Spatial Gateway" /datum/action/innate/eminence/mass_recall/IsAvailable() . = ..() if(.) var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G) return G.recalls_remaining && !G.recalling return FALSE /datum/action/innate/eminence/mass_recall/Activate() var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G && !G.recalling && G.recalls_remaining) if(alert(owner, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(owner) || QDELETED(G) || !G.obj_integrity) return G.initiate_mass_recall()