From 828a2dc2b4f3a37d7f20497cca09742b4f700556 Mon Sep 17 00:00:00 2001 From: RHSvenson Date: Tue, 19 Aug 2025 12:08:58 +0200 Subject: [PATCH 01/18] One year anniversary statue --- .../Entities/Structures/Decorations/statues.yml | 14 ++++++++++++++ .../Structures/Decorations/Statues.rsi/meta.json | 5 ++++- .../Statues.rsi/one_year_anniversary.png | Bin 0 -> 1796 bytes 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/one_year_anniversary.png diff --git a/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml b/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml index 58f5425031cc..9bd150013357 100644 --- a/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml +++ b/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml @@ -9,4 +9,18 @@ sprite: _Starlight/Structures/Decorations/Statues.rsi state: stone_tea drawdepth: Mobs + offset: "0.0,0.5" + +- type: entity + id: StatueOneYearAnniversary + parent: BaseStructure + name: monument to the first year + description: | + A marble statue of an idealized employee, made to celebrate the first anniversary of NanoTrasen control over the Starlight Sector. + The statue's eyes are hidden and its expression stern. Sacrifices were necessary to make it to this point. + components: + - type: Sprite + sprite: _Starlight/Structures/Decorations/Statues.rsi + state: one_year_anniversary + drawdepth: Mobs offset: "0.0,0.5" \ No newline at end of file diff --git a/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/meta.json b/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/meta.json index 8b6fe03d457a..f1a2d3b9245a 100644 --- a/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/meta.json +++ b/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Stone tea statue by slycoolgamer", + "copyright": "Stone tea statue by slycoolgamer, one year statue by Trosling", "size": { "x": 32, "y": 64 @@ -9,6 +9,9 @@ "states": [ { "name": "stone_tea" + }, + { + "name": "one_year_anniversary" } ] } diff --git a/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/one_year_anniversary.png b/Resources/Textures/_Starlight/Structures/Decorations/Statues.rsi/one_year_anniversary.png new file mode 100644 index 0000000000000000000000000000000000000000..01e029e45f98a8b3dfc83d0b6ec0dccd4237bcfb GIT binary patch literal 1796 zcmV+f2mAPmP)z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;!>UdjM)k=AzmF000SaNLh0L01m_e01m_fl`9S#00007 zbV*G`2k8hC3I-6#Ibm)900u}&L_t(&-tCxOXdKrWhM(F0BSjaxkfw}`d@;}#yoMs! zHZmx8UR|`*CQw-6mRiMWYuR;Lhd5BBq>!kPln7d|T5zdMog#sIVHa{?T}p{VHLfeV z6Nn*G8pBT7n$Cdb)fs7jPA_J5rPW&2t}Qja(06lo&pA8ayYG3wpEIy;`?hcUwr~5k zZ;xr?g}j>m-P>xskXN6H<6^O>uADxoipAm+0nxf~Je(gPo67@m(EcfX1HG)=E%S-- zIsleA&*J>1Ok{3eP{$`V(mY;MT%*UO0Io5T!4h^CBgJD7dxIHGr-dK!WF#TAVh<#{8b; zfrgFcb1It~Caw23=RBuG$+4N5xvuRwfY8)#J*(><-MBWZ=4PfC&KH_GxV3Pd!q|C6 zj*spQ1M2n(wQ{%22jV2UZs6D!BgaQKgF-j5IF8MbyiDIfFWTTAv|SP5{cFe7JD1)I z^1YNej*V_)8874;HKOSpDfz^Bop&z1$EQ~d>WLXxT3S*<1S)rI3xohEK?ro+;MbEc zaeCtIrt`+SZe;OgncP>N)qXoYsZNbgXk9a~*}0Sw(_9RLK5*jL)&{VKbHFqgky3K* z%s8+8m8HV*+}IF0Y_hUx?Zq=cAb<1-0DoTmQ};)( zHRpdV|17UgPHQ)=%_>()GMNkj`KPZkfA5y3Zy*jDp79Rp}= z-aO`yo!lbO64LcKRv1INep?}W`NyYJMMb!|^gcJ2-lw7>od4mN`q9~wYDW#6%Q^H7 z^ftv62+es&l$7Z2*V~+5oO(?iIPiI*kqGg4jASywg9oc9;Qsv;UOE4QdUNWMwk?2n z2o;y1=jra4m%?0Gq*fQ;mfxfl9$7N#19lL1lGa=de*?P?54_H z=VQL}y;n4V=Z}r3-rlFsG>v33!Ows38?ED1Jhwc!@%hdX-jzqUUJ?R<&d+a)|3P^b zMU;3lg{rI0qF`%J@7N_A%f_+nmLFNB+3bKyj*VrSZ4d4dDKxE4wX#kmqIKSsj(+#0 z$L*33BGdewh{sX&8nx;=nx^eiQwq4!?Py(jk5Un0@dWky9sqb4^&-6?!l!zB(5O*a z^U)&OXTtzmlvpCUHw+-Rj9V-oi=mW4)oZ&Oh8^dGR1&CCS@(%XBma8lz1XV zy;k3y>-npb)9tTr=1rJyPsNEu9HkW1YGwCCI6HfhVzEfESY&qg;JkP-hd;8XEEW<`P%mt~SE#D|g>2MUm zwXJc9ottKAru7|S8w0NWF=>%PIvx^YJzdWZSf!Ui2~e`hY;X6E-4}K zTyN(i@Bts6ZyUD&=o|RQszCo zR?-_^#0D$U-*jP?fNV+Cj})P8Tb#>zAp^a@ Date: Tue, 19 Aug 2025 13:35:51 +0200 Subject: [PATCH 02/18] Revert to other description that I liked more --- .../_StarLight/Entities/Structures/Decorations/statues.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml b/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml index 9bd150013357..0d1e1f9bf502 100644 --- a/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml +++ b/Resources/Prototypes/_StarLight/Entities/Structures/Decorations/statues.yml @@ -16,8 +16,8 @@ parent: BaseStructure name: monument to the first year description: | - A marble statue of an idealized employee, made to celebrate the first anniversary of NanoTrasen control over the Starlight Sector. - The statue's eyes are hidden and its expression stern. Sacrifices were necessary to make it to this point. + A marble statue of an idealized employee, made to commemorate the first anniversary of NanoTrasen control over the Starlight Sector. + While ostensibly celebratory, it seems oddly mournful. Many died to make this possible. components: - type: Sprite sprite: _Starlight/Structures/Decorations/Statues.rsi From f7719e8cb7e73c593cd680d814747e1691505b57 Mon Sep 17 00:00:00 2001 From: CringeCursed <162319933+CringeCursed@users.noreply.github.com> Date: Tue, 19 Aug 2025 14:37:10 +0300 Subject: [PATCH 03/18] TransferInit --- .../_Starlight/Economy/Atm/ATMBui.cs | 44 +++++++++++++++-- .../_Starlight/Economy/Atm/ATMWindow.xaml | 6 +++ .../_Starlight/Economy/Atm/ATMSystem.cs | 48 ++++++++++++++++++- .../_Starlight/Economy/Atm/ATMComponent.cs | 8 ++++ 4 files changed, 101 insertions(+), 5 deletions(-) diff --git a/Content.Client/_Starlight/Economy/Atm/ATMBui.cs b/Content.Client/_Starlight/Economy/Atm/ATMBui.cs index 7de5199a56b2..4dca51504a47 100644 --- a/Content.Client/_Starlight/Economy/Atm/ATMBui.cs +++ b/Content.Client/_Starlight/Economy/Atm/ATMBui.cs @@ -17,6 +17,8 @@ public sealed class ATMBui : BoundUserInterface [ViewVariables] private ATMWindow? _window; private int _amount; + private int _transferAmount; + private string _transferRecipient = string.Empty; public ATMBui(EntityUid owner, Enum uiKey) : base(owner, uiKey) { @@ -39,7 +41,7 @@ private void Update(ATMBuiState state) View(ViewType.Withdraw); - RefreshUI(); + RefreshUI(state); if (!_window!.IsOpen) _window.OpenCentered(); @@ -57,9 +59,9 @@ private void TryInitWindow() _window.TransferTabButton.OnPressed += _ => View(ViewType.Transfer); } - private void RefreshUI() + private void RefreshUI(ATMBuiState state) { - if (_window == null || State is not ATMBuiState state) + if (_window == null) return; _window.BalanceLabel.Children.Clear(); @@ -78,6 +80,40 @@ private void RefreshUI() SendMessage(new ATMWithdrawBuiMsg() { Amount = _amount }); Close(); }; + + // omg help me + _window.TransferHelpLabel.Children.Clear(); + var transferHelp = new FormattedMessage(); + transferHelp.AddText("Enter a recipient username and amount to transfer"); + _window.TransferHelpLabel.SetMessage(transferHelp); + + _window.TransferAmountInput.OnTextChanged += _ => + { + if (!int.TryParse(_window.TransferAmountInput.Text, out _transferAmount)) + _transferAmount = 0; + + _window.TransferButton.Disabled = string.IsNullOrWhiteSpace(_transferRecipient) + || _transferAmount <= 0 || _transferAmount > state.Balance; + }; + _window.TransferTargetInput.OnTextChanged += _ => + { + _transferRecipient = _window.TransferTargetInput.Text ?? string.Empty; + + _window.TransferButton.Disabled = string.IsNullOrWhiteSpace(_transferRecipient) + || _transferAmount <= 0 || _transferAmount > state.Balance; + }; + _window.TransferButton.OnPressed += _ => + { + if (!string.IsNullOrWhiteSpace(_transferRecipient) && _transferAmount > 0) + { + SendMessage(new ATMTransferBuiMsg + { + Recipient = _transferRecipient.Trim(), + Amount = _transferAmount + }); + } + Close(); + }; } private void View(ViewType type) @@ -104,6 +140,6 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); if (disposing) - _window?.Dispose(); + _window = null; } } diff --git a/Content.Client/_Starlight/Economy/Atm/ATMWindow.xaml b/Content.Client/_Starlight/Economy/Atm/ATMWindow.xaml index e26048c7e532..701533b58353 100644 --- a/Content.Client/_Starlight/Economy/Atm/ATMWindow.xaml +++ b/Content.Client/_Starlight/Economy/Atm/ATMWindow.xaml @@ -17,6 +17,12 @@ + + + + +