Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 33 additions & 29 deletions Content.Client/Cargo/UI/BountyEntry.xaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
<BoxContainer xmlns="https://spacestation14.io"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
Margin="10 10 10 0"
HorizontalExpand="True"
Visible="True">
<PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True">
<BoxContainer Orientation="Vertical"
HorizontalExpand="True">
<BoxContainer Orientation="Horizontal">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<RichTextLabel Name="RewardLabel"/>
<RichTextLabel Name="ManifestLabel"/>
<BoxContainer
HorizontalExpand="True"
Margin="10,10,10,0"
Visible="True"
xmlns="https://spacestation14.io"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls">
<PanelContainer HorizontalExpand="True" StyleClasses="BackgroundPanel">
<BoxContainer HorizontalExpand="True" Orientation="Vertical">
<GridContainer Columns="2" HorizontalExpand="True">
<BoxContainer HorizontalExpand="True" Orientation="Vertical">
<RichTextLabel Name="RewardLabel" />
<RichTextLabel Margin="0,0,150,0" Name="ManifestLabel" />
</BoxContainer>
<Control MinWidth="10"/>
<BoxContainer Orientation="Vertical" MinWidth="120">
<BoxContainer Orientation="Horizontal" MinWidth="120">
<Button Name="PrintButton"
Text="{Loc 'bounty-console-label-button-text'}"
HorizontalExpand="False"
HorizontalAlignment="Right"
StyleClasses="OpenRight"/>
<Button Name="SkipButton"
Text="{Loc 'bounty-console-skip-button-text'}"
HorizontalExpand="False"
HorizontalAlignment="Right"
StyleClasses="OpenLeft"/>
<BoxContainer MinWidth="120" Orientation="Vertical">
<BoxContainer MinWidth="120" Orientation="Horizontal">
<Button
HorizontalAlignment="Right"
HorizontalExpand="False"
Name="PrintButton"
StyleClasses="OpenRight"
Text="{Loc 'bounty-console-label-button-text'}" />
<Button
HorizontalAlignment="Right"
HorizontalExpand="False"
Name="SkipButton"
StyleClasses="OpenLeft"
Text="{Loc 'bounty-console-skip-button-text'}" />
</BoxContainer>
<RichTextLabel Name="IdLabel" HorizontalAlignment="Right" Margin="0 0 5 0"/>
<RichTextLabel
HorizontalAlignment="Right"
Margin="0,0,5,0"
Name="IdLabel" />
</BoxContainer>
</BoxContainer>
<customControls:HSeparator Margin="5 10 5 10"/>
</GridContainer>
<customControls:HSeparator Margin="5,10,5,10" />
<BoxContainer>
<RichTextLabel Name="DescriptionLabel"/>
<RichTextLabel Name="DescriptionLabel" />
</BoxContainer>
</BoxContainer>
</PanelContainer>
Expand Down
28 changes: 19 additions & 9 deletions Content.Client/Cargo/UI/BountyEntry.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// SPDX-FileCopyrightText: 2023-2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
// SPDX-FileCopyrightText: 2024-2025 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
// SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
// SPDX-FileCopyrightText: 2026 Gansu <peat.allan13@gmail.com>
// SPDX-FileCopyrightText: 2026 taydeo <tay@funkystation.org>
// SPDX-FileCopyrightText: 2026 taydeo <td12233a@gmail.com>
// SPDX-License-Identifier: MIT

using Content.Client.Message;
Expand Down Expand Up @@ -33,19 +36,26 @@ public BountyEntry(CargoBountyData bounty, TimeSpan untilNextSkip)

UntilNextSkip = untilNextSkip;

if (!_prototype.Resolve<CargoBountyPrototype>(bounty.Bounty, out var bountyPrototype))
return;

var items = new List<string>();
foreach (var entry in bountyPrototype.Entries)
foreach (var entry in bounty.Entries) // Funky Station
{
items.Add(Loc.GetString("bounty-console-manifest-entry",
("amount", entry.Amount),
("item", Loc.GetString(entry.Name))));
switch (entry)
{
case CargoObjectBountyItemData objectBounty:
items.Add(Loc.GetString("bounty-console-manifest-entry",
("amount", entry.Amount),
("item", Loc.GetString(entry.Name))));
break;
case CargoReagentBountyItemData reagentBounty:
items.Add(Loc.GetString("bounty-console-manifest-entry-reagent",
("amount", entry.Amount),
("item", Loc.GetString(entry.Name))));
break;
}
}
ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items))));
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward)));
DescriptionLabel.SetMarkup(Loc.GetString("bounty-console-description-label", ("description", Loc.GetString(bountyPrototype.Description))));
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bounty.Reward))); // Funky Station
DescriptionLabel.SetMarkup(Loc.GetString("bounty-console-description-label", ("description", Loc.GetString(bounty.Description)))); // Funky Station
IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id)));

PrintButton.OnPressed += _ => OnLabelButtonPressed?.Invoke();
Expand Down
10 changes: 5 additions & 5 deletions Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// SPDX-FileCopyrightText: 2025 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
// SPDX-FileCopyrightText: 2025 BarryNorfolk <barrynorfolkman@protonmail.com>
// SPDX-FileCopyrightText: 2026 Gansu <peat.allan13@gmail.com>
// SPDX-FileCopyrightText: 2026 taydeo <tay@funkystation.org>
// SPDX-FileCopyrightText: 2026 taydeo <td12233a@gmail.com>
// SPDX-License-Identifier: MIT

using Content.Client.Message;
Expand All @@ -23,19 +26,16 @@ public BountyHistoryEntry(CargoBountyHistoryData bounty)
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

if (!_prototype.Resolve(bounty.Bounty, out var bountyPrototype))
return;

var items = new List<string>();
foreach (var entry in bountyPrototype.Entries)
foreach (var entry in bounty.Bounty.Entries) // Funky Station
{
items.Add(Loc.GetString("bounty-console-manifest-entry",
("amount", entry.Amount),
("item", Loc.GetString(entry.Name))));
}

ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items))));
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward)));
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bounty.Bounty.Reward))); // Funky Station
IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id)));

TimestampLabel.SetMarkup(bounty.Timestamp.ToString(@"hh\:mm\:ss"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
// SPDX-FileCopyrightText: 2024 wafehling <wafehling@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 BarryNorfolk <barrynorfolkman@protonmail.com>
// SPDX-FileCopyrightText: 2026 Gansu <peat.allan13@gmail.com>
// SPDX-FileCopyrightText: 2026 taydeo <tay@funkystation.org>
// SPDX-FileCopyrightText: 2026 taydeo <td12233a@gmail.com>
// SPDX-License-Identifier: MIT

using Content.Shared.Cargo;
Expand Down Expand Up @@ -66,5 +69,5 @@ public sealed partial class StationCargoBountyDatabaseComponent : Component
/// The time between skipping bounties.
/// </summary>
[DataField]
public TimeSpan SkipDelay = TimeSpan.FromMinutes(15);
public TimeSpan SkipDelay = TimeSpan.FromMinutes(3);
}
Loading
Loading