diff --git a/Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml.cs b/Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml.cs index 3620289b7d..a91d845676 100644 --- a/Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml.cs +++ b/Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml.cs @@ -38,7 +38,7 @@ public sealed partial class ShipyardConsoleMenu : FancyWindow // don't include ships that aren't allowed by whitelist, server won't accept them anyway foreach (var vessel in proto.EnumeratePrototypes()) { - if(whitelist.IsWhitelistPass(vessel.Whitelist, console)) + if (whitelist.IsWhitelistPassOrNull(vessel.Whitelist, console)) _vessels.Add(vessel); } _vessels.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.CurrentCultureIgnoreCase)); diff --git a/Content.Server/DeltaV/Shipyard/ShipyardConsoleSystem.cs b/Content.Server/DeltaV/Shipyard/ShipyardConsoleSystem.cs index 15e473f740..599dbc8de4 100644 --- a/Content.Server/DeltaV/Shipyard/ShipyardConsoleSystem.cs +++ b/Content.Server/DeltaV/Shipyard/ShipyardConsoleSystem.cs @@ -4,6 +4,7 @@ using Content.Server.Radio.EntitySystems; using Content.Server.Station.Systems; using Content.Shared.Shipyard; using Content.Shared.Shipyard.Prototypes; +using Content.Shared.Whitelist; using Robust.Server.GameObjects; using Robust.Shared.Random; using System.Diagnostics.CodeAnalysis; @@ -13,6 +14,7 @@ namespace Content.Server.Shipyard; public sealed class ShipyardConsoleSystem : SharedShipyardConsoleSystem { [Dependency] private readonly CargoSystem _cargo = default!; + [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly MetaDataSystem _meta = default!; [Dependency] private readonly RadioSystem _radio = default!; @@ -32,6 +34,10 @@ public sealed class ShipyardConsoleSystem : SharedShipyardConsoleSystem protected override void TryPurchase(Entity ent, EntityUid user, VesselPrototype vessel) { + // client prevents asking for this so dont need feedback for validation + if (_whitelist.IsWhitelistFail(vessel.Whitelist, ent)) + return; + if (GetBankAccount(ent) is not {} bank) return;