Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into origin/MERCUIV
Browse files Browse the repository at this point in the history
  • Loading branch information
assignedgod authored Feb 27, 2025
2 parents be13314 + 5fad8b5 commit 511aaa4
Show file tree
Hide file tree
Showing 1,410 changed files with 21,207 additions and 9,341 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
- all:
- changed-files:
- any-glob-to-any-file: "**/*.yml"
- all-globs-to-all-files:
- all-globs-to-any-file:
- "!Resources/Maps/_NF/**/*.yml"
- "!Resources/Prototypes/Maps/_NF/**/*.yml"

Expand Down
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
10 changes: 7 additions & 3 deletions Content.Client/Guidebook/DocumentParsingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ public void Initialize()
.Assert(_tagControlParsers.ContainsKey, tag => $"unknown tag: {tag}")
.Bind(tag => _tagControlParsers[tag]);

_controlParser = OneOf(_tagParser, TryHeaderControl, TryListControl, TextControlParser) // Frontier: ListControlParser<TryListControl
.Before(SkipWhitespaces);
// Frontier: comment parser
Parser<char, Unit> whitespaceAndCommentParser = SkipWhitespaces.Then(Try(String("<!--").Then(Parser<char>.Any.SkipUntil(String("-->")))).SkipMany());

_controlParser = OneOf(_tagParser, TryHeaderControl, TryListControl, TextControlParser)
.Before(whitespaceAndCommentParser);
// End Frontier

foreach (var typ in _reflectionManager.GetAllChildren<IDocumentTag>())
{
_tagControlParsers.Add(typ.Name, CreateTagControlParser(typ.Name, typ, _sandboxHelper));
}

ControlParser = SkipWhitespaces.Then(_controlParser.Many());
ControlParser = whitespaceAndCommentParser.Then(_controlParser.Many()); // Frontier: SkipWhitespaces<whitespaceAndCommentParser

_sawmill = Logger.GetSawmill("Guidebook");
}
Expand Down
10 changes: 10 additions & 0 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)
MaxWidth = 300
});

// Frontier: uncloneable text
if (msg.Uncloneable == true)
AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-uncloneable-text"),
Margin = new Thickness(0, 4),
MaxWidth = 300
});
// End Frontier

if (msg.Bleeding == true)
AlertsContainer.AddChild(new RichTextLabel
{
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
10 changes: 9 additions & 1 deletion Content.Client/Inventory/StrippableBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Robust.Shared.Map;
using static Content.Client.Inventory.ClientInventorySystem;
using static Robust.Client.UserInterface.Control;
using Content.Shared._EE.Strip.Components; // EE

namespace Content.Client.Inventory
{
Expand Down Expand Up @@ -172,7 +173,9 @@ private void AddHandButton(Hand hand)
button.BlockedRect.MouseFilter = MouseFilterMode.Ignore;
}

UpdateEntityIcon(button, hand.HeldEntity);
// Goobstation: use virtual entity if hidden
UpdateEntityIcon(button, EntMan.HasComponent<StripMenuHiddenComponent>(hand.HeldEntity) ? _virtualHiddenEntity : hand.HeldEntity);
// End Goobstation
_strippingMenu!.HandsContainer.AddChild(button);
}

Expand Down Expand Up @@ -214,6 +217,11 @@ private void AddInventoryButton(EntityUid invUid, string slotId, InventoryCompon
if (entity != null && _strippable.IsStripHidden(slotDef, _player.LocalEntity))
entity = _virtualHiddenEntity;

// Goobstation/EE: hide strip menu items
if (entity != null && EntMan.HasComponent<StripMenuHiddenComponent>(entity))
entity = _virtualHiddenEntity;
// End Goobstation/EE

var button = new SlotButton(new SlotData(slotDef, container));
button.Pressed += SlotPressed;

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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ protected override void Open()
_window = this.CreateWindow<SignalTimerWindow>();
_window.OnStartTimer += StartTimer;
_window.OnCurrentTextChanged += OnTextChanged;
_window.OnCurrentRepeatChanged += OnRepeatChanged; // Frontier
_window.OnCurrentDelayMinutesChanged += OnDelayChanged;
_window.OnCurrentDelaySecondsChanged += OnDelayChanged;
}
Expand All @@ -35,6 +36,13 @@ private void OnTextChanged(string newText)
SendMessage(new SignalTimerTextChangedMessage(newText));
}

// Frontier: Handle Repeat changed
private void OnRepeatChanged(bool newRepeat)
{
SendMessage(new SignalTimerRepeatToggled(newRepeat));
}
//End Frontier

private void OnDelayChanged(string newDelay)
{
if (_window == null)
Expand All @@ -56,6 +64,7 @@ protected override void UpdateState(BoundUserInterfaceState state)
_window.SetCurrentText(cast.CurrentText);
_window.SetCurrentDelayMinutes(cast.CurrentDelayMinutes);
_window.SetCurrentDelaySeconds(cast.CurrentDelaySeconds);
_window.SetCurrentRepeat(cast.CurrentRepeat); // Frontier
_window.SetShowText(cast.ShowText);
_window.SetTriggerTime(cast.TriggerTime);
_window.SetTimerStarted(cast.TimerStarted);
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/MachineLinking/UI/SignalTimerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<LineEdit Name="CurrentDelayEditSeconds" MinWidth="32" />
<Label Name="DelayInfo" Text=" (mm:ss)" />
</BoxContainer>
<!-- Frontier: Repeat Checkbox -->
<BoxContainer Name="RepeatEdit" Orientation="Horizontal">
<CheckBox Name="CurrentRepeatEdit" Access="Public" Text="{Loc 'signal-timer-menu-repeat'}" />
</BoxContainer>
<!-- End Frontier -->
<Button Name="StartTimer" Text="{Loc signal-timer-menu-start}" />
</BoxContainer>
</DefaultWindow>
Loading

0 comments on commit 511aaa4

Please sign in to comment.