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 merge 14/9 #1825

Merged
merged 174 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
383c8cb
fix paper label whitelist (#31919)
lzk228 Sep 7, 2024
42271c8
Automatic changelog update
PJBot Sep 7, 2024
8007923
uranium ammo mag being called rubber ammo mag fixed (#31934)
Boaz1111 Sep 7, 2024
f1c2a08
fix wall closet storage range (#31933)
qwerltaz Sep 7, 2024
7ae4736
fix flammable reagents deigniting you (#31930)
Ilya246 Sep 7, 2024
dbda045
Automatic changelog update
PJBot Sep 7, 2024
2deffd5
Damaged by contact fix (#31921)
Kirus59 Sep 7, 2024
4d2835a
Returned functionality to industrial reagent grinders (#31903)
LucasTheDrgn Sep 7, 2024
9803206
Automatic changelog update
PJBot Sep 7, 2024
2bf7941
Biogenerator (#30694)
EmoGarbage404 Sep 8, 2024
d3db3fa
Cook-able cutlets for kebabs/tacos (#31048)
themias Aug 15, 2024
ebedcbd
Automatic changelog update
PJBot Sep 8, 2024
a59f68e
Metamorphosis - FoodSequence 3 (#31012)
TheShuEd Sep 8, 2024
56222d2
Automatic changelog update
PJBot Sep 8, 2024
f51d37b
Add completions to addobjective and localize it (#30456)
nikthechampiongr Sep 8, 2024
2f0a9d0
Automatic changelog update
PJBot Sep 8, 2024
486c4f6
Update submodule to 233.1.0 (#31954)
metalgearsloth Sep 8, 2024
da10fbe
FTL + AI fixes (#31952)
metalgearsloth Sep 8, 2024
7edafdd
Automatic changelog update
PJBot Sep 8, 2024
9ffcab8
Fixes being able to craft the justice helmet with a justice helmet (#…
PopGamer45 Sep 8, 2024
e090669
Automatic changelog update
PJBot Sep 8, 2024
c74dd51
some securiby contra fixes (#31956)
Killerqu00 Sep 8, 2024
16f1600
Automatic changelog update
PJBot Sep 8, 2024
5122aa8
Make random sentience actually happen (#31953)
Psychpsyo Sep 8, 2024
4d9664f
Automatic changelog update
PJBot Sep 8, 2024
eca508f
remove HatBase (#31971)
lzk228 Sep 8, 2024
16fe765
Revert "FTL + AI fixes (#31952)" (#31968)
slarticodefast Sep 8, 2024
4848df8
Rings now give a small amout of gold / silver when scrapped (#31847)
beck-thompson Sep 8, 2024
c30a178
Automatic changelog update
PJBot Sep 8, 2024
51d237a
Update PULL_REQUEST_TEMPLATE.md (#31046)
lzk228 Sep 8, 2024
a275185
Radiation blocker values for directional plasma and uranium windows (…
K-Dynamic Sep 8, 2024
c7d2a22
Automatic changelog update
PJBot Sep 8, 2024
79ba3be
Corrects some typos in the uplink catalog, adjusts grammar (#31989)
HerCoyote23 Sep 8, 2024
517aad0
Add SetEntity(Owner) so can view APC sprite in UI (Bug fix) (#31962)
jamessimo Sep 8, 2024
7301fe4
fix moffra antennae (#31981)
Sadie-silly Sep 9, 2024
b125579
make laid power cables more visible (#32000)
qwerltaz Sep 9, 2024
c8c043a
Automatic changelog update
PJBot Sep 9, 2024
5c86668
Budget insuls leaves behind frayed insulative fibers instead of insul…
ArtisticRoomba Sep 9, 2024
8eaf35a
Automatic changelog update
PJBot Sep 9, 2024
9cb75c9
Make mobs without hands unable to spill jugs (#31438)
slarticodefast Sep 9, 2024
e1eba1a
Automatic changelog update
PJBot Sep 9, 2024
1a94de8
Extend shuttle dock time if the shuttle doesn't dock at evac. (#31496)
PJB3005 Sep 9, 2024
2106999
Automatic changelog update
PJBot Sep 9, 2024
5db6ab6
make laid power cables more visible v2 (#32008)
qwerltaz Sep 9, 2024
f2280ab
pacifists can use grappling guns (#32014)
Boaz1111 Sep 9, 2024
7cec017
Automatic changelog update
PJBot Sep 9, 2024
66b0f46
Allow all bots to be used for chameleon projector (#32006)
lzk228 Sep 9, 2024
9ab2047
Automatic changelog update
PJBot Sep 9, 2024
01c1fc6
Automatic changelog update
PJBot Sep 9, 2024
ae76587
fix dragon spawn location and round end summary (#31890)
qwerltaz Sep 9, 2024
1cbef89
Automatic changelog update
PJBot Sep 9, 2024
75cca5e
Surveillance camera's red light fixes (#31831)
godisdeadLOL Sep 9, 2024
5ded560
Automatic changelog update
PJBot Sep 9, 2024
664e0cc
Add easy window upgrading, fix some other window issues. (#31978)
Blackern5000 Sep 9, 2024
fa33476
Automatic changelog update
PJBot Sep 9, 2024
283eacd
Nuke Now Requires the Disk to be Inserted to Toggle Anchor (#29565)
Cojoke-dot Sep 9, 2024
a63fb35
Properly credit contributors who were truncated by GitHub API (#31739)
mirrorcult Sep 9, 2024
e136136
Automatic changelog update
PJBot Sep 9, 2024
ecf2ea7
Display agents' jobs in the Round End Summary window (#31652)
Hreno Sep 9, 2024
e4750a5
Automatic changelog update
PJBot Sep 9, 2024
2e2951c
clean up electronics lathe recipes (#31524)
deltanedas Sep 9, 2024
74c9652
Automatic changelog update
PJBot Sep 9, 2024
2d19c03
Completes secure wiring across all airlocks and windoors (#30794)
IamVelcroboy Sep 9, 2024
bfd9e17
Fix some contraband issues (#31606)
Winkarst-cpu Sep 9, 2024
15b44dc
Automatic changelog update
PJBot Sep 9, 2024
15b0315
Save unpublished news articles (#31491)
themias Sep 9, 2024
3999999
Fix spawnpref (#31892)
metalgearsloth Sep 9, 2024
e4ed9b5
Automatic changelog update
PJBot Sep 9, 2024
0636958
Special latejoin message for captain (#31991)
lzk228 Sep 9, 2024
15fa66b
Automatic changelog update
PJBot Sep 9, 2024
6b02985
Silly teal gloves for realsies this time :3 (#31865)
Thinbug0 Sep 9, 2024
88b988e
Automatic changelog update
PJBot Sep 9, 2024
b2209d3
Revert "Fix spawnpref" (#32018)
Emisse Sep 9, 2024
6d71cc7
New Space Ninja intro song (#31055)
chillyconmor Sep 9, 2024
d7d8f57
Automatic changelog update
PJBot Sep 9, 2024
2e07872
Automatic changelog update
PJBot Sep 10, 2024
0a2088e
Impliment visitor ID, reorganize shuttle event and ghost role yml, st…
IProduceWidgets Sep 10, 2024
d5ddde7
Automatic changelog update
PJBot Sep 10, 2024
ec5375e
Renamed circuit boards to law boards (#31914)
ScarKy0 Sep 10, 2024
5599e3c
Automatic changelog update
PJBot Sep 10, 2024
46d4d7d
FoodSequence fix (#32034)
TheShuEd Sep 10, 2024
f8ec141
Arrivals timer fix (#32037)
ScarKy0 Sep 10, 2024
4357913
Fix justice helm crafting (#32042)
themias Sep 10, 2024
94b3f7e
Automatic changelog update
PJBot Sep 10, 2024
9279908
Removal of Maxcaps via cvar (#31437)
TurboTrackerss14 Sep 10, 2024
6b417f2
Automatic changelog update
PJBot Sep 10, 2024
870f74d
makes advanced atmospherics require the basic atmospherics tech (#32048)
Boaz1111 Sep 10, 2024
d752cf7
Automatic changelog update
PJBot Sep 10, 2024
8a85c49
fix: Check revenant ability costs correctly (#32050)
DisposableCrewmember42 Sep 10, 2024
c550927
Automatic changelog update
PJBot Sep 10, 2024
981135b
Fixes some common iconsmoothing oddities (#32051)
Flareguy Sep 10, 2024
84c434d
Adds salvage magnet board to the circuit imprinter (#31996)
ArtisticRoomba Sep 10, 2024
e7639d4
Automatic changelog update
PJBot Sep 10, 2024
61b1ba4
Revert Unknown Shuttle Antagonists (#32052)
LankLTE Sep 10, 2024
2cc307f
pro
Sep 14, 2024
0f9e02b
Automatic changelog update
PJBot Sep 10, 2024
6888519
Fixes Borgs and Syndicats getting hurt by glass shards and other thin…
Vermidia Sep 11, 2024
1971bc0
Automatic changelog update
PJBot Sep 11, 2024
5215e59
Mining Asteroid Treasure Vaults (#31638)
EmoGarbage404 Sep 11, 2024
94068f3
Automatic changelog update
PJBot Sep 11, 2024
c1a2d52
Remove ERP from RD Figurine voiceline (#32057)
Plykiya Sep 11, 2024
52c4875
Reapply "Fix spawnpref" (#32018) (#32058)
metalgearsloth Sep 11, 2024
da72477
Add "X.A.N.A." as an AI name (#31976)
PJB3005 Sep 11, 2024
7dc6709
Fix Station AI being affected by Bureaucratic Event (#32021)
SlamBamActionman Sep 11, 2024
b17f9be
Automatic changelog update
PJBot Sep 11, 2024
84de2e0
Reduced atmos canister sell price (#31965)
K-Dynamic Sep 11, 2024
c1ca889
Automatic changelog update
PJBot Sep 11, 2024
8381ec1
Hivelord mob (#31322)
EmoGarbage404 Sep 11, 2024
f02fa14
Automatic changelog update
PJBot Sep 11, 2024
d955033
TechAnomaly fixes (#32067)
TheShuEd Sep 11, 2024
4716413
Ore Processors can now produce Reinforced Glass (#32069)
PeccNeck Sep 11, 2024
e0a63b5
Automatic changelog update
PJBot Sep 11, 2024
11bc3ac
Fixes swords not being able to be used to make bats (#32075)
Plykiya Sep 11, 2024
bebaf1f
Reduce vertical margin on vending machine UI (#32074)
Plykiya Sep 11, 2024
f8d742b
Automatic changelog update
PJBot Sep 11, 2024
a7cb149
Banners are no longer indestructible (#32077)
Plykiya Sep 11, 2024
3be6887
Automatic changelog update
PJBot Sep 11, 2024
195fea6
Fix cauterization spam from space damage (#32080)
themias Sep 11, 2024
0a7b764
dont log missing ArtifactComponent for artifexium (#32073)
deltanedas Sep 11, 2024
83bed06
Automatic changelog update
PJBot Sep 11, 2024
608b2cd
add material composition to some salv treasure (#31970)
deltanedas Sep 11, 2024
a62d244
Automatic changelog update
PJBot Sep 11, 2024
fa04556
Make the pr link more visible in the changelog bot (#32047)
VasilisThePikachu Sep 11, 2024
df02b9a
Change forensic pad to use label isntead of name changing (#31842)
lzk228 Sep 12, 2024
6108045
Automatic changelog update
PJBot Sep 12, 2024
34b9ef9
fixes a ton of contraband issues (#32078)
Plykiya Sep 12, 2024
d6b5f6a
clean up robotics lathe recipes (#31522)
deltanedas Sep 12, 2024
9f4a8c9
clean up security lathe recipes (#31523)
deltanedas Sep 12, 2024
e9d59ad
Make context menu uses spritetree (#31792)
metalgearsloth Sep 12, 2024
cbd7e43
Fix latejoins (#32093)
metalgearsloth Sep 12, 2024
0f6e752
Update submodule to 234.0.0 (#32095)
metalgearsloth Sep 12, 2024
02b7b12
Reapply "FTL + AI fixes (#31952)" (#31968) (#32094)
metalgearsloth Sep 12, 2024
e661ba1
Update submodule to 234.1.0 (#32098)
metalgearsloth Sep 12, 2024
5a6a92c
Add ReagentWhitelist to Injector component and system (#28262)
blueDev2 Sep 12, 2024
bd54297
Add guidebook protodata tag: embed prototype values in guidebook text…
Tayrtahn Sep 12, 2024
a75de13
don't apply traits for borg and ai (#31990)
lzk228 Sep 12, 2024
76450de
Automatic changelog update
PJBot Sep 12, 2024
ba83e54
Smart tomato pet (#31932)
MrRobDemo Sep 12, 2024
9fe8ef3
Automatic changelog update
PJBot Sep 12, 2024
becd49e
Gave AI a comms console (#31852)
ScarKy0 Sep 12, 2024
2c234ce
Automatic changelog update
PJBot Sep 12, 2024
d1f48cf
movercontroller namespace (#31749)
Errant-4 Sep 12, 2024
1c69da0
fix missing circuitboard recipes (#32092)
slarticodefast Sep 13, 2024
391a253
Fix replay load error screens (#32115)
PJB3005 Sep 13, 2024
6c92c60
Fix medical PDA toggling light when scanning (#32091)
themias Sep 13, 2024
49a9ea9
Automatic changelog update
PJBot Sep 13, 2024
1e910d9
Eject mech pilot alert (#31649)
Gorox221 Sep 13, 2024
ab9ffa2
Automatic changelog update
PJBot Sep 13, 2024
f8a97c3
Add extradimensional orange, holymelon, meatwheat, worldpeas mutation…
slarticodefast Sep 13, 2024
b328390
Automatic changelog update
PJBot Sep 13, 2024
8f239aa
Set default PDA uplink and music visibility to false (#28373)
ShadowCommander Sep 13, 2024
0eb33d3
Automatic changelog update
PJBot Sep 13, 2024
c8446b0
Added void cloak hood (#31061)
NotSoDana Sep 13, 2024
127d587
Automatic changelog update
PJBot Sep 13, 2024
8a3fa63
Fix setmapatmos temperature argument
Fildrance Sep 13, 2024
fdc04ab
Automatic changelog update
PJBot Sep 13, 2024
de1ecb9
Fix powered machines working unpowered if the panel is open. (#32135)
PJB3005 Sep 13, 2024
e4b987d
Automatic changelog update
PJBot Sep 14, 2024
977b5da
network airlock AutoClose (#32124)
deltanedas Sep 14, 2024
7ce7216
fix rcd blacklist (#32102)
qwerltaz Sep 14, 2024
8be0cfa
fix aller at once desc (#32129)
lzk228 Sep 14, 2024
2286e87
Automatic changelog update
PJBot Sep 14, 2024
f6af6fa
Fix that space (#32149)
Alpha-Two Sep 14, 2024
41b7db1
add gateway beacon for mapping (#32121)
deltanedas Sep 14, 2024
3c66fa5
fix conflicts
Sep 14, 2024
c205372
Add briefcase damage (#32063)
SlamBamActionman Sep 14, 2024
bc605c7
Automatic changelog update
PJBot Sep 14, 2024
ce286f7
Replace obsolete code in GasPortableSystem (#31407)
Mervill Aug 25, 2024
eecda36
remove uses of removed obsolete code
Sep 14, 2024
f299dd7
yml fixup
Sep 14, 2024
c1f2ec3
yml fixup
Sep 14, 2024
997d96f
untroll
Sep 14, 2024
35cb0f4
remove reverse engineering from it
Sep 14, 2024
3a022d6
a
Sep 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 15 additions & 29 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
<!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- The text between the arrows are comments - they will not be visible on your PR. -->
<!-- Guidelines: https://docs.spacestation14.io/en/getting-started/pr-guideline -->

## About the PR
<!-- What did you change in this PR? -->
<!-- What did you change? -->

## Why / Balance
<!-- Why was it changed? Link any discussions or issues here. Please discuss how this would affect game balance. -->
<!-- Discuss how this would affect game balance or explain why it was changed. Link any relevant discussions or issues. -->

## Technical details
<!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. -->
<!-- Summary of code changes for easier review. -->

## Media
<!--
PRs which make ingame changes (adding clothing, items, new features, etc) are required to have media attached that showcase the changes.
Small fixes/refactors are exempt.
Any media may be used in SS14 progress reports, with clear credit given.

If you're unsure whether your PR will require media, ask a maintainer.
-->
<!-- Attach media if the PR makes ingame changes (clothing, items, features, etc).
Small fixes/refactors are exempt. Media may be used in SS14 progress reports with credit. -->

## Requirements
<!--
Due to influx of PR's we require to ensure that PR's are following the correct guidelines.

Please take a moment to read these if its your first time.

Check the boxes below to confirm that you have in fact seen these (put an X in the brackets, like [X]):
-->
- [ ] I have read and I am following the [Pull Request Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). I understand that not doing so may get my pr closed at maintainer’s discretion
- [ ] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase
<!-- Confirm the following by placing an X in the brackets [X]: -->
- [ ] I have read and am following the [Pull Request and Changelog Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html).
- [ ] I have added media to this PR or it does not require an ingame showcase.
<!-- You should understand that not following the above may get your PR closed at maintainer’s discretion -->

## Breaking changes
<!--
List any breaking changes, including namespace, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be pasted in #codebase-changes.
-->
<!-- List any breaking changes, including namespaces, public class/method/field changes, prototype renames; and provide instructions for fixing them.
This will be posted in #codebase-changes. -->

**Changelog**
<!-- Add a Changelog entry to make players aware of new features or changes that could affect gameplay.
Make sure to read the guidelines and take this Changelog template out of the comment block in order for it to show up.
Changelog must have a :cl: symbol, so the bot recognizes the changes and adds them to the game's changelog. -->
<!--
Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
-->

<!--
Make sure to take this Changelog template out of the comment block in order for it to show up. Changelog must have a :cl: symbol, so the bot recognizes the changes and adds them to the game's changelog.
:cl:
- add: Added fun!
- remove: Removed fun!
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-credits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Get this week's Contributors
shell: pwsh
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: Tools/dump_github_contributors.ps1 > Resources/Credits/GitHub.txt

# TODO
Expand Down
45 changes: 45 additions & 0 deletions Content.Client/Guidebook/GuidebookDataSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Content.Shared.Guidebook;

namespace Content.Client.Guidebook;

/// <summary>
/// Client system for storing and retrieving values extracted from entity prototypes
/// for display in the guidebook (<see cref="RichText.ProtodataTag"/>).
/// Requests data from the server on <see cref="Initialize"/>.
/// Can also be pushed new data when the server reloads prototypes.
/// </summary>
public sealed class GuidebookDataSystem : EntitySystem
{
private GuidebookData? _data;

public override void Initialize()
{
base.Initialize();

SubscribeNetworkEvent<UpdateGuidebookDataEvent>(OnServerUpdated);

// Request data from the server
RaiseNetworkEvent(new RequestGuidebookDataEvent());
}

private void OnServerUpdated(UpdateGuidebookDataEvent args)
{
// Got new data from the server, either in response to our request, or because prototypes reloaded on the server
_data = args.Data;
_data.Freeze();
}

/// <summary>
/// Attempts to retrieve a value using the given identifiers.
/// See <see cref="GuidebookData.TryGetValue"/> for more information.
/// </summary>
public bool TryGetValue(string prototype, string component, string field, out object? value)
{
if (_data == null)
{
value = null;
return false;
}
return _data.TryGetValue(prototype, component, field, out value);
}
}
49 changes: 49 additions & 0 deletions Content.Client/Guidebook/Richtext/ProtodataTag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System.Globalization;
using Robust.Client.UserInterface.RichText;
using Robust.Shared.Utility;

namespace Content.Client.Guidebook.RichText;

/// <summary>
/// RichText tag that can display values extracted from entity prototypes.
/// In order to be accessed by this tag, the desired field/property must
/// be tagged with <see cref="Shared.Guidebook.GuidebookDataAttribute"/>.
/// </summary>
public sealed class ProtodataTag : IMarkupTag
{
[Dependency] private readonly ILogManager _logMan = default!;
[Dependency] private readonly IEntityManager _entMan = default!;

public string Name => "protodata";
private ISawmill Log => _log ??= _logMan.GetSawmill("protodata_tag");
private ISawmill? _log;

public string TextBefore(MarkupNode node)
{
// Do nothing with an empty tag
if (!node.Value.TryGetString(out var prototype))
return string.Empty;

if (!node.Attributes.TryGetValue("comp", out var component))
return string.Empty;
if (!node.Attributes.TryGetValue("member", out var member))
return string.Empty;
node.Attributes.TryGetValue("format", out var format);

var guidebookData = _entMan.System<GuidebookDataSystem>();

// Try to get the value
if (!guidebookData.TryGetValue(prototype, component.StringValue!, member.StringValue!, out var value))
{
Log.Error($"Failed to find protodata for {component}.{member} in {prototype}");
return "???";
}

// If we have a format string and a formattable value, format it as requested
if (!string.IsNullOrEmpty(format.StringValue) && value is IFormattable formattable)
return formattable.ToString(format.StringValue, CultureInfo.CurrentCulture);

// No format string given, so just use default ToString
return value?.ToString() ?? "NULL";
}
}
4 changes: 3 additions & 1 deletion Content.Client/MassMedia/Ui/ArticleEditorPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@
</Control>
<Control HorizontalExpand="True"/>
<BoxContainer Orientation="Horizontal">
<Button Name="ButtonSaveDraft" SetHeight="32" SetWidth="85"
StyleClasses="OpenRight" Text="{Loc news-write-ui-save-text}"/>
<Button Name="ButtonPreview" SetHeight="32" SetWidth="85"
StyleClasses="OpenRight" Text="{Loc news-write-ui-preview-text}"/>
StyleClasses="OpenBoth" Text="{Loc news-write-ui-preview-text}"/>
<Button Name="ButtonPublish" SetHeight="32" SetWidth="85" Text="{Loc news-write-ui-publish-text}" Access="Public"/>
</BoxContainer>
</BoxContainer>
Expand Down
12 changes: 12 additions & 0 deletions Content.Client/MassMedia/Ui/ArticleEditorPanel.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace Content.Client.MassMedia.Ui;
public sealed partial class ArticleEditorPanel : Control
{
public event Action? PublishButtonPressed;
public event Action<string, string>? ArticleDraftUpdated;

private bool _preview;

Expand Down Expand Up @@ -45,6 +46,7 @@ public ArticleEditorPanel()
ButtonPreview.OnPressed += OnPreview;
ButtonCancel.OnPressed += OnCancel;
ButtonPublish.OnPressed += OnPublish;
ButtonSaveDraft.OnPressed += OnDraftSaved;

TitleField.OnTextChanged += args => OnTextChanged(args.Text.Length, args.Control, SharedNewsSystem.MaxTitleLength);
ContentField.OnTextChanged += args => OnTextChanged(Rope.CalcTotalLength(args.TextRope), args.Control, SharedNewsSystem.MaxContentLength);
Expand All @@ -68,6 +70,9 @@ private void OnTextChanged(long length, Control control, long maxLength)
ButtonPublish.Disabled = false;
ButtonPreview.Disabled = false;
}

// save draft regardless; they can edit down the length later
ArticleDraftUpdated?.Invoke(TitleField.Text, Rope.Collapse(ContentField.TextRope));
}

private void OnPreview(BaseButton.ButtonEventArgs eventArgs)
Expand All @@ -92,6 +97,12 @@ private void OnPublish(BaseButton.ButtonEventArgs eventArgs)
Visible = false;
}

private void OnDraftSaved(BaseButton.ButtonEventArgs eventArgs)
{
ArticleDraftUpdated?.Invoke(TitleField.Text, Rope.Collapse(ContentField.TextRope));
Visible = false;
}

private void Reset()
{
_preview = false;
Expand All @@ -100,6 +111,7 @@ private void Reset()
PreviewLabel.SetMarkup("");
TitleField.Text = "";
ContentField.TextRope = Rope.Leaf.Empty;
ArticleDraftUpdated?.Invoke(string.Empty, string.Empty);
}

protected override void Dispose(bool disposing)
Expand Down
15 changes: 14 additions & 1 deletion Content.Client/MassMedia/Ui/NewsWriterBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ protected override void Open()
_menu.ArticleEditorPanel.PublishButtonPressed += OnPublishButtonPressed;
_menu.DeleteButtonPressed += OnDeleteButtonPressed;

_menu.CreateButtonPressed += OnCreateButtonPressed;
_menu.ArticleEditorPanel.ArticleDraftUpdated += OnArticleDraftUpdated;

SendMessage(new NewsWriterArticlesRequestMessage());
}

Expand All @@ -34,7 +37,7 @@ protected override void UpdateState(BoundUserInterfaceState state)
if (state is not NewsWriterBoundUserInterfaceState cast)
return;

_menu?.UpdateUI(cast.Articles, cast.PublishEnabled, cast.NextPublish);
_menu?.UpdateUI(cast.Articles, cast.PublishEnabled, cast.NextPublish, cast.DraftTitle, cast.DraftContent);
}

private void OnPublishButtonPressed()
Expand Down Expand Up @@ -67,4 +70,14 @@ private void OnDeleteButtonPressed(int articleNum)

SendMessage(new NewsWriterDeleteMessage(articleNum));
}

private void OnCreateButtonPressed()
{
SendMessage(new NewsWriterRequestDraftMessage());
}

private void OnArticleDraftUpdated(string title, string content)
{
SendMessage(new NewsWriterSaveDraftMessage(title, content));
}
}
9 changes: 8 additions & 1 deletion Content.Client/MassMedia/Ui/NewsWriterMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.MassMedia.Systems;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Client.MassMedia.Ui;

Expand All @@ -16,6 +17,8 @@ public sealed partial class NewsWriterMenu : FancyWindow

public event Action<int>? DeleteButtonPressed;

public event Action? CreateButtonPressed;

public NewsWriterMenu()
{
RobustXamlLoader.Load(this);
Expand All @@ -31,7 +34,7 @@ public NewsWriterMenu()
ButtonCreate.OnPressed += OnCreate;
}

public void UpdateUI(NewsArticle[] articles, bool publishEnabled, TimeSpan nextPublish)
public void UpdateUI(NewsArticle[] articles, bool publishEnabled, TimeSpan nextPublish, string draftTitle, string draftContent)
{
ArticlesContainer.Children.Clear();
ArticleCount.Text = Loc.GetString("news-write-ui-article-count-text", ("count", articles.Length));
Expand All @@ -54,6 +57,9 @@ public void UpdateUI(NewsArticle[] articles, bool publishEnabled, TimeSpan nextP

ButtonCreate.Disabled = !publishEnabled;
_nextPublish = nextPublish;

ArticleEditorPanel.TitleField.Text = draftTitle;
ArticleEditorPanel.ContentField.TextRope = new Rope.Leaf(draftContent);
}

protected override void FrameUpdate(FrameEventArgs args)
Expand Down Expand Up @@ -93,5 +99,6 @@ protected override void Dispose(bool disposing)
private void OnCreate(BaseButton.ButtonEventArgs buttonEventArgs)
{
ArticleEditorPanel.Visible = true;
CreateButtonPressed?.Invoke();
}
}
2 changes: 1 addition & 1 deletion Content.Client/Nuke/NukeMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void UpdateState(NukeUiState state)
FirstStatusLabel.Text = firstMsg;
SecondStatusLabel.Text = secondMsg;

EjectButton.Disabled = !state.DiskInserted || state.Status == NukeStatus.ARMED;
EjectButton.Disabled = !state.DiskInserted || state.Status == NukeStatus.ARMED || !state.IsAnchored;
AnchorButton.Disabled = state.Status == NukeStatus.ARMED;
AnchorButton.Pressed = state.IsAnchored;
ArmButton.Disabled = !state.AllowArm || !state.IsAnchored;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Robust.Client.GameObjects;
using Robust.Shared.Utility;

namespace Content.Client.Nutrition.EntitySystems;

Expand Down Expand Up @@ -50,6 +49,7 @@ private void UpdateFoodVisuals(Entity<FoodSequenceStartPointComponent> start, Sp
sprite.AddBlankLayer(index);
sprite.LayerMapSet(keyCode, index);
sprite.LayerSetSprite(index, state.Sprite);
sprite.LayerSetScale(index, state.Scale);

//Offset the layer
var layerPos = start.Comp.StartPosition;
Expand Down
12 changes: 10 additions & 2 deletions Content.Client/PDA/PdaBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
using Content.Shared.PDA;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
using Robust.Shared.Configuration;

namespace Content.Client.PDA
{
[UsedImplicitly]
public sealed class PdaBoundUserInterface : CartridgeLoaderBoundUserInterface
{
private readonly PdaSystem _pdaSystem;

[ViewVariables]
private PdaMenu? _menu;

public PdaBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_pdaSystem = EntMan.System<PdaSystem>();
}

protected override void Open()
Expand Down Expand Up @@ -92,7 +94,13 @@ protected override void UpdateState(BoundUserInterfaceState state)
if (state is not PdaUpdateState updateState)
return;

_menu?.UpdateState(updateState);
if (_menu == null)
{
_pdaSystem.Log.Error("PDA state received before menu was created.");
return;
}

_menu.UpdateState(updateState);
}

protected override void AttachCartridgeUI(Control cartridgeUIFragment, string? title)
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/PDA/PdaMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@
Description="{Loc 'comp-pda-ui-ringtone-button-description'}"/>
<pda:PdaSettingsButton Name="ActivateMusicButton"
Access="Public"
Visible="False"
Text="{Loc 'pda-bound-user-interface-music-button'}"
Description="{Loc 'pda-bound-user-interface-music-button-description'}"/>
<pda:PdaSettingsButton Name="ShowUplinkButton"
Access="Public"
Visible="False"
Text="{Loc 'pda-bound-user-interface-show-uplink-title'}"
Description="{Loc 'pda-bound-user-interface-show-uplink-description'}"/>
<pda:PdaSettingsButton Name="LockUplinkButton"
Access="Public"
Visible="False"
Text="{Loc 'pda-bound-user-interface-lock-uplink-title'}"
Description="{Loc 'pda-bound-user-interface-lock-uplink-description'}"/>
</BoxContainer>
Expand Down
Loading
Loading