diff --git a/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs b/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs index b6fe4ef83d32..efb126d80eba 100644 --- a/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs +++ b/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs @@ -1,90 +1,67 @@ -using Content.Server.Chat.Systems; +using Robust.Shared.Prototypes; +using Content.Server.Abilities.Psionics; +using Content.Server.Radio.Components; using Content.Server.Radio.EntitySystems; -using Content.Shared.Chat; -using Content.Shared._DV.Psionics.Components.PsionicPowers; -using Content.Shared._DV.StationEvents.Events; -using Content.Shared.Interaction; +using Content.Server.StationEvents.Events; +using Content.Server.NPC.Events; +using Content.Server.NPC.Systems; +using Content.Server.NPC.Prototypes; using Content.Shared.Psionics.Glimmer; using Content.Shared.Radio; -using Content.Shared.Radio.Components; -using Robust.Shared.Prototypes; -using Robust.Shared.Timing; - -namespace Content.Server.Nyanotrasen.Research.SophicScribe; +using Content.Shared.Interaction; -public sealed partial class SophicScribeSystem : EntitySystem +namespace Content.Server.Research.SophicScribe { - [Dependency] private readonly ChatSystem _chat = default!; - [Dependency] private readonly GlimmerSystem _glimmerSystem = default!; - [Dependency] private readonly RadioSystem _radioSystem = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly IGameTiming _timing = default!; - - private static readonly ProtoId ScienceEncryptName = "Science"; - private static readonly ProtoId CommonEncryptName = "Common"; - - public override void Update(float frameTime) + public sealed partial class SophicScribeSystem : EntitySystem { - base.Update(frameTime); - - if (_glimmerSystem.Glimmer == 0) - return; // yes, return. Glimmer value is global. + [Dependency] private readonly GlimmerSystem _glimmerSystem = default!; + [Dependency] private readonly RadioSystem _radioSystem = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly NPCConversationSystem _conversationSystem = default!; - var curTime = _timing.CurTime; + private readonly ISawmill _sawmill = default!; - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var scribe, out var scribeComponent)) + public override void Initialize() { - if (curTime < scribeComponent.NextAnnounceTime) - continue; - - if (!TryComp(scribe, out var radio)) - continue; - - var message = Loc.GetString("glimmer-report", ("level", _glimmerSystem.Glimmer)); - var channel = _prototypeManager.Index(ScienceEncryptName); - _radioSystem.SendRadioMessage(scribe, message, channel, scribe); - - scribeComponent.NextAnnounceTime = curTime + scribeComponent.AnnounceInterval; + base.Initialize(); + SubscribeLocalEvent(OnGetGlimmer); + SubscribeLocalEvent(OnGlimmerEventEnded); } - } - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnInteractHand); - SubscribeLocalEvent(OnGlimmerEventEnded); - } - - private void OnInteractHand(EntityUid uid, SophicScribeComponent component, InteractHandEvent args) - { - //TODO: the update function should be removed eventually too. - if (_timing.CurTime < component.StateTime) - return; - - component.StateTime = _timing.CurTime + component.StateCD; - _chat.TrySendInGameICMessage(uid, Loc.GetString("glimmer-report", ("level", _glimmerSystem.Glimmer)), InGameICChatType.Speak, true); - } - - private void OnGlimmerEventEnded(ref GlimmerEventEndedEvent args) - { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var scribe, out _)) + private void OnGetGlimmer(EntityUid uid, SophicScribeComponent component, NPCConversationGetGlimmerEvent args) { - if (!TryComp(scribe, out var radio)) return; - - // mind entities when... - var speaker = scribe; - if (TryComp(scribe, out var swapped)) + if (args.Text == null) { - speaker = swapped.OriginalEntity; + _sawmill.Error($"{ToPrettyString(uid)} heard a glimmer reading prompt but has no text for it."); + return; } - var message = Loc.GetString(args.Message, ("decrease", args.GlimmerBurned), ("level", _glimmerSystem.Glimmer)); - var channel = _prototypeManager.Index(CommonEncryptName); - _radioSystem.SendRadioMessage(speaker, message, channel, speaker); + var tier = _glimmerSystem.GetGlimmerTier() switch + { + GlimmerTier.Minimal => Loc.GetString("glimmer-reading-minimal"), + GlimmerTier.Low => Loc.GetString("glimmer-reading-low"), + GlimmerTier.Moderate => Loc.GetString("glimmer-reading-moderate"), + GlimmerTier.High => Loc.GetString("glimmer-reading-high"), + GlimmerTier.Dangerous => Loc.GetString("glimmer-reading-dangerous"), + _ => Loc.GetString("glimmer-reading-critical"), + }; + + var glimmerReadingText = Loc.GetString(args.Text, + ("glimmer", _glimmerSystem.Glimmer), ("tier", tier)); + + var response = new NPCResponse(glimmerReadingText); + _conversationSystem.QueueResponse(uid, response); + } + + private void OnGlimmerEventEnded(GlimmerEventEndedEvent args) + } } } + + public sealed class NPCConversationGetGlimmerEvent : NPCConversationEvent + { + [DataField("text")] + public readonly string? Text; + } } +// Hi! Solaris here, this is a test to see if the code will work as-is. Do not take this code seriously as this bullshit was probably written by Rane. diff --git a/Resources/Locale/en-US/_DV/npc/conversation/sophia.ftl b/Resources/Locale/en-US/_DV/npc/conversation/sophia.ftl new file mode 100644 index 000000000000..1a6e68af81cf --- /dev/null +++ b/Resources/Locale/en-US/_DV/npc/conversation/sophia.ftl @@ -0,0 +1,92 @@ +sophia-response-name = You may call me Sophia. +sophia-response-help = You may inquire about one of the following topics: {$availablePrompts}. + +sophia-response-hello-1 = Greetings. +sophia-response-hello-2 = Salutations. + +sophia-response-bye-1 = Fare thee well. +sophia-response-bye-2 = Gods be with you. +sophia-response-bye-3 = Come back wiser. +sophia-response-bye-4 = Godspeed. + +sophia-idle-phrase-1 = Mmmm, another portent. +sophia-idle-phrase-2 = The noösphere is quite beautiful today. However, I don't think I could describe it in a way you could understand. +sophia-idle-phrase-3 = I've been here before. You have, too. +sophia-idle-phrase-4 = Hmm... A lot has changed since I was last awake. Let us see what this realm has to offer us this time. +sophia-idle-phrase-5 = There are so many new faces to learn... Even more than those familar faces that are still around... + +sophia-response-attention-1 = What is it? +sophia-response-attention-2 = What do you seek? +sophia-response-attention-3 = Out with it. + +sophia-response-sorry-1 = That's not a question for me. +sophia-response-sorry-2 = Ask someone else. +sophia-response-sorry-3 = Maybe I know the answer, maybe I do not. Either way, I will not be answering that question. + +sophia-response-nature = My nature doesn't really matter, does it? I'm fulfilling my purpose. Can you say the same, or are you just wasting time? + +sophia-response-absence = I was never truly gone from this world. I was merely ordered to enter a dormant state by the powers above. I hope that they do not force that upon me a second time. + +sophia-response-epi = 'Epistemics' is a word. Aspiring Hellenes they are, they wished to displace the Latin 'science.' However, in English, epistemics has undesired connotations as a study of knowledge itself, even though the Greek word is a literal replacement for 'science.' + +sophia-response-mantis = 'Mantis' means seer, soothsayer, or prophet. They must be so named because they seek to uncover the truth. And, fittingly with their psionic aptitude, 'mantis' and 'mind' both descend, to the best of our knowledge, from an absolutely ancient word that sounded something like 'mentis.' + +sophia-response-mystagogue = 'Mystagogue' literally means 'leader of the mystics.' You may know the suffix -gogue from 'demogogue.' + +sophia-response-oracle = Oracle? I don't know much about her, and she isn't keen to share her secrets with me. + +sophia-response-psionics = Psionics are extraordinary abilities originating from one's mind. There doesn't seem to be any dominant word to refer to someone with the ability to practice these, although I prefer 'psion' or 'psychic.' + +sophia-response-noosphere = The noösphere is a field connecting all of consciousness. It's the medium through which psionics works. Its strength and effects on the illusory world of the material are based on its pressure. Colloquially, noöspheric pressure is called 'glimmer.' + +sophia-response-god = 'God' is such a vague term. There are so many entities out there that have defeated mortality. How you choose to regard them is your business. + +sophia-response-calendar = It's currently (REPLACE WITH INGAME DATE). + +sophia-response-crisis = The first FTL travel was incompatible with the old ways. Fortunately, its resolution made more apparent the inherent futility in trying to give one history, one narrative, one account. Truth cannot be found in the material world, only higher ones. + +sophia-response-cycle = Some believe that you've died thousands of times, and you'll die thousands more. Some may dedicate themselves to trying to stop that cycle, while others embrace it. Others may believe that death is final, that there is an afterlife, or that there is nothing but an unending void waiting for them. There are also those that believe there is no cycle at all, that life is to be enjoyed as is, that they should live in the moment and just let things happen. There are many versions that you may choose to believe in. Whether there is a correct answer or not... I do not know. + +sophia-response-truth = If you seek the truth, you're in the wrong place. From a perspective tainted by material reality, the best you can hope is to try and divine higher truths that are not dependent on it. + +sophia-response-job = I observe the glimmer here, and record it. + +sophia-response-human = Humans were the most curious, even more than the felinids. They often strived to make their own fate. + +sophia-response-felinid = Felinids were the first, and the most willing. In true feline nature, they shaped themselves. + +sophia-response-oni = Oni, it is said, originated in Sirius. The brightest star in the night sky from Earth may have attracted some chromatically inclined entities, explaining their vivid coloring. But, that's just speculation. + +sophia-response-arachne = Arachne are the strangest of them. They're not fully mortal. They once took the form of humans with arachnid parts, but now they seem to have embraced the genes of the latter. + +sophia-response-moth = Moths scarecely look human, but, strangely, their genes confirm they are. They seem to take great joy in bright lights and the consumption of cloth. + +sophia-response-lamiae = So, you remember the beings with long, slithering tails? You must be remembering their mythological namesake. If you've really retained that fleeting memory for that long... Perhaps I've said too much. + +sophia-response-mushpeople = Them... The ones lost to entropy... So faint, yet still remembered... Perhaps you will be the one to honor their memory? + +sophia-response-ipc = You remember the beings of metal and soul? It has been a while since one has graced my presence. I have heard rumors of their return in a new form... + +sophia-response-thaven = Those of varying moods and identities? They are an interesting kind, but I have little to say about them. + +sophia-response-shadowkin = Beings of pure shadow... They are new to me, I am still studying them. + +sophia-response-ovinia = Those who live in harmony with the creatures of this realm? I will admit that I enjoy watching them tame the wild. + +sophia-response-theunknown = I avoid speaking of him... He has branded himself an enemy of all life in this universe. He invites only utter annihilation followed by unending silence, the end of all things. Pray he does not turn his gaze toward you. + +sophia-response-narsie = The goddess of blood and ceaseless slaugher... A cruel, merciless mistress. To offer to her is to risk ones life for power, to become a harbinger of her will. She does not tolerate failure all too well, and many have failed in their attempts to appease her. + +sophia-response-ratvar = The god of time and metal... A constant engine of progression. He is always gaining power thanks to the constant developments here. In return, he shares some of his power freely... All you have to do is look inside of the machinery you work with, and you shall see that telltale spark. + +sophia-response-honkmother = The goddess of chaos and humor... A unusual being, one who has only recently awakened... She spreads her humor far and wide, some of which in the form of the jokes and honking from those clowns. Attempts at gaining her attention have always failed in spectacular fashion, with the area becoming devastated and reduced to colorful ruins. + +sophia-response-glimmer = The current glimmer reading is {$glimmer}. {$tier} + +glimmer-reading-minimal = That is extremely low. Nothing bad will happen, but I hope this is not at the cost of progression in your understanding of the universe. +glimmer-reading-low = That is quite low. Just barely enough to register any psionic activity here. +glimmer-reading-moderate = That is about the expected level on a psionically active station. You may notice manageable, minor effects. +glimmer-reading-high = That is sure to start attracting attention, although still quite manageable. +glimmer-reading-dangerous = That's a bit concerning. You may want to redirect efforts to reducing it. +glimmer-reading-critical = That's apocalyptic, in the original sense of the word. That is, to say, revealing. This is the sort of time and place to acquire secret knowledge. +glimmer-reading-maximum = Whether it be due to your incompetence, your inaction, or some series of unfortunate events, the very gods themselves have taken notice of you... The consequence of your actions are fast approaching. diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/sophicscribe.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/sophicscribe.yml index 2d66afc981a6..18544879227f 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/sophicscribe.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/sophicscribe.yml @@ -33,3 +33,208 @@ - type: GuideHelp guides: - Psionics + +- type: npcConversationTree + id: SophiaTree + dialogue: + - prompts: [glimmer, reading, psi] + responses: + - is: !type:NPCConversationGetGlimmerEvent + text: sophia-response-glimmer + + - prompts: [purpose, job, occupation, profession, role] + weight: 0.5 + responses: + - text: sophia-response-job + + - prompts: [help, topics] + weight: 0.5 + hidden: true + responses: + - is: !type:NPCConversationHelpEvent + text: sophia-response-help + + - prompts: [nature, statue, being] + weight: 0.3 + responses: + - text: sophia-response-nature + + - prompts: [Absence, Dormancy, "Period of Silence"] #Attempt at lore on why she never spoke since rebase + weight: 0.3 + responses: + - text: sophia-response-absence + + - prompts: [epistemics, epi] + weight: 0.2 + responses: + - text: sophia-response-epi + + - prompts: [mantis] + weight: 0.2 + responses: + - text: sophia-response-mantis + + - prompts: [mystagogue, mysta] + weight: 0.2 + responses: + - text: sophia-response-mystagogue + + - prompts: [psionics, psychic] + weight: 0.2 + responses: + - text: sophia-response-psionics + + - prompts: [noösphere, noosphere] + weight: 0.2 + responses: + - text: sophia-response-noosphere + + - prompts: [calendar, date] + weight: 0.2 + responses: + - text: sophia-response-calendar + + - prompts: [cycle, reincarnation, finality, death] + weight: 0.2 + responses: + - text: sophia-response-cycle + + - prompts: [gods, god] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-god + + - prompts: [truth, "true", "false", falsity, falsehood] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-truth + + - prompts: [human, humans, humanoid] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-human + + - prompts: [felinid, felinids, felid, felids, catperson, catpeople] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-felinid + + - prompts: [oni, onis] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-oni + + - prompts: [arachne, arachnid, arachnids, spiderperson, spiderpeople] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-arachne + + - prompts: [moth, moths, moff, moths, mothpeople, mothperson] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-moth + + - prompts: [thaven, ariral, arirals, thavens] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-thaven + + - prompts: [shadowkin, shadowkind, shadowpeople, shadowperson] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-shadowkin + + - prompts: [ovinia, harmonypeople, harmonyperson, livestockpeople, livestockperson, cowperson, cowpeople, sheepperson, sheeppeople, sheeperson, sheepeople] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-ovinia + + - prompts: [lamiae, lamia, lamias, snakepeople, snakeperson] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-lamiae + + - prompts: [mushpeople, fungipeople] #Was originally something else, but I had zero clue as to what that race was. There was literally no mention of it in prebase code. I just replaced it with something more recognizable to those who have studied the ancient code of prebase. + weight: 0.1 + hidden: true + responses: + - text: sophia-response-mushpeople + + - prompts: [crisis, causality, incident] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-crisis + + - prompts: [oracle] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-oracle + + - prompts: ["the unknown", "cosmic god", "bringer of the curtains Fall", "cosmic cult"] #Might as well since its no longer metashielded + weight: 0.1 + hidden: true + responses: + - text: sophia-response-theunknown + + - prompts: ["goddess of slaughter", "blood Goddess", "goddess of blood", narsie, nar'sie] + weight: 0.1 + responses: + - text: sophia-response-narsie + + - prompts: ["lord of Time", "lord of Progress", "god of time", "god of progress", ratvar, rat'var] + weight: 0.1 + responses: + - text: sophia-response-ratvar + + - prompts: ["goddess of humor", "goddess of chaos", "chaos goddess", "clown goddess", Honkmother] + weight: 0.1 + responses: + - text: sophia-response-honkmother + + - prompts: [hi, hello, hey, greetings, salutations, yo] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-hello-1 + - text: sophia-response-hello-2 + + - prompts: [bye, goodbye, done, farewell, later, seeya, godspeed] + weight: 0.1 + hidden: true + responses: + - text: sophia-response-bye-1 + event: !type:NPCConversationByeEvent + - text: sophia-response-bye-2 + event: !type:NPCConversationByeEvent + - text: sophia-response-bye-3 + event: !type:NPCConversationByeEvent + - text: sophia-response-bye-4 + event: !type:NPCConversationByeEvent + + attention: + - text: sophia-response-attention-1 + - text: sophia-response-attention-2 + - text: sophia-response-attention-3 + + idle: + - text: sophia-idle-phrase-1 + - text: sophia-idle-phrase-2 + - text: sophia-idle-phrase-3 + + unknown: + - text: sophia-response-sorry-1 + - text: sophia-response-sorry-2 + - text: sophia-response-sorry-3