[feat] Custom name for clown, mime and borgs

This commit is contained in:
rhailrake
2023-05-04 13:44:24 +06:00
committed by Aviu00
parent f04400926e
commit 68e52f60c9
18 changed files with 3124 additions and 43 deletions

View File

@@ -64,6 +64,15 @@ namespace Content.Shared.Mind
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public string? CharacterName { get; set; }
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public string? ClownName { get; set; }
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public string? MimeName { get; set; }
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public string? BorgName { get; set; }
/// <summary>
/// The time of death for this Mind.
/// Can be null - will be null if the Mind is not considered "dead".

View File

@@ -184,12 +184,15 @@ public abstract class SharedMindSystem : EntitySystem
return null;
}
public Entity<MindComponent> CreateMind(NetUserId? userId, string? name = null)
public Entity<MindComponent> CreateMind(NetUserId? userId, string? name = null, string? clownName = null, string? mimeName = null, string? borgName = null)
{
var mindId = Spawn(null, MapCoordinates.Nullspace);
_metadata.SetEntityName(mindId, name == null ? "mind" : $"mind ({name})");
var mind = EnsureComp<MindComponent>(mindId);
mind.CharacterName = name;
mind.ClownName = clownName;
mind.MimeName = mimeName;
mind.BorgName = borgName;
SetUserId(mindId, userId, mind);
return (mindId, mind);