Rename Faction to NpcFaction (#18079)
This commit is contained in:
@@ -4,14 +4,14 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Server.NPC.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[Access(typeof(FactionSystem))]
|
||||
public sealed class FactionComponent : Component
|
||||
[Access(typeof(NpcFactionSystem))]
|
||||
public sealed class NpcFactionMemberComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Factions this entity is a part of.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite),
|
||||
DataField("factions", customTypeSerializer:typeof(PrototypeIdHashSetSerializer<FactionPrototype>))]
|
||||
DataField("factions", customTypeSerializer:typeof(PrototypeIdHashSetSerializer<NpcFactionPrototype>))]
|
||||
public HashSet<string> Factions = new();
|
||||
|
||||
/// <summary>
|
||||
@@ -1,23 +1,22 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
||||
|
||||
namespace Content.Server.NPC.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains data about this faction's relations with other factions.
|
||||
/// </summary>
|
||||
[Prototype("faction")]
|
||||
public sealed class FactionPrototype : IPrototype
|
||||
[Prototype("npcFaction")]
|
||||
public sealed class NpcFactionPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("friendly", customTypeSerializer:typeof(PrototypeIdListSerializer<FactionPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("friendly", customTypeSerializer:typeof(PrototypeIdListSerializer<NpcFactionPrototype>))]
|
||||
public List<string> Friendly = new();
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("hostile", customTypeSerializer:typeof(PrototypeIdListSerializer<FactionPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("hostile", customTypeSerializer:typeof(PrototypeIdListSerializer<NpcFactionPrototype>))]
|
||||
public List<string> Hostile = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user