Skip to content

Commit

Permalink
Merge branch 'master' into 2024-12-27-Tape
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 authored Feb 8, 2025
2 parents 2a62bcf + 5a127ef commit f3363cc
Show file tree
Hide file tree
Showing 1,838 changed files with 382,085 additions and 33,278 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
21 changes: 14 additions & 7 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,15 +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": [
],
# 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
2 changes: 1 addition & 1 deletion .github/workflows/build-docfx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-map-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
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
2 changes: 1 addition & 1 deletion .github/workflows/nf-shipyard-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install Dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Get Engine Tag
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
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
5 changes: 3 additions & 2 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public void UpdateState(IPrototypeManager protoManager, AccessOverriderBoundUser
button.Disabled = !interfaceEnabled;
if (interfaceEnabled)
{
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
// Explicit cast because Rider gives a false error otherwise.
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains((ProtoId<AccessLevelPrototype>) accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains((ProtoId<AccessLevelPrototype>) accessName)) ?? true;
}
}
}
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
31 changes: 27 additions & 4 deletions Content.Client/Administration/AdminNameOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
using System.Linq;
using System.Numerics;
using Content.Client.Administration.Systems;
using Content.Shared.CCVar;
using Content.Shared.Mind;
using Content.Shared._NF.Bank;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Shared;
using Robust.Shared.Enums;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;

namespace Content.Client.Administration;

internal sealed class AdminNameOverlay : Overlay
{
[Dependency] private readonly IConfigurationManager _config = default!;

private readonly AdminSystem _system;
private readonly IEntityManager _entityManager;
private readonly IEyeManager _eyeManager;
private readonly EntityLookupSystem _entityLookup;
private readonly IUserInterfaceManager _userInterfaceManager;
private readonly Font _font;

//TODO make this adjustable via GUI
private readonly ProtoId<RoleTypePrototype>[] _filter =
["SoloAntagonist", "TeamAntagonist", "SiliconAntagonist", "FreeAgent"];
private readonly string _antagLabelClassic = Loc.GetString("admin-overlay-antag-classic");
private readonly Color _antagColorClassic = Color.OrangeRed;

public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeManager eyeManager, IResourceCache resourceCache, EntityLookupSystem entityLookup, IUserInterfaceManager userInterfaceManager)
{
IoCManager.InjectDependencies(this);

_system = system;
_entityManager = entityManager;
_eyeManager = eyeManager;
Expand All @@ -36,6 +49,9 @@ protected override void Draw(in OverlayDrawArgs args)
{
var viewport = args.WorldAABB;

//TODO make this adjustable via GUI
var classic = _config.GetCVar(CCVars.AdminOverlayClassic);

foreach (var playerInfo in _system.PlayerList)
{
var entity = _entityManager.GetEntity(playerInfo.NetEntity);
Expand Down Expand Up @@ -66,9 +82,16 @@ protected override void Draw(in OverlayDrawArgs args)
new Angle(-_eyeManager.CurrentEye.Rotation).RotateVec(
aabb.TopRight - aabb.Center)) + new Vector2(1f, 7f);
var balance = playerInfo.Balance == int.MinValue ? "NO BALANCE" : BankSystemExtensions.ToCurrencyString(playerInfo.Balance); // Frontier
if (playerInfo.Antag)
if (classic && playerInfo.Antag)
{
args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 3), _antagLabelClassic, uiScale, _antagColorClassic); // Frontier: 2<3
}
else if (!classic && _filter.Contains(playerInfo.RoleProto.ID))
{
args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 3), "ANTAG", uiScale, Color.OrangeRed); // Frontier: 2<3
var label = Loc.GetString(playerInfo.RoleProto.Name).ToUpper();
var color = playerInfo.RoleProto.Color;

args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 3), label, uiScale, color); // Frontier: 2<3
}
args.ScreenHandle.DrawString(_font, screenCoordinates+lineoffset, playerInfo.Username, uiScale, playerInfo.Connected ? Color.Yellow : Color.White);
args.ScreenHandle.DrawString(_font, screenCoordinates, playerInfo.CharacterName, uiScale, playerInfo.Connected ? Color.Aquamarine : Color.White);
Expand Down
4 changes: 1 addition & 3 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
xmlns:tabs="clr-namespace:Content.Client.Administration.UI.Tabs"
xmlns:playerTab="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab"
xmlns:objectsTab="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab"
xmlns:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab">
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab">
<TabContainer Name="MasterTabContainer">
<adminTab:AdminTab />
<adminbusTab:AdminbusTab />
<atmosTab:AtmosTab />
<tabs:RoundTab />
<tabs:ServerTab />
<panic:PanicBunkerTab Name="PanicBunkerControl" Access="Public" />
<baby:BabyJailTab Name="BabyJailControl" Access="Public" />
<playerTab:PlayerTab Name="PlayerTabControl" Access="Public" />
<objectsTab:ObjectsTab Name="ObjectsTabControl" Access="Public" />
</TabContainer>
Expand Down
5 changes: 0 additions & 5 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ public AdminMenuWindow()
MasterTabContainer.SetTabTitle((int) TabIndex.Round, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Server, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.PanicBunker, Loc.GetString("admin-menu-panic-bunker-tab"));
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*/
MasterTabContainer.SetTabTitle((int) TabIndex.BabyJail, Loc.GetString("admin-menu-baby-jail-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Players, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Objects, Loc.GetString("admin-menu-objects-tab"));
MasterTabContainer.OnTabChanged += OnTabChanged;
Expand Down Expand Up @@ -52,7 +48,6 @@ private enum TabIndex
Round,
Server,
PanicBunker,
BabyJail,
Players,
Objects,
}
Expand Down
Loading

0 comments on commit f3363cc

Please sign in to comment.