Cleanup factions code (#11075)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
metalgearsloth
2022-09-15 04:45:02 +10:00
committed by GitHub
parent 356a6b8d2e
commit 8871c445b8
34 changed files with 311 additions and 287 deletions

View File

@@ -45,11 +45,12 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
[Dependency] private readonly IChatManager _chatManager = default!;
[Dependency] private readonly IMapLoader _mapLoader = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPlayerManager _playerSystem = default!;
[Dependency] private readonly FactionSystem _faction = default!;
[Dependency] private readonly StationSpawningSystem _stationSpawningSystem = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly ShuttleSystem _shuttleSystem = default!;
[Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
[Dependency] private readonly IPlayerManager _playerSystem = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
@@ -667,9 +668,8 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
if(_startingGearPrototypes.TryGetValue(gear, out var gearPrototype))
_stationSpawningSystem.EquipStartingGear(mob, gearPrototype, null);
var faction = EnsureComp<AiFactionTagComponent>(mob);
faction.Factions |= Faction.Syndicate;
faction.Factions &= ~Faction.NanoTrasen;
_faction.RemoveFaction(mob, "NanoTrasen", false);
_faction.AddFaction(mob, "Syndicate", true);
}
private void SpawnOperatives(int spawnCount, List<IPlayerSession> sessions, bool addSpawnPoints)