From 541eb417e34600a0e66f9f337c9d143dcef61729 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:51:52 +1200 Subject: [PATCH] Rename Faction to NpcFaction (#18079) --- Content.Client/Entry/EntryPoint.cs | 2 +- .../Rules/Components/NukeopsRuleComponent.cs | 2 +- .../GameTicking/Rules/NukeopsRuleSystem.cs | 10 ++-- .../GameTicking/Rules/TraitorRuleSystem.cs | 6 +-- ...ponent.cs => NpcFactionMemberComponent.cs} | 6 +-- ...ionPrototype.cs => NpcFactionPrototype.cs} | 9 ++-- .../NPC/Systems/NPCSteeringSystem.Context.cs | 4 +- .../NPC/Systems/NPCSteeringSystem.cs | 2 +- .../NPC/Systems/NPCUtilitySystem.cs | 4 +- .../{FactionSystem.cs => NpcFactionSystem.cs} | 46 +++++++++---------- .../Prototypes/Entities/Mobs/NPCs/animals.yml | 28 +++++------ .../Entities/Mobs/NPCs/behonker.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/carp.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/flesh.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/human.yml | 4 +- .../Prototypes/Entities/Mobs/NPCs/mimic.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/pets.yml | 6 +-- .../Entities/Mobs/NPCs/regalrat.yml | 4 +- .../Prototypes/Entities/Mobs/NPCs/silicon.yml | 2 +- .../Entities/Mobs/NPCs/simplemob.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/slimes.yml | 8 ++-- .../Prototypes/Entities/Mobs/NPCs/space.yml | 2 +- .../Entities/Mobs/NPCs/spacetick.yml | 2 +- .../Prototypes/Entities/Mobs/NPCs/xeno.yml | 4 +- .../Entities/Mobs/Player/arachnid.yml | 2 +- .../Prototypes/Entities/Mobs/Player/diona.yml | 2 +- .../Entities/Mobs/Player/dragon.yml | 2 +- .../Prototypes/Entities/Mobs/Player/dwarf.yml | 2 +- .../Entities/Mobs/Player/familiars.yml | 4 +- .../Prototypes/Entities/Mobs/Player/human.yml | 6 +-- .../Entities/Mobs/Player/reptilian.yml | 2 +- .../Entities/Mobs/Player/skeleton.yml | 2 +- .../Prototypes/Entities/Mobs/Player/slime.yml | 2 +- .../Prototypes/Entities/Mobs/Player/vox.yml | 2 +- .../Entities/Objects/Weapons/Guns/turrets.yml | 10 ++-- .../Entities/Stations/nanotrasen.yml | 2 +- Resources/Prototypes/ai_factions.yml | 18 ++++---- 37 files changed, 108 insertions(+), 109 deletions(-) rename Content.Server/NPC/Components/{FactionComponent.cs => NpcFactionMemberComponent.cs} (84%) rename Content.Server/NPC/Components/{FactionPrototype.cs => NpcFactionPrototype.cs} (65%) rename Content.Server/NPC/Systems/{FactionSystem.cs => NpcFactionSystem.cs} (81%) diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index 3b7baa0a48..860b1634ad 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -109,7 +109,7 @@ namespace Content.Client.Entry _prototypeManager.RegisterIgnore("htnPrimitive"); _prototypeManager.RegisterIgnore("gameMap"); _prototypeManager.RegisterIgnore("gameMapPool"); - _prototypeManager.RegisterIgnore("faction"); + _prototypeManager.RegisterIgnore("npcFaction"); _prototypeManager.RegisterIgnore("lobbyBackground"); _prototypeManager.RegisterIgnore("advertisementsPack"); _prototypeManager.RegisterIgnore("metabolizerType"); diff --git a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs index 8b950f5ab7..f8f8b42ab6 100644 --- a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs @@ -119,7 +119,7 @@ public sealed class NukeopsRuleComponent : Component [DataField("operativePlayers")] public readonly Dictionary OperativePlayers = new(); - [DataField("faction", customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] + [DataField("faction", customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] public string Faction = default!; } diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index 358eb3b557..82f5e330fb 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -49,7 +49,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPlayerManager _playerSystem = default!; [Dependency] private readonly EmergencyShuttleSystem _emergency = default!; - [Dependency] private readonly FactionSystem _faction = default!; + [Dependency] private readonly NpcFactionSystem _npcFaction = default!; [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; [Dependency] private readonly StationSpawningSystem _stationSpawningSystem = default!; [Dependency] private readonly StationSystem _stationSystem = default!; @@ -181,9 +181,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem // we can only currently guarantee that NT stations are the only station to // exist in the base game. - var eligible = EntityQuery() + var eligible = EntityQuery() .Where(x => - _faction.IsFactionHostile(component.Faction, x.Item2.Owner, x.Item2)) + _npcFaction.IsFactionHostile(component.Faction, x.Item2.Owner, x.Item2)) .Select(x => x.Item1.Owner) .ToList(); @@ -712,8 +712,8 @@ public sealed class NukeopsRuleSystem : GameRuleSystem if (component.StartingGearPrototypes.TryGetValue(gear, out var gearPrototype)) _stationSpawningSystem.EquipStartingGear(mob, gearPrototype, profile); - _faction.RemoveFaction(mob, "NanoTrasen", false); - _faction.AddFaction(mob, "Syndicate"); + _npcFaction.RemoveFaction(mob, "NanoTrasen", false); + _npcFaction.AddFaction(mob, "Syndicate"); } private void SpawnOperatives(int spawnCount, List sessions, bool addSpawnPoints, NukeopsRuleComponent component) diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 5ba752dd12..b134bad703 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -31,7 +31,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem [Dependency] private readonly IObjectivesManager _objectivesManager = default!; [Dependency] private readonly IChatManager _chatManager = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly FactionSystem _faction = default!; + [Dependency] private readonly NpcFactionSystem _npcFaction = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly UplinkSystem _uplink = default!; [Dependency] private readonly SharedAudioSystem _audioSystem = default!; @@ -263,8 +263,8 @@ public sealed class TraitorRuleSystem : GameRuleSystem } // Change the faction - _faction.RemoveFaction(entity, "NanoTrasen", false); - _faction.AddFaction(entity, "Syndicate"); + _npcFaction.RemoveFaction(entity, "NanoTrasen", false); + _npcFaction.AddFaction(entity, "Syndicate"); // Give traitors their objectives var maxDifficulty = _cfg.GetCVar(CCVars.TraitorMaxDifficulty); diff --git a/Content.Server/NPC/Components/FactionComponent.cs b/Content.Server/NPC/Components/NpcFactionMemberComponent.cs similarity index 84% rename from Content.Server/NPC/Components/FactionComponent.cs rename to Content.Server/NPC/Components/NpcFactionMemberComponent.cs index 9ea3f75cad..1c54a550a2 100644 --- a/Content.Server/NPC/Components/FactionComponent.cs +++ b/Content.Server/NPC/Components/NpcFactionMemberComponent.cs @@ -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 { /// /// Factions this entity is a part of. /// [ViewVariables(VVAccess.ReadWrite), - DataField("factions", customTypeSerializer:typeof(PrototypeIdHashSetSerializer))] + DataField("factions", customTypeSerializer:typeof(PrototypeIdHashSetSerializer))] public HashSet Factions = new(); /// diff --git a/Content.Server/NPC/Components/FactionPrototype.cs b/Content.Server/NPC/Components/NpcFactionPrototype.cs similarity index 65% rename from Content.Server/NPC/Components/FactionPrototype.cs rename to Content.Server/NPC/Components/NpcFactionPrototype.cs index ddb6dd07eb..53794ac3c1 100644 --- a/Content.Server/NPC/Components/FactionPrototype.cs +++ b/Content.Server/NPC/Components/NpcFactionPrototype.cs @@ -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 { /// /// Contains data about this faction's relations with other factions. /// - [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))] + [ViewVariables(VVAccess.ReadWrite), DataField("friendly", customTypeSerializer:typeof(PrototypeIdListSerializer))] public List Friendly = new(); - [ViewVariables(VVAccess.ReadWrite), DataField("hostile", customTypeSerializer:typeof(PrototypeIdListSerializer))] + [ViewVariables(VVAccess.ReadWrite), DataField("hostile", customTypeSerializer:typeof(PrototypeIdListSerializer))] public List Hostile = new(); } } diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs index 4b221fd651..0f57965ae1 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs @@ -483,7 +483,7 @@ public sealed partial class NPCSteeringSystem var objectRadius = 0.25f; var detectionRadius = MathF.Max(0.35f, agentRadius + objectRadius); var ourVelocity = body.LinearVelocity; - var factionQuery = GetEntityQuery(); + var factionQuery = GetEntityQuery(); factionQuery.TryGetComponent(uid, out var ourFaction); foreach (var ent in _lookup.GetEntitiesInRange(uid, detectionRadius, LookupFlags.Dynamic)) @@ -496,7 +496,7 @@ public sealed partial class NPCSteeringSystem (mask & otherBody.CollisionLayer) == 0x0 && (layer & otherBody.CollisionMask) == 0x0 || !factionQuery.TryGetComponent(ent, out var otherFaction) || - !_faction.IsEntityFriendly(uid, ent, ourFaction, otherFaction) || + !_npcFaction.IsEntityFriendly(uid, ent, ourFaction, otherFaction) || // Use <= 0 so we ignore stationary friends in case. Vector2.Dot(otherBody.LinearVelocity, ourVelocity) <= 0f) { diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.cs index 9eea590705..42e4fa5d29 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.cs @@ -53,7 +53,7 @@ public sealed partial class NPCSteeringSystem : SharedNPCSteeringSystem [Dependency] private readonly DoAfterSystem _doAfter = default!; [Dependency] private readonly DoorSystem _doors = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly FactionSystem _faction = default!; + [Dependency] private readonly NpcFactionSystem _npcFaction = default!; [Dependency] private readonly PathfindingSystem _pathfindingSystem = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!; [Dependency] private readonly SharedMeleeWeaponSystem _melee = default!; diff --git a/Content.Server/NPC/Systems/NPCUtilitySystem.cs b/Content.Server/NPC/Systems/NPCUtilitySystem.cs index 8f681b5d8a..35621bd3ed 100644 --- a/Content.Server/NPC/Systems/NPCUtilitySystem.cs +++ b/Content.Server/NPC/Systems/NPCUtilitySystem.cs @@ -26,7 +26,7 @@ public sealed class NPCUtilitySystem : EntitySystem [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly ContainerSystem _container = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly FactionSystem _faction = default!; + [Dependency] private readonly NpcFactionSystem _npcFaction = default!; [Dependency] private readonly FoodSystem _food = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly PuddleSystem _puddle = default!; @@ -264,7 +264,7 @@ public sealed class NPCUtilitySystem : EntitySystem break; case NearbyHostilesQuery: - foreach (var ent in _faction.GetNearbyHostiles(owner, vision)) + foreach (var ent in _npcFaction.GetNearbyHostiles(owner, vision)) { entities.Add(ent); } diff --git a/Content.Server/NPC/Systems/FactionSystem.cs b/Content.Server/NPC/Systems/NpcFactionSystem.cs similarity index 81% rename from Content.Server/NPC/Systems/FactionSystem.cs rename to Content.Server/NPC/Systems/NpcFactionSystem.cs index ed86a2cb63..bfc4add577 100644 --- a/Content.Server/NPC/Systems/FactionSystem.cs +++ b/Content.Server/NPC/Systems/NpcFactionSystem.cs @@ -7,7 +7,7 @@ namespace Content.Server.NPC.Systems; /// /// Outlines faction relationships with each other. /// -public sealed class FactionSystem : EntitySystem +public sealed class NpcFactionSystem : EntitySystem { [Dependency] private readonly FactionExceptionSystem _factionException = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; @@ -24,7 +24,7 @@ public sealed class FactionSystem : EntitySystem { base.Initialize(); _sawmill = Logger.GetSawmill("faction"); - SubscribeLocalEvent(OnFactionStartup); + SubscribeLocalEvent(OnFactionStartup); _protoManager.PrototypesReloaded += OnProtoReload; RefreshFactions(); } @@ -37,33 +37,33 @@ public sealed class FactionSystem : EntitySystem private void OnProtoReload(PrototypesReloadedEventArgs obj) { - if (!obj.ByType.ContainsKey(typeof(FactionPrototype))) + if (!obj.ByType.ContainsKey(typeof(NpcFactionPrototype))) return; RefreshFactions(); } - private void OnFactionStartup(EntityUid uid, FactionComponent component, ComponentStartup args) + private void OnFactionStartup(EntityUid uid, NpcFactionMemberComponent memberComponent, ComponentStartup args) { - RefreshFactions(component); + RefreshFactions(memberComponent); } /// /// Refreshes the cached factions for this component. /// - private void RefreshFactions(FactionComponent component) + private void RefreshFactions(NpcFactionMemberComponent memberComponent) { - component.FriendlyFactions.Clear(); - component.HostileFactions.Clear(); + memberComponent.FriendlyFactions.Clear(); + memberComponent.HostileFactions.Clear(); - foreach (var faction in component.Factions) + foreach (var faction in memberComponent.Factions) { // YAML Linter already yells about this if (!_factions.TryGetValue(faction, out var factionData)) continue; - component.FriendlyFactions.UnionWith(factionData.Friendly); - component.HostileFactions.UnionWith(factionData.Hostile); + memberComponent.FriendlyFactions.UnionWith(factionData.Friendly); + memberComponent.HostileFactions.UnionWith(factionData.Hostile); } } @@ -72,13 +72,13 @@ public sealed class FactionSystem : EntitySystem /// public void AddFaction(EntityUid uid, string faction, bool dirty = true) { - if (!_protoManager.HasIndex(faction)) + if (!_protoManager.HasIndex(faction)) { _sawmill.Error($"Unable to find faction {faction}"); return; } - var comp = EnsureComp(uid); + var comp = EnsureComp(uid); if (!comp.Factions.Add(faction)) return; @@ -93,13 +93,13 @@ public sealed class FactionSystem : EntitySystem /// public void RemoveFaction(EntityUid uid, string faction, bool dirty = true) { - if (!_protoManager.HasIndex(faction)) + if (!_protoManager.HasIndex(faction)) { _sawmill.Error($"Unable to find faction {faction}"); return; } - if (!TryComp(uid, out var component)) + if (!TryComp(uid, out var component)) return; if (!component.Factions.Remove(faction)) @@ -111,7 +111,7 @@ public sealed class FactionSystem : EntitySystem } } - public IEnumerable GetNearbyHostiles(EntityUid entity, float range, FactionComponent? component = null) + public IEnumerable GetNearbyHostiles(EntityUid entity, float range, NpcFactionMemberComponent? component = null) { if (!Resolve(entity, ref component, false)) return Array.Empty(); @@ -126,7 +126,7 @@ public sealed class FactionSystem : EntitySystem return hostiles; } - public IEnumerable GetNearbyFriendlies(EntityUid entity, float range, FactionComponent? component = null) + public IEnumerable GetNearbyFriendlies(EntityUid entity, float range, NpcFactionMemberComponent? component = null) { if (!Resolve(entity, ref component, false)) return Array.Empty(); @@ -141,7 +141,7 @@ public sealed class FactionSystem : EntitySystem if (!xformQuery.TryGetComponent(entity, out var entityXform)) yield break; - foreach (var comp in _lookup.GetComponentsInRange(entityXform.MapPosition, range)) + foreach (var comp in _lookup.GetComponentsInRange(entityXform.MapPosition, range)) { if (comp.Owner == entity) continue; @@ -153,7 +153,7 @@ public sealed class FactionSystem : EntitySystem } } - public bool IsEntityFriendly(EntityUid uidA, EntityUid uidB, FactionComponent? factionA = null, FactionComponent? factionB = null) + public bool IsEntityFriendly(EntityUid uidA, EntityUid uidB, NpcFactionMemberComponent? factionA = null, NpcFactionMemberComponent? factionB = null) { if (!Resolve(uidA, ref factionA, false) || !Resolve(uidB, ref factionB, false)) return false; @@ -166,7 +166,7 @@ public sealed class FactionSystem : EntitySystem return _factions[target].Friendly.Contains(with) && _factions[with].Friendly.Contains(target); } - public bool IsFactionFriendly(string target, EntityUid with, FactionComponent? factionWith = null) + public bool IsFactionFriendly(string target, EntityUid with, NpcFactionMemberComponent? factionWith = null) { if (!Resolve(with, ref factionWith, false)) return false; @@ -180,7 +180,7 @@ public sealed class FactionSystem : EntitySystem return _factions[target].Hostile.Contains(with) && _factions[with].Hostile.Contains(target); } - public bool IsFactionHostile(string target, EntityUid with, FactionComponent? factionWith = null) + public bool IsFactionHostile(string target, EntityUid with, NpcFactionMemberComponent? factionWith = null) { if (!Resolve(with, ref factionWith, false)) return false; @@ -220,7 +220,7 @@ public sealed class FactionSystem : EntitySystem { _factions.Clear(); - foreach (var faction in _protoManager.EnumeratePrototypes()) + foreach (var faction in _protoManager.EnumeratePrototypes()) { _factions[faction.ID] = new FactionData() { @@ -229,7 +229,7 @@ public sealed class FactionSystem : EntitySystem }; } - foreach (var comp in EntityQuery(true)) + foreach (var comp in EntityQuery(true)) { comp.FriendlyFactions.Clear(); comp.HostileFactions.Clear(); diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 90658fcc66..aece1214ab 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -134,7 +134,7 @@ - type: MobMover - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Bloodstream @@ -207,7 +207,7 @@ flavorKind: station-event-random-sentience-flavor-organic - type: Puller needsHands: true - - type: Faction + - type: NpcFactionMember factions: - Passive @@ -290,7 +290,7 @@ accent: duck - type: SentienceTarget flavorKind: station-event-random-sentience-flavor-organic - - type: Faction + - type: NpcFactionMember factions: - Passive @@ -464,7 +464,7 @@ path: /Audio/Animals/cow_moo.ogg - type: Perishable molsPerSecondPerUnitMass: 0.0015 - - type: Faction + - type: NpcFactionMember factions: - Passive - type: Body @@ -582,7 +582,7 @@ interactFailureString: petting-failure-goat interactSuccessSound: path: /Audio/Animals/goat_bah.ogg - - type: Faction + - type: NpcFactionMember factions: - Passive - type: Body @@ -633,7 +633,7 @@ - type: Bloodstream bloodMaxVolume: 100 - type: Puller - - type: Faction + - type: NpcFactionMember factions: - Passive @@ -764,7 +764,7 @@ prototypes: [ BoxingKangarooGear ] - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile @@ -844,7 +844,7 @@ - type: MonkeyAccent - type: Puller - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - Passive - type: GhostRole @@ -902,7 +902,7 @@ equippedPrefix: 0 slots: - HEAD - - type: Faction + - type: NpcFactionMember factions: - Mouse - type: HTN @@ -1270,7 +1270,7 @@ interactFailureString: petting-failure-generic interactSuccessSound: path: /Audio/Animals/penguin_squawk.ogg - - type: Faction + - type: NpcFactionMember factions: - Passive @@ -1287,7 +1287,7 @@ - type: MobMover - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - Syndicate - type: Sprite @@ -1465,7 +1465,7 @@ id: MobGiantSpiderAngry suffix: Angry components: - - type: Faction + - type: NpcFactionMember factions: - Xeno - type: InputMover @@ -1776,7 +1776,7 @@ - type: MobMover - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: InteractionPopup @@ -2241,6 +2241,6 @@ accent: pig - type: SentienceTarget flavorKind: station-event-random-sentience-flavor-organic - - type: Faction + - type: NpcFactionMember factions: - Passive diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/behonker.yml b/Resources/Prototypes/Entities/Mobs/NPCs/behonker.yml index 9c0b047e55..eea5b2e843 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/behonker.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/behonker.yml @@ -13,7 +13,7 @@ - type: GhostTakeoverAvailable - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Speech diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml index 845e8d1717..33caa1f19a 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml @@ -12,7 +12,7 @@ blackboard: NavSmash: !type:Bool true - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml b/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml index b610b5ca1b..12ff6b8684 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml @@ -10,7 +10,7 @@ blackboard: NavSmash: !type:Bool true - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Tag diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/human.yml b/Resources/Prototypes/Entities/Mobs/NPCs/human.yml index 7263b45dd8..381904c801 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/human.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/human.yml @@ -8,7 +8,7 @@ - type: MobMover - type: Loadout prototypes: [PassengerGear] - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen @@ -18,7 +18,7 @@ id: MobSpirate description: Yarr! components: - - type: Faction + - type: NpcFactionMember factions: - Syndicate - type: InputMover diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml index e763ecac9f..43d349e0e5 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml @@ -9,7 +9,7 @@ - FootstepSound - type: InputMover - type: MobMover - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Hands diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index 3f4b4280e8..fc0b1dd75a 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -86,7 +86,7 @@ id: MobCatRuntime description: Professional mouse hunter. Escape artist. components: - - type: Faction + - type: NpcFactionMember factions: - PetsNT - type: HTN @@ -104,7 +104,7 @@ parent: MobCatCalico description: Ask nicely, and maybe they'll give you one of their spare lives. components: - - type: Faction + - type: NpcFactionMember factions: - PetsNT - type: Grammar @@ -477,7 +477,7 @@ id: MobSpiderShiva description: The first defender of the station. components: - - type: Faction + - type: NpcFactionMember factions: - PetsNT - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index 7f2ea1d70c..a5a9569f20 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -16,7 +16,7 @@ groups: Flammable: [Touch] Extinguish: [Touch] - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Sprite @@ -181,7 +181,7 @@ groups: Flammable: [Touch] Extinguish: [Touch] - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml index c0936dac1c..dd94bb616c 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml @@ -38,7 +38,7 @@ - type: Sprite noRot: true drawdepth: Mobs - - type: Faction + - type: NpcFactionMember factions: - SimpleNeutral - type: HealthExaminable diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index 2c64fb7a31..f03520adee 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -19,7 +19,7 @@ rootTask: IdleCompound - type: Input context: "human" - - type: Faction + - type: NpcFactionMember factions: - SimpleNeutral - type: MovementSpeedModifier diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml index 6bf9320ba3..3bf94c23e0 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml @@ -5,7 +5,7 @@ abstract: true description: It looks so much like jelly. I wonder what it tastes like? components: - - type: Faction + - type: NpcFactionMember factions: - SimpleNeutral - type: HTN @@ -135,7 +135,7 @@ id: MobAdultSlimesBlueAngry suffix: Angry components: - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: GhostRole @@ -170,7 +170,7 @@ id: MobAdultSlimesGreenAngry suffix: Angry components: - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: GhostRole @@ -205,7 +205,7 @@ id: MobAdultSlimesYellowAngry suffix: Angry components: - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: GhostRole diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/space.yml b/Resources/Prototypes/Entities/Mobs/NPCs/space.yml index b42da5c906..7d86433123 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/space.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/space.yml @@ -7,7 +7,7 @@ components: - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml index 1f1ffbee26..6a097192e3 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml @@ -8,7 +8,7 @@ - type: MobMover - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index a00444fe50..3958aa4fbe 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -28,7 +28,7 @@ groups: Flammable: [Touch] Extinguish: [Touch] - - type: Faction + - type: NpcFactionMember factions: - Xeno - type: Hands @@ -375,7 +375,7 @@ - type: MobMover - type: HTN rootTask: SimpleHostileCompound - - type: Faction + - type: NpcFactionMember factions: - Xeno - type: MeleeWeapon diff --git a/Resources/Prototypes/Entities/Mobs/Player/arachnid.yml b/Resources/Prototypes/Entities/Mobs/Player/arachnid.yml index 8d9906b72d..68ae37d885 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/arachnid.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/arachnid.yml @@ -30,6 +30,6 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/Entities/Mobs/Player/diona.yml b/Resources/Prototypes/Entities/Mobs/Player/diona.yml index 97c97d0214..df5f5c0f9b 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/diona.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/diona.yml @@ -29,6 +29,6 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml index 4b6c7c38e2..eb57e32ec2 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml @@ -22,7 +22,7 @@ true NavSmash: !type:Bool true - - type: Faction + - type: NpcFactionMember factions: - Dragon - type: Speech diff --git a/Resources/Prototypes/Entities/Mobs/Player/dwarf.yml b/Resources/Prototypes/Entities/Mobs/Player/dwarf.yml index 3367fab0e9..25eac35886 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/dwarf.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/dwarf.yml @@ -22,6 +22,6 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/Entities/Mobs/Player/familiars.yml b/Resources/Prototypes/Entities/Mobs/Player/familiars.yml index 26128b1224..22796c6e39 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/familiars.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/familiars.yml @@ -24,7 +24,7 @@ - Chapel - type: MindContainer showExamineInfo: true - - type: Faction + - type: NpcFactionMember factions: - PetsNT - type: Alerts @@ -54,7 +54,7 @@ Slash: 7 - type: InputMover - type: MobMover - - type: Faction + - type: NpcFactionMember factions: - SimpleNeutral - type: InteractionPopup diff --git a/Resources/Prototypes/Entities/Mobs/Player/human.yml b/Resources/Prototypes/Entities/Mobs/Player/human.yml index 9b87414993..86a8842a4d 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/human.yml @@ -29,7 +29,7 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen @@ -44,7 +44,7 @@ prototypes: [SyndicateOperativeGearExtremelyBasic] - type: RandomMetadata nameSegments: [names_death_commando] - - type: Faction + - type: NpcFactionMember factions: - Syndicate @@ -74,6 +74,6 @@ nameSegments: - SyndicateNamesPrefix - SyndicateNamesNormal - - type: Faction + - type: NpcFactionMember factions: - Syndicate diff --git a/Resources/Prototypes/Entities/Mobs/Player/reptilian.yml b/Resources/Prototypes/Entities/Mobs/Player/reptilian.yml index c33e09ca44..b6db4abfea 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/reptilian.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/reptilian.yml @@ -21,7 +21,7 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen - type: Respirator diff --git a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml index 48b81bd02e..82fff045d9 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml @@ -20,7 +20,7 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/Entities/Mobs/Player/slime.yml b/Resources/Prototypes/Entities/Mobs/Player/slime.yml index 03cda8bca8..c88011c49c 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/slime.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/slime.yml @@ -21,6 +21,6 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/Entities/Mobs/Player/vox.yml b/Resources/Prototypes/Entities/Mobs/Player/vox.yml index 7764c8302e..74556e079a 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/vox.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/vox.yml @@ -21,7 +21,7 @@ - type: CameraRecoil - type: Examiner - type: CanHostGuardian - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen - type: Respirator diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml index 9e7e7425f0..7c29a51053 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml @@ -116,7 +116,7 @@ id: WeaponTurretSyndicate suffix: Syndicate components: - - type: Faction + - type: NpcFactionMember factions: - Syndicate @@ -126,7 +126,7 @@ id: WeaponTurretSyndicateDisposable suffix: Syndicate, Disposable components: - - type: Faction + - type: NpcFactionMember factions: - Syndicate - type: Destructible @@ -166,7 +166,7 @@ id: WeaponTurretNanoTrasen suffix: NanoTrasen components: - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen @@ -175,7 +175,7 @@ id: WeaponTurretHostile suffix: Hostile components: - - type: Faction + - type: NpcFactionMember factions: - SimpleHostile @@ -186,7 +186,7 @@ id: WeaponTurretXeno suffix: Xeno components: - - type: Faction + - type: NpcFactionMember factions: - Xeno - type: Sprite diff --git a/Resources/Prototypes/Entities/Stations/nanotrasen.yml b/Resources/Prototypes/Entities/Stations/nanotrasen.yml index 89e9b7c132..1017875618 100644 --- a/Resources/Prototypes/Entities/Stations/nanotrasen.yml +++ b/Resources/Prototypes/Entities/Stations/nanotrasen.yml @@ -2,7 +2,7 @@ abstract: true id: BaseStationNanotrasen components: - - type: Faction + - type: NpcFactionMember factions: - NanoTrasen diff --git a/Resources/Prototypes/ai_factions.yml b/Resources/Prototypes/ai_factions.yml index e9b4709f2b..8011a9a9d9 100644 --- a/Resources/Prototypes/ai_factions.yml +++ b/Resources/Prototypes/ai_factions.yml @@ -1,4 +1,4 @@ -- type: faction +- type: npcFaction id: Dragon hostile: - NanoTrasen @@ -6,29 +6,29 @@ - Xeno - PetsNT -- type: faction +- type: npcFaction id: NanoTrasen hostile: - SimpleHostile - Syndicate - Xeno -- type: faction +- type: npcFaction id: Mouse hostile: - PetsNT -- type: faction +- type: npcFaction id: Passive -- type: faction +- type: npcFaction id: PetsNT hostile: - Mouse - SimpleHostile - Xeno -- type: faction +- type: npcFaction id: SimpleHostile hostile: - NanoTrasen @@ -36,10 +36,10 @@ - Passive - PetsNT -- type: faction +- type: npcFaction id: SimpleNeutral -- type: faction +- type: npcFaction id: Syndicate hostile: - NanoTrasen @@ -47,7 +47,7 @@ - Xeno - PetsNT -- type: faction +- type: npcFaction id: Xeno hostile: - NanoTrasen