Skip to content

Commit

Permalink
Update TraitSystem.Functions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Nov 7, 2024
1 parent e0d3420 commit 86899db
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Content.Server/Traits/TraitSystem.Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Content.Server.Traits;
[UsedImplicitly]
public sealed partial class TraitReplaceComponent : TraitFunction
{
[AlwaysPushInheritance]
[DataField, AlwaysPushInheritance]
public ComponentRegistry Components { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
Expand Down Expand Up @@ -47,7 +47,7 @@ public override void OnPlayerSpawn(EntityUid uid,
[UsedImplicitly]
public sealed partial class TraitAddComponent : TraitFunction
{
[AlwaysPushInheritance]
[DataField, AlwaysPushInheritance]
public ComponentRegistry Components { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
Expand All @@ -71,7 +71,7 @@ public override void OnPlayerSpawn(EntityUid uid,
[UsedImplicitly]
public sealed partial class TraitRemoveComponent : TraitFunction
{
[AlwaysPushInheritance]
[DataField, AlwaysPushInheritance]
public ComponentRegistry Components { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
Expand All @@ -90,7 +90,7 @@ public override void OnPlayerSpawn(EntityUid uid,
[UsedImplicitly]
public sealed partial class TraitAddActions : TraitFunction
{
[AlwaysPushInheritance]
[DataField, AlwaysPushInheritance]
public List<EntProtoId>? Actions { get; private set; } = default!;

public override void OnPlayerSpawn(EntityUid uid,
Expand Down Expand Up @@ -119,6 +119,7 @@ public override void OnPlayerSpawn(EntityUid uid,
public sealed partial class TraitAddImplant : TraitFunction
{
[DataField(customTypeSerializer: typeof(PrototypeIdHashSetSerializer<EntityPrototype>))]
[AlwaysPushInheritance]
public HashSet<string> Implants { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
Expand All @@ -138,7 +139,7 @@ public override void OnPlayerSpawn(EntityUid uid,
[UsedImplicitly]
public sealed partial class TraitAddPsionics : TraitFunction
{
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? PsionicPowers { get; private set; } = default!;

public override void OnPlayerSpawn(EntityUid uid,
Expand Down Expand Up @@ -166,25 +167,25 @@ public sealed partial class TraitModifyLanguages : TraitFunction
/// <summary>
/// The list of all Spoken Languages that this trait adds.
/// </summary>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? LanguagesSpoken { get; private set; } = default!;

/// <summary>
/// The list of all Understood Languages that this trait adds.
/// </summary>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? LanguagesUnderstood { get; private set; } = default!;

/// <summary>
/// The list of all Spoken Languages that this trait removes.
/// </summary>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? RemoveLanguagesSpoken { get; private set; } = default!;

/// <summary>
/// The list of all Understood Languages that this trait removes.
/// </summary>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? RemoveLanguagesUnderstood { get; private set; } = default!;

public override void OnPlayerSpawn(EntityUid uid,
Expand Down Expand Up @@ -222,7 +223,7 @@ public sealed partial class TraitAddMoodlets : TraitFunction
/// <summary>
/// The list of all Moodlets that this trait adds.
/// </summary>
[DataField]
[DataField, AlwaysPushInheritance]
public List<ProtoId<MoodEffectPrototype>>? MoodEffects { get; private set; } = default!;

public override void OnPlayerSpawn(EntityUid uid,
Expand Down Expand Up @@ -253,7 +254,7 @@ public sealed partial class TraitModifyFactions : TraitFunction
/// <remarks>
/// I can't actually Validate these because the proto lives in Shared.
/// </remarks>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? RemoveFactions { get; private set; } = default!;

/// <summary>
Expand All @@ -262,7 +263,7 @@ public sealed partial class TraitModifyFactions : TraitFunction
/// <remarks>
/// I can't actually Validate these because the proto lives in Shared.
/// </remarks>
[DataField]
[DataField, AlwaysPushInheritance]
public List<string>? AddFactions { get; private set; } = default!;

public override void OnPlayerSpawn(EntityUid uid,
Expand Down

0 comments on commit 86899db

Please sign in to comment.