Skip to content

Commit

Permalink
Merge branch 'master' into ship-time
Browse files Browse the repository at this point in the history
  • Loading branch information
assignedgod authored Feb 2, 2025
2 parents 4e6a749 + f4fdcdf commit 6dc5388
Show file tree
Hide file tree
Showing 286 changed files with 2,863 additions and 2,580 deletions.
20 changes: 12 additions & 8 deletions .github/mapchecker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@
"SalvageShuttleMarker",
"FTLPoint"
]
# List of specific legal entities that override the above. Does not check suffixes.
LEGAL_OVERRIDES = [
"ButtonFrameCautionSecurity", # red button
"PosterLegitPDAAd",
"ShowcaseRobot" # decoration
]
# List of matchers that are illegal to use, unless the map is a ship and the ship belongs to the keyed shipyard.
CONDITIONALLY_ILLEGAL_MATCHES = {
"Shipyard": [
"ButtonFrameCautionSecurity", # Decal.
],
"Scrap": [
"ButtonFrameCautionSecurity", # Decal.
],
"Expedition": [
"ButtonFrameCautionSecurity", # Decal.
],
"Custom": [
"ButtonFrameCautionSecurity", # Decal.
],
"Security": [ # These matchers are illegal unless the ship is part of the security shipyard.
"Security", # Anything with the word security in it should also only be appearing on security ships.
Expand All @@ -42,18 +44,20 @@
],
"Syndicate": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
"ButtonFrameCautionSecurity", # Decal.
"ShuttleGun",
],
"BlackMarket": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
"ButtonFrameCautionSecurity", # Decal.
"ShuttleGun",
],
"Sr": [
"ButtonFrameCautionSecurity", # Decal.
],
"Medical": [
"ButtonFrameCautionSecurity", # Decal.
],
# It is assumed that mapped instances of plastitanium, security gear, etc. are deemed acceptable
"PointOfInterest": [
"Plastitanium",
"Security",
"HighSecDoor"
]
}
13 changes: 8 additions & 5 deletions .github/mapchecker/mapchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
default=[
"Resources/Prototypes/Entities", # Upstream
"Resources/Prototypes/_NF/Entities", # NF
"Resources/Prototypes/_Nyano/Entities", # Nyanotrasen
"Resources/Prototypes/Nyanotrasen/Entities", # Nyanotrasen, again
"Resources/Prototypes/DeltaV/Entities", # DeltaV
"Resources/Prototypes/Nyanotrasen/Entities", # Nyanotrasen
"Resources/Prototypes/_DV/Entities", # DeltaV
]
)
parser.add_argument(
Expand All @@ -39,7 +38,7 @@
required=False,
default=[
"Resources/Prototypes/_NF/Maps/Outpost", # Frontier Outpost
"Resources/Prototypes/_NF/Maps/POI", # Points of interest
"Resources/Prototypes/_NF/PointsOfInterest", # Points of interest
"Resources/Prototypes/_NF/Shipyard", # Shipyard ships.
]
)
Expand Down Expand Up @@ -168,16 +167,20 @@
# specific group.
shipyard_override = None

# FIXME: this breaks down with multiple descriptions in one file.
for item in file_data:
if item["type"] == "gameMap":
# This yaml entry is the map descriptor. Collect its file location and map name.
if "id" in item.keys():
map_name = item["id"]
map_file_location = item["mapPath"] if "mapPath" in item.keys() else None
if item["type"] == "vessel":
elif item["type"] == "vessel":
# This yaml entry is a vessel descriptor!
shipyard_group = item["group"] if "group" in item.keys() else None
shipyard_override = item["mapchecker_group_override"] if "mapchecker_group_override" in item.keys() else None
elif item["type"] == "pointOfInterest":
shipyard_group = "PointOfInterest"
shipyard_override = item["mapchecker_group_override"] if "mapchecker_group_override" in item.keys() else None

if map_file_location is None:
# Silently skip. If the map doesn't have a mapPath, it won't appear in game anyways.
Expand Down
9 changes: 8 additions & 1 deletion .github/mapchecker/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import List, Union
from logging import Logger, getLogger

from config import ILLEGAL_MATCHES, CONDITIONALLY_ILLEGAL_MATCHES
from config import ILLEGAL_MATCHES, LEGAL_OVERRIDES, CONDITIONALLY_ILLEGAL_MATCHES


