Mind ecs (#14412)
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Content.Server.Mind.Commands
|
||||
|
||||
public static void MakeSentient(EntityUid uid, IEntityManager entityManager, bool allowMovement = true, bool allowSpeech = true)
|
||||
{
|
||||
entityManager.EnsureComponent<MindComponent>(uid);
|
||||
entityManager.EnsureComponent<MindContainerComponent>(uid);
|
||||
if (allowMovement)
|
||||
{
|
||||
entityManager.EnsureComponent<InputMoverComponent>(uid);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Content.Server.Mind.Commands
|
||||
}
|
||||
|
||||
var builder = new StringBuilder();
|
||||
builder.AppendFormat("player: {0}, mob: {1}\nroles: ", mind.UserId, mind.OwnedComponent?.Owner);
|
||||
builder.AppendFormat("player: {0}, mob: {1}\nroles: ", mind.UserId, mind.OwnedEntity);
|
||||
foreach (var role in mind.AllRoles)
|
||||
{
|
||||
builder.AppendFormat("{0} ", role.Name);
|
||||
|
||||
@@ -48,7 +48,7 @@ public sealed class RenameCommand : IConsoleCommand
|
||||
|
||||
var entSysMan = IoCManager.Resolve<IEntitySystemManager>();
|
||||
|
||||
if (entMan.TryGetComponent(entityUid, out MindComponent? mind) && mind.Mind != null)
|
||||
if (entMan.TryGetComponent(entityUid, out MindContainerComponent? mind) && mind.Mind != null)
|
||||
{
|
||||
// Mind
|
||||
mind.Mind.CharacterName = name;
|
||||
|
||||
Reference in New Issue
Block a user