parent
2ab45b8713
commit
4ae20967a6
|
|
@ -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<VesselPrototype>())
|
||||
{
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -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<ShipyardConsoleComponent> 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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue