From d3ed34ff4e91ea5d5a0c766711f865a6917bf394 Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:39:30 -0700 Subject: [PATCH] Trait Points (#434) # Description Some improvements to loadouts too. --- # TODO - [x] Points logic - [x] Server-side validation - [x] Categorize traits - [x] Assign points to traits - [x] Header costs - [x] Sort entries - [x] Max traits - [x] Communicate max traits - [x] Point bar - [x] Group exclusivity - Black outline on text - [x] Fix existing component whitelists ---

Media

## Accurate except for small details ![image](https://github.com/Simple-Station/Einstein-Engines/assets/77995199/c0ab2fbf-3bce-4e54-81d5-8e546d6b3c0b) ### Something to note: ![image](https://github.com/Simple-Station/Einstein-Engines/assets/77995199/09a3948e-0c9f-4f57-b297-f62063b11845) ![image](https://github.com/Simple-Station/Einstein-Engines/assets/77995199/35d76095-0714-4613-a17b-73df25a9a832) ![image](https://github.com/Simple-Station/Einstein-Engines/assets/77995199/87149e5c-0af2-4ac0-bbde-52f317a008a0)

--- # Changelog :cl: - add: Added trait points - add: Added categories for traits --------- Co-authored-by: VMSolidus --- .../Preferences/UI/HumanoidProfileEditor.xaml | 21 +- .../UI/HumanoidProfileEditor.xaml.cs | 555 ++++++++++++++---- Content.Client/Traits/ParacusiaSystem.cs | 3 +- Content.Server/Flash/FlashSystem.cs | 2 +- .../Events/MassHallucinationsRule.cs | 2 +- .../Traits/Assorted/ParacusiaSystem.cs | 2 + Content.Server/Traits/TraitSystem.cs | 40 +- .../Zombies/ZombieSystem.Transform.cs | 2 +- Content.Shared/CCVar/CCVars.cs | 24 +- .../Prototypes/LoadoutCategoryPrototype.cs | 1 + .../Loadouts/Prototypes/LoadoutPrototype.cs | 6 +- .../Loadouts/Systems/LoadoutRequirements.cs | 375 ------------ .../Loadouts/Systems/LoadoutSystem.cs | 40 +- .../Systems/CharacterRequirements.cs | 529 +++++++++++++++++ .../Systems/CharacterRequirementsSystem.cs | 43 ++ Content.Shared/Drunk/DrunkSystem.cs | 2 +- .../Preferences/HumanoidCharacterProfile.cs | 53 +- .../{ => Components}/AccentlessComponent.cs | 2 +- .../LegsParalyzedComponent.cs | 5 +- .../LightweightDrunkComponent.cs | 4 +- .../{ => Components}/ParacusiaComponent.cs | 3 +- .../PermanentBlindnessComponent.cs | 2 +- .../Traits/Assorted/LegsParalyzedSystem.cs | 58 -- .../{ => Systems}/AccentlessSystem.cs | 8 +- .../Assorted/Systems/LegsParalyzedSystem.cs | 58 ++ .../{ => Systems}/PermanentBlindnessSystem.cs | 20 +- .../{ => Systems}/SharedParacusiaSystem.cs | 2 +- .../Prototypes/TraitCategoryPrototype.cs | 14 + .../Traits/Prototypes/TraitPrototype.cs | 39 ++ Content.Shared/Traits/TraitPrototype.cs | 55 -- .../customization/character-requirements.ftl | 39 ++ .../Locale/en-US/deltav/traits/traits.ftl | 16 +- .../Locale/en-US/loadouts/categories.ftl | 5 +- .../en-US/loadouts/loadout-requirements.ftl | 13 - .../ui/humanoid-profile-editor.ftl | 26 +- .../simplestation14/Traits/disabilities.ftl | 5 +- Resources/Locale/en-US/traits/categories.ftl | 8 + Resources/Locale/en-US/traits/traits.ftl | 47 +- .../Prototypes/DeltaV/Traits/altvision.yml | 8 +- .../Prototypes/DeltaV/Traits/neutral.yml | 7 +- .../Loadouts/Jobs/Heads/captain.yml | 26 +- .../Loadouts/Jobs/Heads/chiefEngineer.yml | 8 +- .../Jobs/Heads/chiefMedicalOfficer.yml | 12 +- .../Loadouts/Jobs/Heads/headOfPersonnel.yml | 18 +- .../Loadouts/Jobs/Heads/headOfSecurity.yml | 30 +- .../Loadouts/Jobs/Heads/quarterMaster.yml | 12 +- .../Loadouts/Jobs/Heads/researchDirector.yml | 10 +- Resources/Prototypes/Loadouts/Jobs/cargo.yml | 4 +- .../Prototypes/Loadouts/Jobs/engineering.yml | 36 +- .../Prototypes/Loadouts/Jobs/medical.yml | 46 +- .../Prototypes/Loadouts/Jobs/science.yml | 18 +- .../Prototypes/Loadouts/Jobs/security.yml | 26 +- .../Prototypes/Loadouts/Jobs/service.yml | 30 +- Resources/Prototypes/Loadouts/categories.yml | 9 +- Resources/Prototypes/Loadouts/uniform.yml | 2 +- .../SimpleStation14/Traits/disabilities.yml | 15 +- Resources/Prototypes/Traits/categories.yml | 19 + Resources/Prototypes/Traits/disabilities.yml | 73 ++- .../Prototypes/Traits/inconveniences.yml | 18 +- Resources/Prototypes/Traits/neutral.yml | 25 +- 60 files changed, 1621 insertions(+), 960 deletions(-) delete mode 100644 Content.Shared/Clothing/Loadouts/Systems/LoadoutRequirements.cs create mode 100644 Content.Shared/Customization/Systems/CharacterRequirements.cs create mode 100644 Content.Shared/Customization/Systems/CharacterRequirementsSystem.cs rename Content.Shared/Traits/Assorted/{ => Components}/AccentlessComponent.cs (89%) rename Content.Shared/Traits/Assorted/{ => Components}/LegsParalyzedComponent.cs (65%) rename Content.Shared/Traits/Assorted/{ => Components}/LightweightDrunkComponent.cs (90%) rename Content.Shared/Traits/Assorted/{ => Components}/ParacusiaComponent.cs (93%) rename Content.Shared/Traits/Assorted/{ => Components}/PermanentBlindnessComponent.cs (81%) delete mode 100644 Content.Shared/Traits/Assorted/LegsParalyzedSystem.cs rename Content.Shared/Traits/Assorted/{ => Systems}/AccentlessSystem.cs (62%) create mode 100644 Content.Shared/Traits/Assorted/Systems/LegsParalyzedSystem.cs rename Content.Shared/Traits/Assorted/{ => Systems}/PermanentBlindnessSystem.cs (59%) rename Content.Shared/Traits/Assorted/{ => Systems}/SharedParacusiaSystem.cs (56%) create mode 100644 Content.Shared/Traits/Prototypes/TraitCategoryPrototype.cs create mode 100644 Content.Shared/Traits/Prototypes/TraitPrototype.cs delete mode 100644 Content.Shared/Traits/TraitPrototype.cs create mode 100644 Resources/Locale/en-US/customization/character-requirements.ftl delete mode 100644 Resources/Locale/en-US/loadouts/loadout-requirements.ftl create mode 100644 Resources/Locale/en-US/traits/categories.ftl create mode 100644 Resources/Prototypes/Traits/categories.yml diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml index 9a70d678310..38d4a411ff3 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml @@ -142,18 +142,29 @@ - + - - - +