Vox nukies and ninjafix (#29783)

* Nukie species gear

* antagselectionsystem autointernals

* nukie vox

* skrek

* Remove duplicate code

* skrek

* EVA tank loadouts, vox ninja update

* fix prototype duplication

* skrek

* fix summary

* fixed empty startinggear error

* enable vox ninjas

* Comments

* removed comment because startinggearprototype should not be used on antagselection aaaanyway

* squish that if

* Update Content.Shared/Clothing/LoadoutSystem.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Errant
2024-08-06 12:58:28 +02:00
committed by GitHub
parent 26ad898105
commit 9522dbc655
11 changed files with 92 additions and 25 deletions

View File

@@ -13,11 +13,14 @@ using Content.Server.Roles.Jobs;
using Content.Server.Shuttles.Components;
using Content.Server.Station.Systems;
using Content.Shared.Antag;
using Content.Shared.Clothing;
using Content.Shared.GameTicking;
using Content.Shared.GameTicking.Components;
using Content.Shared.Ghost;
using Content.Shared.Humanoid;
using Content.Shared.Players;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Content.Shared.Whitelist;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
@@ -25,6 +28,7 @@ using Robust.Server.Player;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
@@ -35,10 +39,13 @@ public sealed partial class AntagSelectionSystem : GameRuleSystem<AntagSelection
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IServerPreferencesManager _pref = default!;
[Dependency] private readonly ActorSystem _actors = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly GhostRoleSystem _ghostRole = default!;
[Dependency] private readonly JobSystem _jobs = default!;
[Dependency] private readonly LoadoutSystem _loadout = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly RoleSystem _role = default!;
[Dependency] private readonly StationSpawningSystem _stationSpawning = default!;
[Dependency] private readonly TransformSystem _transform = default!;
@@ -324,7 +331,13 @@ public sealed partial class AntagSelectionSystem : GameRuleSystem<AntagSelection
// The following is where we apply components, equipment, and other changes to our antagonist entity.
EntityManager.AddComponents(player, def.Components);
_stationSpawning.EquipStartingGear(player, def.StartingGear);
// Equip the entity's RoleLoadout and LoadoutGroup
List<ProtoId<StartingGearPrototype>>? gear = new();
if (def.StartingGear is not null)
gear.Add(def.StartingGear.Value);
_loadout.Equip(player, gear, def.RoleLoadout);
if (session != null)
{

View File

@@ -1,6 +1,7 @@
using Content.Server.Administration.Systems;
using Content.Shared.Antag;
using Content.Shared.Destructible.Thresholds;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Content.Shared.Storage;
using Content.Shared.Whitelist;
@@ -154,6 +155,12 @@ public partial struct AntagSelectionDefinition()
[DataField]
public ProtoId<StartingGearPrototype>? StartingGear;
/// <summary>
/// A list of role loadouts, from which a randomly selected one will be equipped.
/// </summary>
[DataField]
public List<ProtoId<RoleLoadoutPrototype>>? RoleLoadout;
/// <summary>
/// A briefing shown to the player.
/// </summary>