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

Up091124 #76

Merged
merged 37 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cae3dd9
Restore https://github.com/new-frontiers-14/frontier-station-14/pull/…
dvir001 Nov 3, 2024
c25fb31
Diagonal grille fix (#2356)
blackknight954 Nov 3, 2024
0d77ccd
Automatic Changelog (#2356)
FrontierATC Nov 3, 2024
cb40107
Remove Goblinbane (#2362)
ErhardSteinhauer Nov 4, 2024
9a7edb2
Automatic Changelog (#2362)
FrontierATC Nov 4, 2024
56b4a0a
Dungeon enemies rebalance: Explorers & Punks (#2273)
ErhardSteinhauer Nov 4, 2024
ae0fd2b
Automatic Changelog (#2273)
FrontierATC Nov 4, 2024
a885f68
Fix for my terrible terribleness (#2369)
dustylens Nov 5, 2024
2f45305
Automatic Changelog (#2369)
FrontierATC Nov 5, 2024
78b49de
LVHI Posters (New) (#2344)
ErhardSteinhauer Nov 6, 2024
5a6eed3
Automatic Changelog (#2344)
FrontierATC Nov 6, 2024
52208e2
Holoflare pistol (#2338)
ErhardSteinhauer Nov 6, 2024
f3d92fa
Automatic Changelog (#2338)
FrontierATC Nov 6, 2024
00fb738
Flare Dispenser (#2357)
ErhardSteinhauer Nov 6, 2024
f71a9af
Automatic Changelog (#2357)
FrontierATC Nov 6, 2024
1e46518
VGRoids events (#2361)
dvir001 Nov 6, 2024
ebda287
Automatic Changelog (#2361)
FrontierATC Nov 6, 2024
d783be8
Reduce power flickering by increasing APC supply tolerance to 15 kW. …
whatston3 Nov 6, 2024
696ad2a
Automatic Changelog (#2352)
FrontierATC Nov 6, 2024
1fb414c
Botany: drop items when harvesting or clipping seeds (#2374)
whatston3 Nov 7, 2024
ff9ee16
Automatic Changelog (#2374)
FrontierATC Nov 7, 2024
4a1af79
Shuttle records console to allow copying ship deeds (#2214)
GreaseMonk Nov 7, 2024
47defee
Automatic Changelog (#2214)
FrontierATC Nov 7, 2024
488d990
Hammer (Update): Directional fans + tweaks (#2323)
arimah Nov 7, 2024
d0685a6
Automatic Changelog (#2323)
FrontierATC Nov 7, 2024
de04ae4
Log used id card (#2371)
GreaseMonk Nov 8, 2024
9897639
HealthChange: explicitly check non-even dmg dists (#2370)
whatston3 Nov 8, 2024
33ae321
Automatic Changelog (#2370)
FrontierATC Nov 8, 2024
ac0cad6
Empty mag lathe fix (#2376)
ErhardSteinhauer Nov 8, 2024
496ab63
Automatic Changelog (#2376)
FrontierATC Nov 8, 2024
335f7a4
Destroy lingering shuttle grids on sale. (#2379)
whatston3 Nov 8, 2024
8cd46cd
Automatic Changelog (#2379)
FrontierATC Nov 8, 2024
57f4475
Fix botany bags fit in toolbelt (#2380)
GreaseMonk Nov 8, 2024
6c18cfc
Automatic Changelog (#2380)
FrontierATC Nov 8, 2024
8a38a09
Remove curse from the golden mask. (#2381)
Leander-0 Nov 9, 2024
68fa234
Automatic Changelog (#2381)
FrontierATC Nov 9, 2024
c69bf56
conflicts
Zekins3366 Nov 9, 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
6 changes: 3 additions & 3 deletions Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public IdCardConsoleWindow(IdCardConsoleBoundUserInterface owner, IPrototypeMana
};
JobTitleSaveButton.OnPressed += _ => SubmitData();

ShipNameLineEdit.OnTextChanged += _ => EnsureValidShuttleName();
ShipSuffixLineEdit.OnTextChanged += _ => EnsureValidShuttleName();
ShipNameSaveButton.OnPressed += _ => SubmitShuttleData();
ShipNameLineEdit.OnTextChanged += _ => EnsureValidShuttleName(); // Frontier
ShipSuffixLineEdit.OnTextChanged += _ => EnsureValidShuttleName(); // Frontier
ShipNameSaveButton.OnPressed += _ => SubmitShuttleData(); // Frontier

var jobs = _prototypeManager.EnumeratePrototypes<JobPrototype>().ToList();
jobs.Sort((x, y) => string.Compare(x.LocalizedName, y.LocalizedName, StringComparison.CurrentCulture));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Content.Client._NF.ShuttleRecords.UI;
using Content.Shared._NF.ShuttleRecords;
using Content.Shared._NF.ShuttleRecords.Components;
using Content.Shared._NF.ShuttleRecords.Events;
using Content.Shared.Containers.ItemSlots;

namespace Content.Client._NF.ShuttleRecords.BUI;

public sealed class ShuttleRecordsConsoleBoundUserInterface(
EntityUid owner,
Enum uiKey
) : BoundUserInterface(owner, uiKey)
{
private ShuttleRecordsWindow? _window;

protected override void Open()
{
base.Open();
_window ??= new ShuttleRecordsWindow();
_window.OnCopyDeed += CopyDeed;
_window.TargetIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(ShuttleRecordsConsoleComponent.TargetIdCardSlotId));

_window.OpenCentered();
}

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

if (_window == null || state is not ShuttleRecordsConsoleInterfaceState shuttleRecordsConsoleInterfaceState)
return;

_window?.UpdateState(shuttleRecordsConsoleInterfaceState);
}

/*
* This black magic code prevents multiple pop ups of the window from appearing.
*/
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;
_window?.Dispose();
}

private void CopyDeed(ShuttleRecord shuttleRecord)
{
if (!EntMan.GetEntity(shuttleRecord.EntityUid).Valid)
return;

SendMessage(new CopyDeedMessage(shuttleRecord.EntityUid));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<PanelContainer xmlns="https://spacestation14.io"
Access="Public"
HorizontalExpand="True"
VerticalExpand="True"
MinSize="250 300">
<BoxContainer Orientation="Vertical" SeparationOverride="4">
<Label Name="ShuttleName" Margin="4 0 0 0" />
<Label Name="ShuttleOwner" Margin="4 0 0 0" />
<Label Name="ShuttleActivity" Margin="4 0 0 0" />
<Label Name="ShuttlePrice" Margin="4 0 0 0" />
<RichTextLabel Name="TimeOfPurchase" Margin="4 0 0 0" Access="Public" />
<Label Name="VoucherStatus" Margin="4 0 0 0" FontColorOverride="Yellow" />
<Button Name="CopyDeedButton"
Access="Public"
Text=""
TextAlign="Center"
Margin="5"
StyleIdentifier="mainMenu">

<BoxContainer Orientation="Vertical" Access="Public" Margin="5">
<Label Name="CopyDeedButtonLabel" Access="Public" Text="{Loc 'shuttle-records-copy-deed-button'}"/>
<Label Name="TransactionCostLabel" Text=""/>
</BoxContainer>
</Button>
</BoxContainer>
</PanelContainer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using Content.Client.Message;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client._NF.ShuttleRecords.UI;

[GenerateTypedNameReferences]
public sealed partial class ShuttleRecordDetailsControl : PanelContainer
{
public sealed class ViewState(string shuttleName, string shuttleOwnerName, string activity, string toolTip, string timeOfPurchase, string voucherStatus, string transactionCost, string shuttlePrice)
{
public string ShuttleName { get; } = shuttleName;

public string ShuttleOwnerName { get; } = shuttleOwnerName;

public string Activity { get; } = activity;

public string ShuttlePrice { get; } = shuttlePrice;

public string ToolTip { get; } = toolTip;

public string TimeOfPurchase { get; } = timeOfPurchase;

public string VoucherStatus { get; } = voucherStatus;

public string TransactionCost { get; } = transactionCost;
}

public ShuttleRecordDetailsControl(ViewState state)
{
RobustXamlLoader.Load(this);
ShuttleName.Text = state.ShuttleName;
ShuttleOwner.Text = state.ShuttleOwnerName;
ShuttleActivity.Text = state.Activity;
ShuttlePrice.Text = state.ShuttlePrice;
VoucherStatus.Text = state.VoucherStatus;
TimeOfPurchase.SetMarkup(state.TimeOfPurchase);
TransactionCostLabel.Text = state.TransactionCost;
ToolTip = state.ToolTip;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Button xmlns="https://spacestation14.io">
<BoxContainer Orientation="Horizontal">
<Label Name="ShuttleName" Margin="4 0 0 0"/>
</BoxContainer>
</Button>
26 changes: 26 additions & 0 deletions Content.Client/_NF/ShuttleRecords/UI/ShuttleRecordListItem.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client._NF.ShuttleRecords.UI;

[GenerateTypedNameReferences]
public sealed partial class ShuttleRecordListItem : Button
{
public sealed class ViewState(string shuttleName, string toolTip = "", bool disabled = false)
{
public string ShuttleName { get; } = shuttleName;

public bool Disabled { get; } = disabled;

public string ToolTip { get; } = toolTip;
}

public ShuttleRecordListItem(ViewState state)
{
RobustXamlLoader.Load(this);
ShuttleName.Text = state.ShuttleName;
ToolTip = state.ToolTip;
Disabled = state.Disabled;
}
}
66 changes: 66 additions & 0 deletions Content.Client/_NF/ShuttleRecords/UI/ShuttleRecordsWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'shuttle-records-console-window-title'}"
MinSize="700 510">

<BoxContainer Orientation="Vertical">

<PanelContainer>
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#1B1E1B" />
</PanelContainer.PanelOverride>

<GridContainer Columns="3" HorizontalExpand="True" Margin="10">
<Label Text="{Loc 'id-card-console-window-target-id'}" />
<Button Name="TargetIdButton" Access="Public" />
<Label Name="TargetIdLabel" />
<Label Text="{Loc 'id-card-console-window-ship-name-label'}" />
<Label Name="ShipNameLabel" />
</GridContainer>
</PanelContainer>

<BoxContainer HorizontalExpand="True" VerticalExpand="True" Orientation="Horizontal" Margin="10">

<BoxContainer Orientation="Vertical" Margin="0 0 10 0" VerticalExpand="True">
<BoxContainer Orientation="Vertical" Margin="0 0 0 5">
<Label Text="{Loc 'shuttle-records-search'}" StyleClasses="LabelSubText" Margin="0 0 5 0" />
<BoxContainer Orientation="Horizontal">
<LineEdit Name="SearchText" Access="Public" MinHeight="30" SetWidth="200" />
<Button Name="ClearSearchButton" Access="Public" Text="✖" Margin="5 0 0 0" />
</BoxContainer>
<CheckBox Name="ShowActiveOnlyCheckbox" Text="{Loc 'shuttle-records-show-active-only'}" />
</BoxContainer>

<BoxContainer Orientation="Vertical" MinSize="250 300" VerticalExpand="True">
<PanelContainer VerticalExpand="True" HorizontalExpand="True">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BorderThickness="2" BorderColor="#777777" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical"
VerticalExpand="True"
HorizontalExpand="True"
SetWidth="240">

<ScrollContainer HorizontalExpand="True"
VerticalExpand="True"
VScrollEnabled="True">
<BoxContainer Name="ShuttleRecordList"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
MinSize="50 50"
Margin="4">
</BoxContainer>
</ScrollContainer>
</BoxContainer>
</PanelContainer>
</BoxContainer>
</BoxContainer>

<BoxContainer Name="ShuttleRecordDetailsContainer" Orientation="Vertical" MinSize="250 250" VerticalExpand="True">
<Label Text="{Loc 'shuttle-records-detail-title'}" />
</BoxContainer>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
Loading
Loading