def get_logger(debug: bool = False) -> Logger:
Expand Down Expand Up @@ -49,6 +49,13 @@ def check_prototype(proto_id: str, proto_name: str, proto_suffixes: List[str]) -
- False if the prototype is globally illegal (matched by ILLEGAL_MATCHES)
- A list of shipyard keys if the prototype is conditionally illegal (matched by CONDITIONALLY_ILLEGAL_MATCHES)
"""
# Check against LEGAL_OVERRIDES (no suffix!)
for legal_match in LEGAL_OVERRIDES:
if legal_match.lower() in proto_name.lower():
return True

if legal_match.lower() in proto_id.lower():
return True

# Check against ILLEGAL_MATCHES.
for illegal_match in ILLEGAL_MATCHES:
Expand Down
15 changes: 2 additions & 13 deletions .github/mapchecker/whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@ Frontier: true
Nfsd: true
LPBravo: true
Cove: true
Lodge: true
Trade: true

# TECHNICAL DEBT BELOW. These ones were added to this list to ensure other PR's would not break upon merging. It is
# the intention for this list to become empty in separate PR's.
Paladin:
- ShuttleGunDuster
Rogue:
- ShuttleGunFriendship
Bottleneck:
- PosterLegitPDAAd
Watchdog:
- WindoorSecureSecurityLocked
- AirlockSecurityGlassLocked
- ThrusterSecurity
- SmallGyroscopeSecurity
Tinnia:
- RubberStampSyndicate # existing meme
3 changes: 1 addition & 2 deletions .github/workflows/nf-mapchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
- "Resources/Prototypes/Entities/**/*.yml"
- "Resources/Prototypes/_NF/Entities/**/*.yml"
- "Resources/Prototypes/Nyanotrasen/Entities/**/*.yml"
- "Resources/Prototypes/_Nyano/Entities/**/*.yml"
- "Resources/Prototypes/DeltaV/Entities/**/*.yml"
- "Resources/Prototypes/_DV/Entities/**/*.yml"
# Map pathspecs - If any maps are changed, this should run.
- "Resources/Maps/**/*.yml"
# Also the mapchecker itself
Expand Down
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
"Client"
],
"preLaunchTask": "build-release"
},
{
"name": "Server/Client (No Build)",
"configurations": [
"Server",
"Client"
]
}
// Frontier end
]
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.IdCardConsoleComponent;
using static Content.Shared.Shipyard.Components.ShuttleDeedComponent;
using Content.Shared._NF.Shipyard.Components; // Frontier

namespace Content.Client.Access.UI
{
Expand Down Expand Up @@ -243,7 +243,7 @@ private void EnsureValidShuttleName()
var suffix = ShipSuffixLineEdit.Text;

// We skip suffix validation because it's immutable and is ignored by the server
var valid = name.Length <= MaxNameLength
var valid = name.Length <= ShuttleDeedComponent.MaxNameLength
&& name.Trim().Length >= 3; // Arbitrary client-side number, should hopefully be long enough.

ShipNameSaveButton.Disabled = !_interfaceEnabled || !valid;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Ghost/GhostSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Robust.Shared.GameStates;
using Robust.Shared.Timing;
using Robust.Shared.Player;
using Content.Server.Corvax.Respawn;
using Content.Client._Corvax.Respawn; // Frontier

namespace Content.Client.Ghost
{
Expand Down
2 changes: 2 additions & 0 deletions Content.Client/Input/ContentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static void SetupContexts(IInputContextContainer contexts)
human.AddFunction(EngineKeyFunctions.MoveRight);
human.AddFunction(EngineKeyFunctions.Walk);
human.AddFunction(ContentKeyFunctions.SwapHands);
human.AddFunction(ContentKeyFunctions.SwapHandsPrevious); // Frontier
human.AddFunction(ContentKeyFunctions.Drop);
human.AddFunction(ContentKeyFunctions.UseItemInHand);
human.AddFunction(ContentKeyFunctions.AltUseItemInHand);
Expand Down Expand Up @@ -100,6 +101,7 @@ public static void SetupContexts(IInputContextContainer contexts)
aghost.AddFunction(EngineKeyFunctions.MoveRight);
aghost.AddFunction(EngineKeyFunctions.Walk);
aghost.AddFunction(ContentKeyFunctions.SwapHands);
aghost.AddFunction(ContentKeyFunctions.SwapHandsPrevious); // Frontier
aghost.AddFunction(ContentKeyFunctions.Drop);
aghost.AddFunction(ContentKeyFunctions.UseItemInHand);
aghost.AddFunction(ContentKeyFunctions.AltUseItemInHand);
Expand Down
13 changes: 9 additions & 4 deletions Content.Client/Lathe/UI/LatheMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,25 @@ public void UpdateCategories()
/// Populates the build queue list with all queued items
/// </summary>
/// <param name="queue"></param>
public void PopulateQueueList(List<LatheRecipePrototype> queue)
public void PopulateQueueList(List<LatheRecipeBatch> queue) // Frontier: LatheRecipePrototype<LatheRecipeBatch
{
QueueList.DisposeAllChildren();

var idx = 1;
foreach (var recipe in queue)
foreach (var batch in queue) // Frontier: recipe<batch
{
var queuedRecipeBox = new BoxContainer();
queuedRecipeBox.Orientation = BoxContainer.LayoutOrientation.Horizontal;

queuedRecipeBox.AddChild(GetRecipeDisplayControl(recipe));
// Frontier: batch handling
queuedRecipeBox.AddChild(GetRecipeDisplayControl(batch.Recipe));

var queuedRecipeLabel = new Label();
queuedRecipeLabel.Text = $"{idx}. {_lathe.GetRecipeName(recipe)}";
if (batch.ItemsRequested > 1)
queuedRecipeLabel.Text = $"{idx}. {_lathe.GetRecipeName(batch.Recipe)} ({batch.ItemsPrinted}/{batch.ItemsRequested})";
else
queuedRecipeLabel.Text = $"{idx}. {_lathe.GetRecipeName(batch.Recipe)}";
// End Frontier
queuedRecipeBox.AddChild(queuedRecipeLabel);
QueueList.AddChild(queuedRecipeBox);
idx++;
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void AddCheckBox(string checkBoxName, bool currentState, Action<BaseButton.Butto
AddButton(ContentKeyFunctions.Drop);
AddButton(ContentKeyFunctions.ExamineEntity);
AddButton(ContentKeyFunctions.SwapHands);
AddButton(ContentKeyFunctions.SwapHandsPrevious); // Frontier
AddButton(ContentKeyFunctions.MoveStoredItem);
AddButton(ContentKeyFunctions.RotateStoredItem);
AddButton(ContentKeyFunctions.SaveItemLocation);
Expand Down
2 changes: 0 additions & 2 deletions Content.Client/StationRecords/JobRow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Content.Shared.Shipyard;
using Content.Shared.Shipyard.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.Timing;
using Content.Server.Corvax.Respawn;
using Content.Client._Corvax.Respawn; // Frontier

namespace Content.Client.UserInterface.Systems.Ghost;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using Content.Client.CryoSleep;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Systems.Ghost.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Timing;
using Robust.Shared.Configuration;
using Content.Shared._NF.CCVar; // Frontier
using Content.Client._NF.CryoSleep; // Frontier

namespace Content.Client.UserInterface.Systems.Ghost.Widgets;

Expand All @@ -33,7 +32,7 @@ public GhostGui()

TargetWindow = new GhostTargetWindow();
RulesWindow = new GhostRespawnRulesWindow();
CryosleepWakeupWindow = new CryosleepWakeupWindow();
CryosleepWakeupWindow = new CryosleepWakeupWindow(); // Frontier
RulesWindow.RespawnButton.OnPressed += _ => GhostRespawnPressed?.Invoke();

MouseFilter = MouseFilterMode.Ignore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Client.UserInterface.Controls;
using Content.Client.VendingMachines.UI;
using Content.Shared.VendingMachines;
using Content.Shared.Bank.Components;
using Content.Shared._NF.Bank.Components; // Frontier
using Robust.Client.UserInterface;
using Robust.Shared.Input;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Shared.Corvax.Respawn;
using Content.Shared._Corvax.Respawn;

namespace Content.Server.Corvax.Respawn;
namespace Content.Client._Corvax.Respawn;

public sealed class RespawnSystem : EntitySystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Client.Bank.UI;
using Content.Shared.Bank.BUI;
using Content.Shared.Bank.Events;
using Robust.Client.GameObjects;
using Content.Client._NF.Bank.UI;
using Content.Shared._NF.Bank.BUI;
using Content.Shared._NF.Bank.Events;

namespace Content.Client.Cargo.BUI;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using Content.Client.Bank.UI;
using Content.Shared.Bank.BUI;
using Content.Shared.Bank.Events;
using Content.Shared._NF.Bank.BUI;
using Content.Shared._NF.Bank.Events;

namespace Content.Client.Cargo.BUI;
namespace Content.Client._NF.Bank.UI;

public sealed class WithdrawBankATMMenuBoundUserInterface : BoundUserInterface
public sealed class BankATMWithdrawOnlyMenuBoundUserInterface : BoundUserInterface
{
private WithdrawBankATMMenu? _menu;

public WithdrawBankATMMenuBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) {}
public BankATMWithdrawOnlyMenuBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) {}

protected override void Open()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
using Content.Client.Bank.UI;
using Content.Shared.Bank.BUI;
using Content.Shared.Bank.Events;
using Content.Shared._NF.Bank.BUI;
using Content.Shared._NF.Bank.Events;

namespace Content.Client.Cargo.BUI;
namespace Content.Client._NF.Bank.UI;

public sealed class StationBankATMMenuBoundUserInterface : BoundUserInterface
public sealed class StationAdminConsoleBoundUserInterface : BoundUserInterface
{
private StationBankATMMenu? _menu;
private StationAdminConsoleMenu? _menu;

public StationBankATMMenuBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) {}
public StationAdminConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) {}

protected override void Open()
{
base.Open();

_menu = new StationBankATMMenu();
_menu = new StationAdminConsoleMenu();
_menu.WithdrawRequest += OnWithdraw;
_menu.DepositRequest += OnDeposit;
_menu.OnClose += Close;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/_NF/Bank/BankSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Bank;
using Content.Shared._NF.Bank;

namespace Content.Client.Bank;

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
/*
* New Frontiers - This file is licensed under AGPLv3
* Copyright (c) 2024 New Frontiers Contributors
* See AGPLv3.txt for details.
*/
using Content.Client.UserInterface.Controls;
using Content.Shared._NF.Bank;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.Bank.UI;
namespace Content.Client._NF.Bank.UI;

[GenerateTypedNameReferences]
public sealed partial class BankATMMenu : FancyWindow
Expand Down
Loading

0 comments on commit 6dc5388

Please sign in to comment.