From 679de0a7dffc8292bdbdddbe31c0bc3c526639ae Mon Sep 17 00:00:00 2001 From: ReeZer2 Date: Fri, 20 Dec 2024 20:57:58 +0200 Subject: [PATCH 01/12] ADD: Contactor Traitor --- .../Systems/ContractorClientSystem.cs | 12 + .../UI/ContractorBoundUserInterface.cs | 452 ++++++++++++++++++ .../Contractor/UI/ContractorPDAMenu.xaml | 33 ++ .../Contractor/UI/ContractorPDAMenu.xaml.cs | 50 ++ .../SS220/Contractor/UI/ContractorStyle.cs | 54 +++ .../Contractor/ContractorServerSystem.cs | 252 ++++++++++ .../Conditions/BuyTimeForListingCondition.cs | 16 + .../SS220/Contractor/ContractorComponent.cs | 53 ++ .../SS220/Contractor/ContractorMessagesUi.cs | 78 +++ .../SS220/Contractor/ContractorPDAVisuals.cs | 9 + .../Contractor/ContractorPdaComponent.cs | 31 ++ .../ContractorPortalOnTriggerComponent.cs | 20 + .../Contractor/ContractorTargetComponent.cs | 36 ++ .../SharedContractorItemPrototype.cs | 20 + .../SharedContractorPortalSystem.cs | 100 ++++ .../Contractor/SharedContractorSystem.cs | 93 ++++ .../SharedContractorTargetSystem.cs | 36 ++ .../SS220/Antags/contractor_items.yml | 36 ++ .../SS220/Catalog/uplink_catalog.yml | 19 + .../SS220/Entities/Effects/portal.yml | 17 + .../SS220/Entities/Objects/Devices/pda.yml | 16 +- Resources/Prototypes/Store/categories.yml | 5 + Resources/Prototypes/Store/presets.yml | 1 + .../background-uplink-contractor.png | Bin 0 -> 3276 bytes .../button-execution.rsi/execution.png | Bin 0 -> 1499 bytes .../Contractor/button-execution.rsi/meta.json | 14 + .../Contractor/button-hub.rsi/hub.png | Bin 0 -> 1263 bytes .../Contractor/button-hub.rsi/meta.json | 14 + .../Contractor/button-photo.rsi/meta.json | 15 + .../Contractor/button-photo.rsi/photo.png | Bin 0 -> 290 bytes .../Contractor/button-withdraw.rsi/meta.json | 15 + .../button-withdraw.rsi/withdraw.png | Bin 0 -> 1809 bytes .../Contractor/buttons.rsi/contracts.png | Bin 0 -> 1583 bytes .../Contractor/buttons.rsi/meta.json | 14 + .../Contractor/font-uplink-contractor.png | Bin 0 -> 2534 bytes 35 files changed, 1510 insertions(+), 1 deletion(-) create mode 100644 Content.Client/SS220/Contractor/Systems/ContractorClientSystem.cs create mode 100644 Content.Client/SS220/Contractor/UI/ContractorBoundUserInterface.cs create mode 100644 Content.Client/SS220/Contractor/UI/ContractorPDAMenu.xaml create mode 100644 Content.Client/SS220/Contractor/UI/ContractorPDAMenu.xaml.cs create mode 100644 Content.Client/SS220/Contractor/UI/ContractorStyle.cs create mode 100644 Content.Server/SS220/Contractor/ContractorServerSystem.cs create mode 100644 Content.Server/SS220/Store/Conditions/BuyTimeForListingCondition.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorComponent.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorMessagesUi.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorPDAVisuals.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorPdaComponent.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorPortalOnTriggerComponent.cs create mode 100644 Content.Shared/SS220/Contractor/ContractorTargetComponent.cs create mode 100644 Content.Shared/SS220/Contractor/SharedContractorItemPrototype.cs create mode 100644 Content.Shared/SS220/Contractor/SharedContractorPortalSystem.cs create mode 100644 Content.Shared/SS220/Contractor/SharedContractorSystem.cs create mode 100644 Content.Shared/SS220/Contractor/SharedContractorTargetSystem.cs create mode 100644 Resources/Prototypes/SS220/Antags/contractor_items.yml create mode 100644 Resources/Prototypes/SS220/Entities/Effects/portal.yml create mode 100644 Resources/Textures/SS220/Interface/Contractor/background-uplink-contractor.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-execution.rsi/execution.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-execution.rsi/meta.json create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-hub.rsi/hub.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-hub.rsi/meta.json create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-photo.rsi/meta.json create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-photo.rsi/photo.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-withdraw.rsi/meta.json create mode 100644 Resources/Textures/SS220/Interface/Contractor/button-withdraw.rsi/withdraw.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/buttons.rsi/contracts.png create mode 100644 Resources/Textures/SS220/Interface/Contractor/buttons.rsi/meta.json create mode 100644 Resources/Textures/SS220/Interface/Contractor/font-uplink-contractor.png diff --git a/Content.Client/SS220/Contractor/Systems/ContractorClientSystem.cs b/Content.Client/SS220/Contractor/Systems/ContractorClientSystem.cs new file mode 100644 index 000000000000..ad40ed6ba104 --- /dev/null +++ b/Content.Client/SS220/Contractor/Systems/ContractorClientSystem.cs @@ -0,0 +1,12 @@ +using Content.Shared.SS220.Contractor; + +namespace Content.Client.SS220.Contractor.Systems; + +public sealed class ContractorClientSystem : SharedContractorSystem +{ + /// + public override void Initialize() + { + base.Initialize(); + } +} diff --git a/Content.Client/SS220/Contractor/UI/ContractorBoundUserInterface.cs b/Content.Client/SS220/Contractor/UI/ContractorBoundUserInterface.cs new file mode 100644 index 000000000000..a0667472ef12 --- /dev/null +++ b/Content.Client/SS220/Contractor/UI/ContractorBoundUserInterface.cs @@ -0,0 +1,452 @@ +using System.Numerics; +using Content.Client.SS220.Contractor.Systems; +using Content.Client.SS220.UserInterface; +using Content.Shared.FixedPoint; +using Content.Shared.SS220.Contractor; +using JetBrains.Annotations; +using Robust.Client.Player; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.Prototypes; + +namespace Content.Client.SS220.Contractor.UI; + +[UsedImplicitly] +public sealed class ContractorBoundUserInterface : BoundUserInterface +{ + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + + private ContractorPDAMenu? _menu; + + private DefaultWindow? _withdrawWindow; + private DefaultWindow? _photoWindow; + + private readonly ContractorClientSystem _contractorSystem; + private readonly ContractorPdaComponent _contractorPdaComponent; + private readonly ContractorComponent? _contractorComponent; + + private readonly List