Move faction exception and everything it needs to shared (#25154)
* move faction prototype to shared * move faction exception and member stuff to shared * fix breaking changes for random stuff * move pettable friend stuff to shared * mostly fix * final fixy * dragonops * final fixy II * use querys and fix warpspeed fish (probably) * fixer * Rrrr! --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
32
Content.Shared/NPC/Prototypes/NpcFactionPrototype.cs
Normal file
32
Content.Shared/NPC/Prototypes/NpcFactionPrototype.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.NPC.Prototypes;
|
||||
|
||||
/// <summary>
|
||||
/// Contains data about this faction's relations with other factions.
|
||||
/// </summary>
|
||||
[Prototype("npcFaction")]
|
||||
public sealed partial class NpcFactionPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField]
|
||||
public List<ProtoId<NpcFactionPrototype>> Friendly = new();
|
||||
|
||||
[DataField]
|
||||
public List<ProtoId<NpcFactionPrototype>> Hostile = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cached data for the faction prototype. Is modified at runtime, whereas the prototype is not.
|
||||
/// </summary>
|
||||
public record struct FactionData
|
||||
{
|
||||
[ViewVariables]
|
||||
public HashSet<ProtoId<NpcFactionPrototype>> Friendly;
|
||||
|
||||
[ViewVariables]
|
||||
public HashSet<ProtoId<NpcFactionPrototype>> Hostile;
|
||||
}
|
||||
Reference in New Issue
Block a user