From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Mon, 20 Mar 2023 00:47:06 +0000 (+0000) Subject: restructure cognizine effect so creatures that have minds can talk (#14695) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=df980915808dba3a89bc3a49d6f92287ebd0771e;p=space-station-14.git restructure cognizine effect so creatures that have minds can talk (#14695) Co-authored-by: deltanedas <@deltanedas:kde.org> --- diff --git a/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs b/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs index c98f838761..c762ba8a83 100644 --- a/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs +++ b/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs @@ -13,18 +13,18 @@ public sealed class MakeSentient : ReagentEffect var entityManager = args.EntityManager; var uid = args.SolutionEntity; - // This makes it so it doesn't affect things that are already sentient - if (entityManager.HasComponent(uid)) - { - return; - } - // This piece of code makes things able to speak "normally". One thing of note is that monkeys have a unique accent and won't be affected by this. entityManager.RemoveComponent(uid); - // Monke talk + // Monke talk. This makes cognizine a cure to AMIV's long term damage funnily enough, do with this information what you will. entityManager.RemoveComponent(uid); + // This makes it so it doesn't add a ghost role to things that are already sentient + if (entityManager.HasComponent(uid)) + { + return; + } + // No idea what anything past this point does if (entityManager.TryGetComponent(uid, out GhostTakeoverAvailableComponent? takeOver)) {