From a30cae21f632a86459a15cc5feb6e20c597af645 Mon Sep 17 00:00:00 2001 From: Flipp Syder <76629141+vulppine@users.noreply.github.com> Date: Thu, 5 May 2022 01:07:42 -0700 Subject: [PATCH] Markings (#7072) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth --- .../Systems/HumanoidAppearanceSystem.cs | 11 +- Content.Client/Markings/MarkingPicker.xaml | 28 + Content.Client/Markings/MarkingPicker.xaml.cs | 439 +++++++ Content.Client/Markings/MarkingsSystem.cs | 162 +++ .../Preferences/UI/HumanoidProfileEditor.xaml | 12 +- .../UI/HumanoidProfileEditor.xaml.cs | 120 +- ...20220310173734_SpeciesMarkings.Designer.cs | 1040 +++++++++++++++++ .../20220310173734_SpeciesMarkings.cs | 26 + .../PostgresServerDbContextModelSnapshot.cs | 5 + ...20220310173728_SpeciesMarkings.Designer.cs | 989 ++++++++++++++++ .../Sqlite/20220310173728_SpeciesMarkings.cs | 26 + .../SqliteServerDbContextModelSnapshot.cs | 5 + Content.Server.Database/Model.cs | 1 + Content.Server/Database/ServerDbBase.cs | 29 +- .../HumanoidCharacterAppearance.cs | 40 +- .../HumanoidVisualLayers.cs | 7 +- .../HumanoidVisualLayersExtension.cs | 7 +- Content.Shared/Entry/EntryPoint.cs | 2 + Content.Shared/IoC/SharedContentIoC.cs | 2 + Content.Shared/Markings/Marking.cs | 105 ++ Content.Shared/Markings/MarkingCategories.cs | 19 + Content.Shared/Markings/MarkingManager.cs | 68 ++ Content.Shared/Markings/MarkingPrototype.cs | 39 + Content.Shared/Markings/MarkingsComponent.cs | 58 + Content.Shared/Markings/MarkingsSet.cs | 283 +++++ .../Preferences/HumanoidCharacterProfile.cs | 2 +- Content.Shared/Species/SpeciesPrototype.cs | 2 - .../Server/Preferences/ServerDbSqliteTests.cs | 4 +- Resources/Locale/en-US/markings/cat.ftl | 2 + Resources/Locale/en-US/markings/reptilian.ftl | 41 + .../ui/humanoid-profile-editor.ftl | 1 + .../en-US/preferences/ui/markings-picker.ftl | 20 + .../Mobs/Customization/Markings/cat_parts.yml | 19 + .../Mobs/Customization/Markings/reptilian.yml | 130 +++ .../Entities/Mobs/Species/human.yml | 9 + .../Entities/Mobs/Species/reptilian.yml | 89 +- .../cat_parts.rsi/ears_cat_inner.png | Bin 0 -> 5181 bytes .../cat_parts.rsi/ears_cat_outer.png | Bin 0 -> 5836 bytes .../Customization/cat_parts.rsi/meta.json | 2 + .../Customization/cat_parts.rsi/tail_cat.png | Bin 0 -> 247 bytes .../masking_helpers.rsi/meta.json | 2 +- .../masking_helpers.rsi/none.png | Bin 0 -> 83 bytes .../reptilian_parts.rsi/meta.json | 16 + .../reptilian_parts.rsi/tail_dtiger.png | Bin 0 -> 6716 bytes .../reptilian_parts.rsi/tail_ltiger.png | Bin 0 -> 7315 bytes .../reptilian_parts.rsi/tail_smooth.png | Bin 0 -> 7022 bytes .../reptilian_parts.rsi/tail_spikes.png | Bin 0 -> 6817 bytes 47 files changed, 3785 insertions(+), 77 deletions(-) create mode 100644 Content.Client/Markings/MarkingPicker.xaml create mode 100644 Content.Client/Markings/MarkingPicker.xaml.cs create mode 100644 Content.Client/Markings/MarkingsSystem.cs create mode 100644 Content.Server.Database/Migrations/Postgres/20220310173734_SpeciesMarkings.Designer.cs create mode 100644 Content.Server.Database/Migrations/Postgres/20220310173734_SpeciesMarkings.cs create mode 100644 Content.Server.Database/Migrations/Sqlite/20220310173728_SpeciesMarkings.Designer.cs create mode 100644 Content.Server.Database/Migrations/Sqlite/20220310173728_SpeciesMarkings.cs create mode 100644 Content.Shared/Markings/Marking.cs create mode 100644 Content.Shared/Markings/MarkingCategories.cs create mode 100644 Content.Shared/Markings/MarkingManager.cs create mode 100644 Content.Shared/Markings/MarkingPrototype.cs create mode 100644 Content.Shared/Markings/MarkingsComponent.cs create mode 100644 Content.Shared/Markings/MarkingsSet.cs create mode 100644 Resources/Locale/en-US/markings/cat.ftl create mode 100644 Resources/Locale/en-US/markings/reptilian.ftl create mode 100644 Resources/Locale/en-US/preferences/ui/markings-picker.ftl create mode 100644 Resources/Prototypes/Entities/Mobs/Customization/Markings/cat_parts.yml create mode 100644 Resources/Prototypes/Entities/Mobs/Customization/Markings/reptilian.yml create mode 100644 Resources/Textures/Mobs/Customization/cat_parts.rsi/ears_cat_inner.png create mode 100644 Resources/Textures/Mobs/Customization/cat_parts.rsi/ears_cat_outer.png create mode 100644 Resources/Textures/Mobs/Customization/cat_parts.rsi/meta.json create mode 100644 Resources/Textures/Mobs/Customization/cat_parts.rsi/tail_cat.png create mode 100644 Resources/Textures/Mobs/Customization/masking_helpers.rsi/none.png create mode 100644 Resources/Textures/Mobs/Customization/reptilian_parts.rsi/tail_dtiger.png create mode 100644 Resources/Textures/Mobs/Customization/reptilian_parts.rsi/tail_ltiger.png create mode 100644 Resources/Textures/Mobs/Customization/reptilian_parts.rsi/tail_smooth.png create mode 100644 Resources/Textures/Mobs/Customization/reptilian_parts.rsi/tail_spikes.png diff --git a/Content.Client/CharacterAppearance/Systems/HumanoidAppearanceSystem.cs b/Content.Client/CharacterAppearance/Systems/HumanoidAppearanceSystem.cs index fbb4940ced..328d4f0e62 100644 --- a/Content.Client/CharacterAppearance/Systems/HumanoidAppearanceSystem.cs +++ b/Content.Client/CharacterAppearance/Systems/HumanoidAppearanceSystem.cs @@ -22,13 +22,13 @@ namespace Content.Client.CharacterAppearance.Systems SubscribeLocalEvent(BodyPartRemoved); } - private readonly HumanoidVisualLayers[] _bodyPartLayers = { + public readonly static HumanoidVisualLayers[] BodyPartLayers = { HumanoidVisualLayers.Chest, HumanoidVisualLayers.Head, HumanoidVisualLayers.Snout, - HumanoidVisualLayers.Frills, - HumanoidVisualLayers.TailBehind, - HumanoidVisualLayers.TailFront, + HumanoidVisualLayers.HeadTop, + HumanoidVisualLayers.HeadSide, + HumanoidVisualLayers.Tail, HumanoidVisualLayers.Eyes, HumanoidVisualLayers.RArm, HumanoidVisualLayers.LArm, @@ -94,10 +94,11 @@ namespace Content.Client.CharacterAppearance.Systems sprite.LayerSetSprite(facialLayer, facialHairPrototype.Sprite); } - foreach (var layer in _bodyPartLayers) + foreach (var layer in BodyPartLayers) { // Not every mob may have the furry layers hence we just skip it. if (!sprite.LayerMapTryGet(layer, out var actualLayer)) continue; + if (!sprite[actualLayer].Visible) continue; sprite.LayerSetColor(actualLayer, component.Appearance.SkinColor); } diff --git a/Content.Client/Markings/MarkingPicker.xaml b/Content.Client/Markings/MarkingPicker.xaml new file mode 100644 index 0000000000..193a8796cd --- /dev/null +++ b/Content.Client/Markings/MarkingPicker.xaml @@ -0,0 +1,28 @@ + + + + + + + +