Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-station-14 into 2024-11-04-gaslocks
  • Loading branch information
whatston3 committed Dec 1, 2024
2 parents 062b98f + f30cbc2 commit 98943d7
Show file tree
Hide file tree
Showing 84 changed files with 43,760 additions and 1,511 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ concurrency:

on:
workflow_dispatch:
# schedule:
# - cron: '0 10 * * *'
# Frontier: re-enabled autopublish
schedule:
- cron: '0 10 * * *'

jobs:
build:
Expand Down
17 changes: 0 additions & 17 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,6 @@ public void RefreshTraits()
group.Add(trait.ID);
}

// Frontier: index current species
EntityPrototype? speciesEntProto = null;
if (_prototypeManager.TryIndex(Profile?.Species, out var species))
_prototypeManager.TryIndex<EntityPrototype>(species.Prototype, out speciesEntProto);
// End Frontier

// Create UI view from model
foreach (var (categoryId, categoryTraits) in traitGroups)
{
Expand Down Expand Up @@ -558,17 +552,6 @@ public void RefreshTraits()
if (selector.Preference)
selectionCount += trait.Cost;

// Frontier: disable UI on species trait availability (hack)
if (Profile == null ||
speciesEntProto == null ||
_whitelist.IsPrototypeWhitelistFail(trait.Whitelist, speciesEntProto) ||
_whitelist.IsPrototypeBlacklistPass(trait.Blacklist, speciesEntProto))
{
selector.Checkbox.Disabled = true;
selector.Checkbox.Label.FontColorOverride = Color.Gray;
}
// End Frontier

selector.PreferenceChanged += preference =>
{
if (preference)
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Shuttles/UI/ShuttleMapControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public sealed partial class ShuttleMapControl : BaseShuttleControl
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IInputManager _inputs = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IEntityManager _entManager = default!; // Frontier
private readonly ShuttleSystem _shuttles;
private readonly SharedTransformSystem _xformSystem;

Expand Down Expand Up @@ -212,7 +213,7 @@ private List<IMapObject> GetViewportMapObjects(Matrix3x2 matty, List<IMapObject>
foreach (var mapObj in mapObjects)
{
// If it's a grid-map skip it.
if (mapObj is GridMapObject gridObj && EntManager.HasComponent<MapComponent>(gridObj.Entity))
if (mapObj is GridMapObject gridObj && (EntManager.HasComponent<MapComponent>(gridObj.Entity) || !_entManager.EntityExists(gridObj.Entity))) // Frontier: add EntityExists
continue;

var mapCoords = _shuttles.GetMapCoordinates(mapObj);
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public Dictionary<NetEntity, List<DockingPortState>> GetAllDocks()
_xformQuery.TryGetComponent(comp.DockedWith, out var otherDockXform) ?
GetNetEntity(otherDockXform.GridUid) :
null,
LabelName = comp.Name, // Frontier: docking labels
LabelName = comp.Name != null ? Loc.GetString(comp.Name) : null, // Frontier: docking labels
RadarColor = comp.RadarColor, // Frontier
HighlightedRadarColor = comp.HighlightedRadarColor, // Frontier
DockType = comp.DockType, // Frontier
Expand Down
13 changes: 13 additions & 0 deletions Content.Server/_NF/Cargo/Components/PirateBountyItemComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Robust.Shared.Prototypes;

namespace Content.Server.Cargo.Systems; // Needs to collide with base namespace

// Component to identify an item as matching a pirate bounty.
// Each item can match at most one bounty type.
[RegisterComponent]
public sealed partial class PirateBountyItemComponent : Component
{
// The ID of the category to match.
[IdDataField]
public string ID;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
using Content.Shared.Database;
using Content.Shared.NameIdentifier;
using Content.Shared.Paper;
using Content.Shared.Whitelist;
using JetBrains.Annotations;
using Robust.Shared.Containers;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Shared.Stacks;

Expand All @@ -28,7 +26,6 @@ public sealed partial class CargoSystem
private const string PirateBountyNameIdentifierGroup = "Bounty"; // Use the bounty name ID group (0-999) for now.

private EntityQuery<PirateBountyLabelComponent> _pirateBountyLabelQuery;
[Dependency] private EntProtoIdWhitelistSystem _entProtoIdWhitelist = default!;

private readonly TimeSpan _redemptionDelay = TimeSpan.FromSeconds(2);

Expand Down Expand Up @@ -604,9 +601,7 @@ private bool AdjustBountyForEntity(EntityUid target, PirateBountyState bounty)
}

// Check whitelists for the pirate bounty.
if ((_whitelistSys.IsWhitelistPass(entry.Whitelist, target) ||
_entProtoIdWhitelist.IsWhitelistPass(entry.IdWhitelist, target)) &&
_whitelistSys.IsBlacklistFailOrNull(entry.Blacklist, target))
if (TryComp<PirateBountyItemComponent>(target, out var targetBounty) && targetBounty.ID == entry.ID)
{
if (TryComp<StackComponent>(target, out var stack))
bounty.Entries[entry.Name] += stack.Count;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server._NF.Market.Systems;
using Content.Server._NF.Market.Systems;
using Content.Shared._NF.Market;
using Content.Shared.Whitelist;

Expand Down Expand Up @@ -30,5 +30,5 @@ public sealed partial class CargoMarketDataComponent : Component
/// Particular items that may override the blacklist.
/// </summary>
[DataField]
public EntProtoIdWhitelist? OverrideList;
public EntityWhitelist? WhitelistOverride;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Server._NF.Market.Components;
using Content.Server._NF.Market.Extensions;
using Content.Server._NF.SectorServices;
Expand Down Expand Up @@ -91,9 +91,9 @@ private void UpsertMetadata(CargoMarketDataComponent marketDataComponent, Entity
return;

// Check whitelist/blacklist for particular prototype
if (_whitelistSystem.IsPrototypeWhitelistPassOrNull(marketDataComponent.Whitelist, entityPrototype) &&
_whitelistSystem.IsPrototypeBlacklistFailOrNull(marketDataComponent.Blacklist, entityPrototype) ||
_protoIdWhitelist.IsPrototypeWhitelistPassOrNull(marketDataComponent.OverrideList, entityPrototype))
if (_whitelistSystem.IsWhitelistPassOrNull(marketDataComponent.Whitelist, sold) &&
_whitelistSystem.IsBlacklistFailOrNull(marketDataComponent.Blacklist, sold) ||
_whitelistSystem.IsWhitelistPassOrNull(marketDataComponent.WhitelistOverride, sold))
{
var estimatedPrice = _pricingSystem.GetPrice(sold) / count;

Expand Down
3 changes: 1 addition & 2 deletions Content.Server/_NF/Market/Systems/MarketSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server._NF.SectorServices;
using Content.Server._NF.SectorServices;
using Content.Server._NF.Bank;
using Content.Server.Cargo.Systems;
using Content.Server.Stack;
Expand Down Expand Up @@ -28,7 +28,6 @@ public sealed partial class MarketSystem: SharedMarketSystem
[Dependency] private readonly PricingSystem _pricingSystem = default!;
[Dependency] private readonly StackSystem _stackSystem = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly EntProtoIdWhitelistSystem _protoIdWhitelist = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly StationSystem _station = default!;

Expand Down
Loading

0 comments on commit 98943d7

Please sign in to comment.