From 16c8b95da4941a97e7573218a575ddd9e928b850 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:50:02 +0900 Subject: [PATCH] Economy (#403) * nasrano * Add station budget & salary * Initial balance * Vending machine UI * Pricing for vending machines * Finish economy * Eftpos * Finish eftpos * Put eftpos into lockers * Vending machine prices * Small fixes * Fix atm UI * Add atms to maps * fix * reset * Add PDA program * Maps again --------- Co-authored-by: Mona Hmiza <> Co-authored-by: rhailrake <49613070+rhailrake@users.noreply.github.com> --- .../CharacterInfo/CharacterInfoSystem.cs | 5 +- .../Character/CharacterUIController.cs | 23 +- .../Character/Windows/CharacterWindow.xaml | 7 + .../VendingMachineBoundUserInterface.cs | 24 +- .../White/Economy/ATMVisualLayers.cs | 8 + Content.Client/White/Economy/Ui/ATMBui.cs | 43 ++++ .../White/Economy/Ui/AtmWindow.xaml | 20 ++ .../White/Economy/Ui/AtmWindow.xaml.cs | 79 +++++++ Content.Client/White/Economy/Ui/BankUi.cs | 29 +++ .../White/Economy/Ui/BankUiFragment.xaml | 12 + .../White/Economy/Ui/BankUiFragment.xaml.cs | 30 +++ Content.Client/White/Economy/Ui/EftposBui.cs | 41 ++++ .../White/Economy/Ui/EftposWindow.xaml | 30 +++ .../White/Economy/Ui/EftposWindow.xaml.cs | 58 +++++ .../White/Economy/Ui/VendingItem.xaml | 13 ++ .../White/Economy/Ui/VendingItem.xaml.cs | 22 ++ .../White/Economy/Ui/VendingMenu.xaml | 26 +++ .../White/Economy/Ui/VendingMenu.xaml.cs | 88 +++++++ .../Components/StationBankAccountComponent.cs | 14 +- Content.Server/Cargo/Systems/CargoSystem.cs | 11 + .../CharacterInfo/CharacterInfoSystem.cs | 9 +- .../VendingMachines/VendingMachineSystem.cs | 115 ++++++++- Content.Server/White/Economy/ATMSystem.cs | 124 ++++++++++ Content.Server/White/Economy/BankAccount.cs | 24 ++ .../White/Economy/BankCardSystem.cs | 221 ++++++++++++++++++ .../White/Economy/BankCartridgeComponent.cs | 8 + .../White/Economy/BankCartridgeSystem.cs | 46 ++++ .../Economy/CommandBudgetPinPaperComponent.cs | 6 + .../White/Economy/CommandBudgetSystem.cs | 27 +++ Content.Server/White/Economy/EftposSystem.cs | 88 +++++++ .../SharedCharacterInfoSystem.cs | 4 +- Content.Shared/Mind/Memory.cs | 16 ++ Content.Shared/Mind/MindComponent.cs | 17 ++ .../SharedVendingMachineSystem.cs | 11 +- .../VendingMachineComponent.cs | 28 ++- .../VendingMachineInterfaceState.cs | 16 +- Content.Shared/White/Economy/ATMComponent.cs | 40 ++++ Content.Shared/White/Economy/ATMMessages.cs | 24 ++ .../White/Economy/BankCardComponent.cs | 16 ++ .../White/Economy/BankCartridgeUiState.cs | 11 + .../White/Economy/EftposComponent.cs | 26 +++ .../White/Economy/EftposMessages.cs | 22 ++ .../White/Economy/SalaryPrototype.cs | 13 ++ .../White/Economy/SharedATMSystem.cs | 28 +++ Resources/Audio/White/Machines/buzz-sigh.ogg | Bin 0 -> 8972 bytes Resources/Audio/White/Machines/buzz-two.ogg | Bin 0 -> 12724 bytes Resources/Audio/White/Machines/chime.ogg | Bin 0 -> 9549 bytes Resources/Audio/White/Machines/license.txt | 6 + Resources/Audio/White/Machines/polaroid1.ogg | Bin 0 -> 21254 bytes Resources/Audio/White/Machines/polaroid2.ogg | Bin 0 -> 22251 bytes Resources/Audio/White/Machines/twobeep.ogg | Bin 0 -> 5853 bytes Resources/Locale/en-US/store/currency.ftl | 5 + Resources/Locale/ru-RU/store/currency.ftl | 7 + .../ru-RU/white/economy/announcemets.ftl | 1 + Resources/Locale/ru-RU/white/economy/atm.ftl | 12 + Resources/Locale/ru-RU/white/economy/bank.ftl | 6 + .../Locale/ru-RU/white/economy/cards.ftl | 32 +++ .../Locale/ru-RU/white/economy/eftpos.ftl | 16 ++ .../Locale/ru-RU/white/economy/memory.ftl | 2 + .../Locale/ru-RU/white/economy/vending.ftl | 1 + .../Catalog/Fills/Lockers/heads.yml | 8 +- .../Catalog/Fills/Lockers/medical.yml | 3 + .../Catalog/Fills/Lockers/service.yml | 3 + .../VendingMachines/Inventories/boozeomat.yml | 1 + .../VendingMachines/Inventories/chefvend.yml | 1 + .../VendingMachines/Inventories/medical.yml | 1 + .../VendingMachines/Inventories/nutri.yml | 1 + .../OuterClothing/base_clothingouter.yml | 2 +- .../Entities/Mobs/Player/admin_ghost.yml | 1 + .../Objects/Consumable/Drinks/drinks.yml | 2 + .../Objects/Consumable/Drinks/drinks_cans.yml | 2 + .../Objects/Consumable/Drinks/drinks_cups.yml | 2 + .../Objects/Consumable/Food/Baked/donut.yml | 2 + .../Consumable/Food/Containers/condiments.yml | 2 +- .../Objects/Consumable/Food/snacks.yml | 4 + .../Smokeables/Cigarettes/packs.yml | 4 +- .../Consumable/Smokeables/Cigars/case.yml | 4 + .../Consumable/Smokeables/Cigars/cigar.yml | 2 + .../Consumable/Smokeables/base_smokeables.yml | 4 + .../Entities/Objects/Devices/pda.yml | 1 + .../Entities/Objects/Misc/space_cash.yml | 5 + .../Entities/Objects/Tools/lighters.yml | 5 + .../Structures/Machines/vending_machines.yml | 37 +++ Resources/Prototypes/Shaders/shaders.yml | 5 + Resources/Prototypes/Store/currency.yml | 6 + Resources/Prototypes/White/Economy/card.yml | 95 ++++++++ Resources/Prototypes/White/Economy/eftpos.yml | 27 +++ Resources/Prototypes/White/Economy/salary.yml | 42 ++++ .../Entities/Objects/Misc/cartridges.yml | 21 ++ .../White/Structures/Machines/atm.yml | 75 ++++++ Resources/Prototypes/White/tags.yml | 3 + Resources/Prototypes/tags.yml | 2 + .../Textures/Shaders/White/gradient.swsl | 20 ++ .../White/Misc/cards.rsi/budgetcard.png | Bin 0 -> 336 bytes .../White/Misc/cards.rsi/car_budget.png | Bin 0 -> 328 bytes .../White/Misc/cards.rsi/civ_budget.png | Bin 0 -> 315 bytes .../White/Misc/cards.rsi/eng_budget.png | Bin 0 -> 349 bytes .../White/Misc/cards.rsi/med_budget.png | Bin 0 -> 316 bytes .../Textures/White/Misc/cards.rsi/meta.json | 35 +++ .../White/Misc/cards.rsi/sci_budget.png | Bin 0 -> 312 bytes .../White/Misc/cards.rsi/sec_budget.png | Bin 0 -> 333 bytes .../White/Misc/cards.rsi/srv_budget.png | Bin 0 -> 315 bytes Resources/Textures/White/Misc/nanotrasen.png | Bin 0 -> 35739 bytes .../Devices/eftpos.rsi/eftpos-screen.png | Bin 0 -> 557 bytes .../Objects/Devices/eftpos.rsi/eftpos.png | Bin 0 -> 764 bytes .../Objects/Devices/eftpos.rsi/meta.json | 17 ++ .../Structures/Machines/atm.rsi/meta.json | 17 ++ .../White/Structures/Machines/atm.rsi/off.png | Bin 0 -> 1057 bytes .../White/Structures/Machines/atm.rsi/on.png | Bin 0 -> 652 bytes 109 files changed, 2043 insertions(+), 30 deletions(-) create mode 100644 Content.Client/White/Economy/ATMVisualLayers.cs create mode 100644 Content.Client/White/Economy/Ui/ATMBui.cs create mode 100644 Content.Client/White/Economy/Ui/AtmWindow.xaml create mode 100644 Content.Client/White/Economy/Ui/AtmWindow.xaml.cs create mode 100644 Content.Client/White/Economy/Ui/BankUi.cs create mode 100644 Content.Client/White/Economy/Ui/BankUiFragment.xaml create mode 100644 Content.Client/White/Economy/Ui/BankUiFragment.xaml.cs create mode 100644 Content.Client/White/Economy/Ui/EftposBui.cs create mode 100644 Content.Client/White/Economy/Ui/EftposWindow.xaml create mode 100644 Content.Client/White/Economy/Ui/EftposWindow.xaml.cs create mode 100644 Content.Client/White/Economy/Ui/VendingItem.xaml create mode 100644 Content.Client/White/Economy/Ui/VendingItem.xaml.cs create mode 100644 Content.Client/White/Economy/Ui/VendingMenu.xaml create mode 100644 Content.Client/White/Economy/Ui/VendingMenu.xaml.cs create mode 100644 Content.Server/White/Economy/ATMSystem.cs create mode 100644 Content.Server/White/Economy/BankAccount.cs create mode 100644 Content.Server/White/Economy/BankCardSystem.cs create mode 100644 Content.Server/White/Economy/BankCartridgeComponent.cs create mode 100644 Content.Server/White/Economy/BankCartridgeSystem.cs create mode 100644 Content.Server/White/Economy/CommandBudgetPinPaperComponent.cs create mode 100644 Content.Server/White/Economy/CommandBudgetSystem.cs create mode 100644 Content.Server/White/Economy/EftposSystem.cs create mode 100644 Content.Shared/Mind/Memory.cs create mode 100644 Content.Shared/White/Economy/ATMComponent.cs create mode 100644 Content.Shared/White/Economy/ATMMessages.cs create mode 100644 Content.Shared/White/Economy/BankCardComponent.cs create mode 100644 Content.Shared/White/Economy/BankCartridgeUiState.cs create mode 100644 Content.Shared/White/Economy/EftposComponent.cs create mode 100644 Content.Shared/White/Economy/EftposMessages.cs create mode 100644 Content.Shared/White/Economy/SalaryPrototype.cs create mode 100644 Content.Shared/White/Economy/SharedATMSystem.cs create mode 100644 Resources/Audio/White/Machines/buzz-sigh.ogg create mode 100644 Resources/Audio/White/Machines/buzz-two.ogg create mode 100644 Resources/Audio/White/Machines/chime.ogg create mode 100644 Resources/Audio/White/Machines/license.txt create mode 100644 Resources/Audio/White/Machines/polaroid1.ogg create mode 100644 Resources/Audio/White/Machines/polaroid2.ogg create mode 100644 Resources/Audio/White/Machines/twobeep.ogg create mode 100644 Resources/Locale/ru-RU/white/economy/announcemets.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/atm.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/bank.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/cards.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/eftpos.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/memory.ftl create mode 100644 Resources/Locale/ru-RU/white/economy/vending.ftl create mode 100644 Resources/Prototypes/White/Economy/card.yml create mode 100644 Resources/Prototypes/White/Economy/eftpos.yml create mode 100644 Resources/Prototypes/White/Economy/salary.yml create mode 100644 Resources/Prototypes/White/Entities/Objects/Misc/cartridges.yml create mode 100644 Resources/Prototypes/White/Structures/Machines/atm.yml create mode 100644 Resources/Textures/Shaders/White/gradient.swsl create mode 100644 Resources/Textures/White/Misc/cards.rsi/budgetcard.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/car_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/civ_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/eng_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/med_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/meta.json create mode 100644 Resources/Textures/White/Misc/cards.rsi/sci_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/sec_budget.png create mode 100644 Resources/Textures/White/Misc/cards.rsi/srv_budget.png create mode 100644 Resources/Textures/White/Misc/nanotrasen.png create mode 100644 Resources/Textures/White/Objects/Devices/eftpos.rsi/eftpos-screen.png create mode 100644 Resources/Textures/White/Objects/Devices/eftpos.rsi/eftpos.png create mode 100644 Resources/Textures/White/Objects/Devices/eftpos.rsi/meta.json create mode 100644 Resources/Textures/White/Structures/Machines/atm.rsi/meta.json create mode 100644 Resources/Textures/White/Structures/Machines/atm.rsi/off.png create mode 100644 Resources/Textures/White/Structures/Machines/atm.rsi/on.png diff --git a/Content.Client/CharacterInfo/CharacterInfoSystem.cs b/Content.Client/CharacterInfo/CharacterInfoSystem.cs index 844a352a18..617d816478 100644 --- a/Content.Client/CharacterInfo/CharacterInfoSystem.cs +++ b/Content.Client/CharacterInfo/CharacterInfoSystem.cs @@ -32,7 +32,7 @@ public sealed class CharacterInfoSystem : EntitySystem private void OnCharacterInfoEvent(CharacterInfoEvent msg, EntitySessionEventArgs args) { var entity = GetEntity(msg.NetEntity); - var data = new CharacterData(entity, msg.JobTitle, msg.Objectives, msg.Briefing, Name(entity)); + var data = new CharacterData(entity, msg.JobTitle, msg.Objectives, msg.Briefing, Name(entity), msg.Memory); OnCharacterUpdate?.Invoke(data); } @@ -49,7 +49,8 @@ public sealed class CharacterInfoSystem : EntitySystem string Job, Dictionary> Objectives, string? Briefing, - string EntityName + string EntityName, + Dictionary Memory ); /// diff --git a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs index 5c085b1966..a5d0c9a1b7 100644 --- a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs +++ b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs @@ -105,12 +105,13 @@ public sealed class CharacterUIController : UIController, IOnStateEntered + + +