Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream #24

Closed
wants to merge 73 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
d49eabc
Partial cherry-pick: Loadouts redux (#25715)
metalgearsloth Apr 22, 2024
ec146b6
Role prototypes
NullWanderer Apr 22, 2024
c3e31ea
Loadout prototypes
NullWanderer Apr 22, 2024
ed30034
Swap loneop loadout
NullWanderer Apr 22, 2024
be421b3
Fix TryRequirementMet call
NullWanderer Apr 22, 2024
84b0e08
Fix starting gear (#27008)
metalgearsloth Apr 16, 2024
b69393c
Fix senior ID cards and other loadout shit (#27017)
Dutch-VanDerLinde Apr 16, 2024
694d795
Add autism pins to loadout (#27034)
Doctor-Cpu Apr 17, 2024
4afcc29
Civilian loadout prototypes
NullWanderer Apr 22, 2024
215fced
LobbyUI fixes (#27033)
metalgearsloth Apr 17, 2024
d5e2eaa
Add Nun Hood to Chaplain loadout options (#27025)
BellwetherLogic Apr 17, 2024
f12fd1f
add ancient jumpsuit to passenger loadout (#27035)
Dutch-VanDerLinde Apr 17, 2024
5525623
Add jani gloves loadout (#27011)
lzk228 Apr 17, 2024
5e7224f
Fix PDA and ID card data not getting set on loadouts (#27062)
ShadowCommander Apr 17, 2024
ba30160
add greysec loadout (#27023)
Dutch-VanDerLinde Apr 18, 2024
78df6d3
Add Hardhats to Station Engineer Loadouts (#27044)
Pangogie Apr 18, 2024
f84ff2b
Fix loadouts UI not refreshing on char change (#27075)
metalgearsloth Apr 18, 2024
05ff1e2
Fix character preview not updating on character change (#27043)
metalgearsloth Apr 17, 2024
6bacc54
add roboticist gear to science loadout (#27045)
Dutch-VanDerLinde Apr 18, 2024
ca847d4
Add medical gloves and sterile masks to medical loadouts (#27029)
Vermidia Apr 20, 2024
d91c0cc
Add rainbow jumpsuit to passenger loadout. (#27211)
Blackern5000 Apr 21, 2024
eb05117
Make remaining IPrototypes partial (#27157)
NullWanderer Apr 22, 2024
1b71e4a
Paradox Anomaly fix
NullWanderer Apr 22, 2024
fb24e46
Add winter coats and shoes to loadouts (#27022)
Dutch-VanDerLinde Apr 17, 2024
3fdd7e2
Adds security webbing and security belts to Security Officer loadout …
SpeltIncorrectyl Apr 21, 2024
fc44e83
Nyano loadout - Mail Carrier
NullWanderer Apr 22, 2024
4f5aad8
Nyano loadout - Forensic Mantis
NullWanderer Apr 22, 2024
74002a1
Merge remote-tracking branch 'refs/remotes/upstream/master' into 2024…
NullWanderer Apr 22, 2024
fc34e89
Nyano loadout - Prison Guard
NullWanderer Apr 22, 2024
bb24d00
Nyano loadouts - Prisoners
NullWanderer Apr 22, 2024
0eb6ae6
Prisoner starting gear adjustment
NullWanderer Apr 22, 2024
21c0824
Nyano loadout - Martial Artist
NullWanderer Apr 22, 2024
cf4bcdc
Nyano loadout - Gladiator
NullWanderer Apr 22, 2024
93faab4
Remove senior roles (#22303)
EmoGarbage404 Apr 22, 2024
b866d4d
Delta loadouts - misc gear changes
NullWanderer Apr 22, 2024
b5982aa
Split mail carrier and courier
NullWanderer Apr 22, 2024
dfb645e
Delta loadout - Courier
NullWanderer Apr 22, 2024
990a3f5
Adjust map prototypes for courier change
NullWanderer Apr 22, 2024
87d46da
Delta loadout - Brigmedic
NullWanderer Apr 22, 2024
8bf0255
Fix YAML validation errors
NullWanderer Apr 22, 2024
63ae5d5
Add courier to logistics
NullWanderer Apr 22, 2024
f754d10
Give couriers cargo backpacks instead of common
NullWanderer Apr 22, 2024
94beb33
Modify base localization
NullWanderer Apr 22, 2024
905a829
Loadout localization
NullWanderer Apr 22, 2024
fc9c3c4
Fix swapped filenames
NullWanderer Apr 22, 2024
1c08b7c
Additional courier loadouts
NullWanderer Apr 22, 2024
6bbba60
Some loadouts are optional
NullWanderer Apr 22, 2024
b2b419c
Further courier and mail carrier separation
NullWanderer Apr 22, 2024
1bf6119
Normalize localisation
NullWanderer Apr 22, 2024
7c4d38b
Merge branch 'master' into 2024/04/21-loadouts
A-z-z-y May 6, 2024
8db7894
Merge remote-tracking branch 'refs/remotes/upstream/master' into 2024…
NullWanderer May 7, 2024
1c6e18d
Glasses in loadouts (#27286)
Afrokada Apr 25, 2024
00a043e
Fix Loadout Editor not closing when Character Editor is closed. (#27539)
Ciac32 May 1, 2024
2f54f9c
Add correct lawyer bags to loadouts (#27573)
Vermidia May 1, 2024
9b85bc9
Experimental harpy jumpsuit displacement
NullWanderer May 7, 2024
f8bb40c
Cargonia update
NullWanderer May 7, 2024
cfdaacb
lighthouse fix (#1189)
deltanedas May 12, 2024
58d0656
Unflip hands for Felinid, Vulpkanin, Harpy (#1194)
angelofallars May 14, 2024
79839b9
Automatic changelog update
DeltaV-Bot May 14, 2024
9bbf4cf
Updated Asterisk (#1193)
Colin-Tel May 14, 2024
9b9fb94
Automatic changelog update
DeltaV-Bot May 14, 2024
03f9f66
Merge branch 'master' into 2024/04/21-loadouts
Colin-Tel May 14, 2024
11be510
Update Credits (#1187)
github-actions[bot] May 14, 2024
842a8db
Add Makeup
angelofallars May 14, 2024
6a5cfc6
Automatic changelog update
DeltaV-Bot May 14, 2024
12e2826
Paper signatures (#1172)
Mnemotechnician May 14, 2024
0c1e5f8
Automatic changelog update
DeltaV-Bot May 14, 2024
7f6449b
Remove EnsureJobRequirementsValid
NullWanderer May 15, 2024
7a0b89e
Remove incorrect values
NullWanderer May 15, 2024
7e3ba62
Temporary CI/CD fix (#1199)
NullWanderer May 15, 2024
f168cde
Merge branch 'master' into 2024/04/21-loadouts
NullWanderer May 15, 2024
9291c35
shipyard rewrite/port (#1171)
deltanedas May 15, 2024
f9ec70d
Merge pull request #1122 from DeltaV-Station/2024/04/21-loadouts
NullWanderer May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 8.0.100

- 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/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 8.0.100

- 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 @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 8.0.100

- 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/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 8.0.100

- 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/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 8.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion Content.Benchmarks/SpawnEquipDeleteBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ await _pair.Server.WaitPost(() =>
for (var i = 0; i < N; i++)
{
_entity = server.EntMan.SpawnAttachedTo(Mob, _coords);
_spawnSys.EquipStartingGear(_entity, _gear, null);
_spawnSys.EquipStartingGear(_entity, _gear);
server.EntMan.DeleteEntity(_entity);
}
});
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<ItemGroup>
<Folder Include="Spawners\" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Lobby\UI\LobbyCharacterPreviewPanel.cs" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
</Project>
5 changes: 5 additions & 0 deletions Content.Client/DeltaV/Shipyard/ShipyardConsoleSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Content.Shared.Shipyard;

namespace Content.Client.Shipyard;

public sealed class ShipyardConsoleSystem : SharedShipyardConsoleSystem;
56 changes: 56 additions & 0 deletions Content.Client/DeltaV/Shipyard/UI/ShipyardBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using Content.Shared.Access.Systems;
using Content.Shared.Shipyard;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.DeltaV.Shipyard.UI;

public sealed class ShipyardConsoleBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IPlayerManager _player = default!;

private readonly AccessReaderSystem _access;

[ViewVariables]
private ShipyardConsoleMenu? _menu;

public ShipyardConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_access = EntMan.System<AccessReaderSystem>();
}

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

_menu = new ShipyardConsoleMenu(Owner, _proto, EntMan, _player, _access);
_menu.OpenCentered();
_menu.OnClose += Close;
_menu.OnPurchased += Purchase;
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);

if (state is not ShipyardConsoleState cast)
return;

_menu?.UpdateState(cast);
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);

if (disposing)
_menu?.Dispose();
}

private void Purchase(string id)
{
SendMessage(new ShipyardConsolePurchaseMessage(id));
}
}
29 changes: 29 additions & 0 deletions Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="500 360"
MinSize="460 280"
Title="{Loc 'shipyard-console-menu-title'}">
<BoxContainer Orientation="Vertical" Margin="5 0 5 0">
<Label Name="BankAccountLabel" />
<BoxContainer Orientation="Horizontal">
<OptionButton Name="Categories"
Prefix="{Loc 'cargo-console-menu-categories-label'}"
HorizontalExpand="True" />
<LineEdit Name="SearchBar"
PlaceHolder="{Loc 'cargo-console-menu-search-bar-placeholder'}"
HorizontalExpand="True" />
</BoxContainer>
<ScrollContainer HorizontalExpand="True"
VerticalExpand="True"
SizeFlagsStretchRatio="6">
<BoxContainer Name="Vessels"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True">
<!-- Vessels get added here by code -->
</BoxContainer>
</ScrollContainer>
<TextureButton VerticalExpand="True" />
</BoxContainer>
</controls:FancyWindow>
110 changes: 110 additions & 0 deletions Content.Client/DeltaV/Shipyard/UI/ShipyardConsoleMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.Access.Systems;
using Content.Shared.Shipyard;
using Content.Shared.Shipyard.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;

namespace Content.Client.DeltaV.Shipyard.UI;

[GenerateTypedNameReferences]
public sealed partial class ShipyardConsoleMenu : FancyWindow
{
private readonly AccessReaderSystem _access;
private readonly IPlayerManager _player;

public event Action<string>? OnPurchased;

private readonly List<VesselPrototype> _vessels = new();
private readonly List<string> _categories = new();

public Entity<ShipyardConsoleComponent> Console;
private string? _category;

public ShipyardConsoleMenu(EntityUid console, IPrototypeManager proto, IEntityManager entMan, IPlayerManager player, AccessReaderSystem access)
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

Console = (console, entMan.GetComponent<ShipyardConsoleComponent>(console));
_access = access;
_player = player;

// don't include ships that aren't allowed by whitelist, server won't accept them anyway
foreach (var vessel in proto.EnumeratePrototypes<VesselPrototype>())
{
if (vessel.Whitelist?.IsValid(console, entMan) != false)
_vessels.Add(vessel);
}
_vessels.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.CurrentCultureIgnoreCase));

// only list categories in said ships
foreach (var vessel in _vessels)
{
foreach (var category in vessel.Categories)
{
if (!_categories.Contains(category))
_categories.Add(category);
}
}

_categories.Sort();
// inserting here and not adding at the start so it doesn't get affected by sort
_categories.Insert(0, Loc.GetString("cargo-console-menu-populate-categories-all-text"));
PopulateCategories();

SearchBar.OnTextChanged += _ => PopulateProducts();
Categories.OnItemSelected += args =>
{
_category = args.Id == 0 ? null : _categories[args.Id];
Categories.SelectId(args.Id);
PopulateProducts();
};
}

/// <summary>
/// Populates the list of products that will actually be shown, using the current filters.
/// </summary>
private void PopulateProducts()
{
Vessels.RemoveAllChildren();

var access = _player.LocalSession?.AttachedEntity is {} player
&& _access.IsAllowed(player, Console);

var search = SearchBar.Text.Trim().ToLowerInvariant();
foreach (var vessel in _vessels)
{
if (search.Length != 0 && !vessel.Name.ToLowerInvariant().Contains(search))
continue;
if (_category != null && !vessel.Categories.Contains(_category))
continue;

var vesselEntry = new VesselRow(vessel, access);
vesselEntry.OnPurchasePressed += () => OnPurchased?.Invoke(vessel.ID);
Vessels.AddChild(vesselEntry);
}
}

/// <summary>
/// Populates the list categories that will actually be shown, using the current filters.
/// </summary>
private void PopulateCategories()
{
Categories.Clear();
foreach (var category in _categories)
{
Categories.AddItem(category);
}
}

public void UpdateState(ShipyardConsoleState state)
{
BankAccountLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", state.Balance.ToString()));
PopulateProducts();
}
}
16 changes: 16 additions & 0 deletions Content.Client/DeltaV/Shipyard/UI/VesselRow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<PanelContainer xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
HorizontalExpand="True">
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True">
<Button Name="Purchase" Text="{Loc 'purchase'}" StyleClasses="LabelSubText" />
<Label Name="VesselName" HorizontalExpand="True" />
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#25252A" />
</PanelContainer.PanelOverride>

<Label Name="Price" MinSize="52 32" Align="Right" />
</PanelContainer>
</BoxContainer>
</PanelContainer>
29 changes: 29 additions & 0 deletions Content.Client/DeltaV/Shipyard/UI/VesselRow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Content.Shared.Shipyard.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;

namespace Content.Client.DeltaV.Shipyard.UI;

[GenerateTypedNameReferences]
public sealed partial class VesselRow : PanelContainer
{
public event Action? OnPurchasePressed;

public VesselRow(VesselPrototype vessel, bool access)
{
RobustXamlLoader.Load(this);

VesselName.Text = vessel.Name;

var tooltip = new Tooltip();
tooltip.SetMessage(FormattedMessage.FromMarkup(vessel.Description));
Purchase.TooltipSupplier = _ => tooltip;
Purchase.Disabled = !access;
Purchase.OnPressed += _ => OnPurchasePressed?.Invoke();

Price.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", vessel.Price));
}
}
44 changes: 24 additions & 20 deletions Content.Client/IoC/ClientContentIoC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Content.Client.Guidebook;
using Content.Client.Replay;
using Content.Shared.Administration.Managers;
using Content.Shared.Players.PlayTimeTracking;


namespace Content.Client.IoC
Expand All @@ -29,26 +30,29 @@ internal static class ClientContentIoC
{
public static void Register()
{
IoCManager.Register<IParallaxManager, ParallaxManager>();
IoCManager.Register<IChatManager, ChatManager>();
IoCManager.Register<IClientPreferencesManager, ClientPreferencesManager>();
IoCManager.Register<IStylesheetManager, StylesheetManager>();
IoCManager.Register<IScreenshotHook, ScreenshotHook>();
IoCManager.Register<FullscreenHook, FullscreenHook>();
IoCManager.Register<IClickMapManager, ClickMapManager>();
IoCManager.Register<IClientAdminManager, ClientAdminManager>();
IoCManager.Register<ISharedAdminManager, ClientAdminManager>();
IoCManager.Register<EuiManager, EuiManager>();
IoCManager.Register<IVoteManager, VoteManager>();
IoCManager.Register<ChangelogManager, ChangelogManager>();
IoCManager.Register<RulesManager, RulesManager>();
IoCManager.Register<ViewportManager, ViewportManager>();
IoCManager.Register<ISharedAdminLogManager, SharedAdminLogManager>();
IoCManager.Register<GhostKickManager>();
IoCManager.Register<ExtendedDisconnectInformationManager>();
IoCManager.Register<JobRequirementsManager>();
IoCManager.Register<DocumentParsingManager>();
IoCManager.Register<ContentReplayPlaybackManager, ContentReplayPlaybackManager>();
var collection = IoCManager.Instance!;

collection.Register<IParallaxManager, ParallaxManager>();
collection.Register<IChatManager, ChatManager>();
collection.Register<IClientPreferencesManager, ClientPreferencesManager>();
collection.Register<IStylesheetManager, StylesheetManager>();
collection.Register<IScreenshotHook, ScreenshotHook>();
collection.Register<FullscreenHook, FullscreenHook>();
collection.Register<IClickMapManager, ClickMapManager>();
collection.Register<IClientAdminManager, ClientAdminManager>();
collection.Register<ISharedAdminManager, ClientAdminManager>();
collection.Register<EuiManager, EuiManager>();
collection.Register<IVoteManager, VoteManager>();
collection.Register<ChangelogManager, ChangelogManager>();
collection.Register<RulesManager, RulesManager>();
collection.Register<ViewportManager, ViewportManager>();
collection.Register<ISharedAdminLogManager, SharedAdminLogManager>();
collection.Register<GhostKickManager>();
collection.Register<ExtendedDisconnectInformationManager>();
collection.Register<JobRequirementsManager>();
collection.Register<DocumentParsingManager>();
collection.Register<ContentReplayPlaybackManager, ContentReplayPlaybackManager>();
collection.Register<ISharedPlaytimeManager, JobRequirementsManager>();
}
}
}
Loading
Loading