Skip to content

Commit

Permalink
pythia_talk
Browse files Browse the repository at this point in the history
Both local versions, dependent processes and an admin command to speak as it manually.
  • Loading branch information
silencer-pl committed Feb 29, 2024
1 parent 23ad1ba commit 001a180
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
41 changes: 41 additions & 0 deletions code/game/objects/structures/sectorpatrol/endpoint/005.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//Crypt Pythia Sequence

/obj/structure/machinery/light/marker/admin/pythia
name = "voice"
var/pythia_talk

/obj/structure/machinery/light/marker/admin/pythia/proc/pythiasay(str)
pythia_talk = "[str]"
if(pythia_talk == null) return
sleep (rand(1,10))
talkas("[pythia_talk]")
return



/obj/structure/eventterminal/puzzle05/testament_of_sacrifice
name = "synthetic frame"
desc = "A female looking synthetic frame in what seems to be a white toga, sitting motionless on a chair. You see several wires protruding from its arms linked to the computers around it. Black crystals form out of its eyes and run down its cheeks. It looks offline. A purple upsilon letter is tattooed on the frame's forehead."
desc_lore = "While the frame itself is an unknown, the purple upsilon logo is reminiscent of the Upsilon Research Center, a Weyland-Yutani group specializing in artificial intelligence research. Its hard to recall much about them beyond that fact that supposedly they vanished from the Neroid Sector right as Weyland-Yutani was starting their Mercy initiative."
langchat_color = "#b10f5a"
var/pythia_talk

/obj/structure/eventterminal/puzzle05/testament_of_sacrifice/proc/pythiadelay()
if (pythia_talk == null) return
if ((length("[pythia_talk]")) <= 64)
pythia_talk = null
sleep(40)
return
if ((length("[pythia_talk]")) > 64)
pythia_talk = null
sleep(60)
return

/obj/structure/eventterminal/puzzle05/testament_of_sacrifice/proc/pythiasay(str)
pythia_talk = "[str]"
if(pythia_talk == null) return
talkas(pythia_talk)
for(var/obj/structure/machinery/light/marker/admin/pythia/M in world)
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/light/marker/admin/pythia, pythiasay), pythia_talk)
pythiadelay()
return
17 changes: 17 additions & 0 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1055,3 +1055,20 @@
return FALSE
show_blurb(GLOB.player_list, duration, message, TRUE, "center", "center", "#bd2020", "ADMIN")
message_admins("[key_name(usr)] sent an admin blurb alert to all players. Alert reads: '[message]' and lasts [(duration / 10)] seconds.")

/client/proc/cmd_admin_pythia_say() // Checks for a Pythia reciever and talks as it and any of its voices.
set name = "Speak As Pythia"
set category = "Admin.Events"

if (!admin_holder || !(admin_holder.rights & R_MOD))
to_chat(src, "Only administrators may use this command.")
return

for (var/obj/structure/eventterminal/puzzle05/testament_of_sacrifice/T in world)
if(!T)
to_chat(usr, SPAN_WARNING("Error: Pythia reciever not spawned. Cannot pass say."))
return
var/pythia_say = tgui_input_text(src, "What to say as Pythia and its voices.", "Pythia Say Text", max_length = MAX_BOOK_MESSAGE_LEN, multiline = TRUE, encode = FALSE, timeout = 0)
if(!pythia_say) return
T.pythiasay(pythia_say)
return
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@
#include "code\game\objects\structures\sectorpatrol\endpoint\002.dm"
#include "code\game\objects\structures\sectorpatrol\endpoint\003.dm"
#include "code\game\objects\structures\sectorpatrol\endpoint\004.dm"
#include "code\game\objects\structures\sectorpatrol\endpoint\005.dm"
#include "code\game\objects\structures\sectorpatrol\searchable\search_structures.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
Expand Down

0 comments on commit 001a180

Please sign in to comment.