Mind ecs (#14412)
This commit is contained in:
@@ -13,6 +13,12 @@ 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<MindContainerComponent>(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);
|
||||
|
||||
@@ -20,7 +26,7 @@ public sealed class MakeSentient : ReagentEffect
|
||||
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))
|
||||
if (entityManager.HasComponent<MindContainerComponent>(uid))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user