restructure cognizine effect so creatures that have minds can talk (#14695)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-03-20 00:47:06 +00:00
committed by GitHub
parent 8871078b33
commit df98091580

View File

@@ -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
// 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<ReplacementAccentComponent>(uid);
// Monke talk. This makes cognizine a cure to AMIV's long term damage funnily enough, do with this information what you will.
entityManager.RemoveComponent<MonkeyAccentComponent>(uid);
// This makes it so it doesn't add a ghost role to things that are already sentient
if (entityManager.HasComponent<MindComponent>(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<ReplacementAccentComponent>(uid);
// Monke talk
entityManager.RemoveComponent<MonkeyAccentComponent>(uid);
// No idea what anything past this point does
if (entityManager.TryGetComponent(uid, out GhostTakeoverAvailableComponent? takeOver))
{