Rename Faction to NpcFaction (#18079)
This commit is contained in:
@@ -119,7 +119,7 @@ public sealed class NukeopsRuleComponent : Component
|
||||
[DataField("operativePlayers")]
|
||||
public readonly Dictionary<string, IPlayerSession> OperativePlayers = new();
|
||||
|
||||
[DataField("faction", customTypeSerializer: typeof(PrototypeIdSerializer<FactionPrototype>), required: true)]
|
||||
[DataField("faction", customTypeSerializer: typeof(PrototypeIdSerializer<NpcFactionPrototype>), required: true)]
|
||||
public string Faction = default!;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
[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<NukeopsRuleComponent>
|
||||
// we can only currently guarantee that NT stations are the only station to
|
||||
// exist in the base game.
|
||||
|
||||
var eligible = EntityQuery<StationEventEligibleComponent, FactionComponent>()
|
||||
var eligible = EntityQuery<StationEventEligibleComponent, NpcFactionMemberComponent>()
|
||||
.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<NukeopsRuleComponent>
|
||||
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<IPlayerSession> sessions, bool addSpawnPoints, NukeopsRuleComponent component)
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
[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<TraitorRuleComponent>
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user