Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tail Covers! #427

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Content.Shared/Clothing/Components/TailVisualComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Robust.Shared.Serialization;

namespace Content.Shared.Clothing.Components
{
[Serializable, NetSerializable]
public enum TailVisuals
{
Tailcover,
}

[Serializable, NetSerializable]
public enum TailcoverVisuals
{
True,
False,
}
}
16 changes: 16 additions & 0 deletions Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ public abstract class ClothingSystem : EntitySystem
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly InventorySystem _invSystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;

[ValidatePrototypeId<TagPrototype>]
private const string HairTag = "HidesHair";

[ValidatePrototypeId<TagPrototype>]
private const string NoseTag = "HidesNose";

[ValidatePrototypeId<TagPrototype>]
private const string TailTag = "HidesTail";
Comment on lines 24 to +31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have this be a generic MarkingHidesLayerX.


public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -136,6 +140,12 @@ protected virtual void OnGotEquipped(EntityUid uid, ClothingComponent component,
ToggleVisualLayer(args.Equipee, HumanoidVisualLayers.Hair, HairTag);
if ((new string[] { "mask", "head" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipment, NoseTag))
ToggleVisualLayer(args.Equipee, HumanoidVisualLayers.Snout, NoseTag);
if ((new string[] { "outerClothing" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipee, TailTag) && _tagSystem.HasTag(args.Equipment, TailTag))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((new string[] { "outerClothing" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipee, TailTag) && _tagSystem.HasTag(args.Equipment, TailTag))
if ((new string[] { "outerClothing" }).Contains(args.Slot) && HasComp<TailVisualComponent>(args.Equipee) && _tagSystem.HasTag(args.Equipment, TailTag))

{
_humanoidSystem.SetLayerVisibility(args.Equipee, HumanoidVisualLayers.Tail, false);
TryComp(args.Equipee, out AppearanceComponent? appearance);
_appearance.SetData(args.Equipee, TailVisuals.Tailcover, TailcoverVisuals.True, appearance);
}
}

protected virtual void OnGotUnequipped(EntityUid uid, ClothingComponent component, GotUnequippedEvent args)
Expand All @@ -145,6 +155,12 @@ protected virtual void OnGotUnequipped(EntityUid uid, ClothingComponent componen
ToggleVisualLayer(args.Equipee, HumanoidVisualLayers.Hair, HairTag);
if ((new string[] { "mask", "head" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipment, NoseTag))
ToggleVisualLayer(args.Equipee, HumanoidVisualLayers.Snout, NoseTag);
if ((new string[] { "outerClothing" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipee, TailTag) && _tagSystem.HasTag(args.Equipment, TailTag))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((new string[] { "outerClothing" }).Contains(args.Slot) && _tagSystem.HasTag(args.Equipee, TailTag) && _tagSystem.HasTag(args.Equipment, TailTag))
if ((new string[] { "outerClothing" }).Contains(args.Slot) && HasComp<TailVisualComponent>(args.Equipee) && _tagSystem.HasTag(args.Equipment, TailTag))

{
_humanoidSystem.SetLayerVisibility(args.Equipee, HumanoidVisualLayers.Tail, true);
TryComp(args.Equipee, out AppearanceComponent? appearance);
_appearance.SetData(args.Equipee, TailVisuals.Tailcover, TailcoverVisuals.False, appearance);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely not going to ask this of you, but seeing incredibly cursed visualizer code get extended even further, makes me realize I should probably revisit this later and expand that aforementioned component into one that lets you arbitrarily declare layers to be hidden when equipping clothing with a specific condition. Harpies want to hide their tail, everyone wants to hide their hair, harpies need to hide their wings, and their tail, and their ear tufts, it's all something I could finangle into a single check.

}

private void OnGetState(EntityUid uid, ClothingComponent component, ref ComponentGetState args)
Expand Down
16 changes: 16 additions & 0 deletions Resources/Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
sprite: "DeltaV/Effects/creampie.rsi"
state: "creampie_vulpkanin"
visible: false
- map: [ "tailcover" ]
sprite: "Clothing/tailcover.rsi"
state: "tailcover-vulpkanin"
visible: false
- type: GenericVisualizer
visuals:
enum.TailVisuals.Tailcover:
tailcover:
True: {visible: true}
False: {visible: false}
- type: MeleeWeapon
hidden: true
soundHit:
Expand All @@ -97,6 +107,12 @@
Female: FemaleVulpkanin
Unsexed: MaleVulpkanin
- type: DogVision
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
Comment on lines +110 to +115
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
- type: TailVisual

- type: LanguageKnowledge
speaks:
- GalacticCommon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
- Hardsuit
- WhitelistChameleon
- HidesHarpyWings #DeltaV: Used by harpies to help render their hardsuit sprites
- HidesTail
- type: Clothing
equipDelay: 2.5 # Hardsuits are heavy and take a while to put on/off.
unequipDelay: 2.5
Expand All @@ -117,6 +118,7 @@
- type: Tag
tags:
- HidesHarpyWings #DeltaV: Used by harpies to help render their hardsuit sprites
- HidesTail
- type: Clothing
equipDelay: 1.25 # Softsuits are easier to put on and off
unequipDelay: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@
tags:
- WhitelistChameleon
- HighRiskItem
- HidesTail
- HidesHarpyWings
- type: ToggleableClothing
clothingPrototype: ClothingHeadHelmetHardsuitRd
- type: StaticPrice
Expand Down Expand Up @@ -516,6 +518,8 @@
- MonkeyWearable
- Hardsuit
- WhitelistChameleon
- HidesTail
- HidesHarpyWings

# Syndicate Medic Hardsuit
- type: entity
Expand All @@ -534,6 +538,8 @@
tags:
- Hardsuit
- WhitelistChameleon
- HidesTail
- HidesHarpyWings

#Syndicate Elite Hardsuit
- type: entity
Expand Down Expand Up @@ -822,6 +828,8 @@
tags:
- Hardsuit
- WhitelistChameleon
- HidesTail
- HidesHarpyWings

#ERT Janitor Hardsuit
- type: entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- SuitEVA
- MonkeyWearable
- WhitelistChameleon
- HidesHarpyWings
- HidesTail

#Syndicate EVA
- type: entity
Expand All @@ -31,6 +33,8 @@
- SuitEVA
- MonkeyWearable
- WhitelistChameleon
- HidesHarpyWings
- HidesTail

#Emergency EVA
- type: entity
Expand Down Expand Up @@ -72,6 +76,8 @@
- SuitEVA
- MonkeyWearable
- WhitelistChameleon
- HidesHarpyWings
- HidesTail

#NTSRA Voidsuit / Ancient Voidsuit
- type: entity
Expand Down
68 changes: 68 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/reptilian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,68 @@
id: BaseMobReptilian
abstract: true
components:
- type: Sprite
layers:
- map: [ "enum.HumanoidVisualLayers.Chest" ]
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115
# its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear.
# sprite refactor when
state: l_leg
- shader: StencilMask
map: ["enum.HumanoidVisualLayers.StencilMask"]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: ["jumpsuit"]
- map: ["enum.HumanoidVisualLayers.LFoot"]
- map: ["enum.HumanoidVisualLayers.RFoot"]
- map: ["enum.HumanoidVisualLayers.LHand"]
- map: ["enum.HumanoidVisualLayers.RHand"]
- map: [ "gloves" ]
- map: [ "shoes" ]
- map: [ "ears" ]
- map: [ "outerClothing" ]
- map: [ "eyes" ]
- map: [ "belt" ]
- map: [ "id" ]
- map: [ "neck" ]
- map: [ "back" ]
- map: [ "enum.HumanoidVisualLayers.FacialHair" ]
- map: [ "enum.HumanoidVisualLayers.Hair" ]
- map: [ "enum.HumanoidVisualLayers.HeadSide" ]
- map: [ "enum.HumanoidVisualLayers.HeadTop" ]
- map: [ "enum.HumanoidVisualLayers.Tail" ]
- map: [ "mask" ]
- map: [ "head" ]
- map: [ "pocket1" ]
- map: [ "pocket2" ]
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
color: "#ffffff"
sprite: Objects/Misc/handcuffs.rsi
state: body-overlay-2
visible: false
- map: [ "clownedon" ] # Dynamically generated
sprite: "Effects/creampie.rsi"
state: "creampie_human"
visible: false
- map: [ "tailcover" ]
sprite: "Clothing/tailcover.rsi"
state: "tailcover-reptilian"
visible: false
- type: GenericVisualizer
visuals:
enum.TailVisuals.Tailcover:
tailcover:
True: {visible: true}
False: {visible: false}
- type: HumanoidAppearance
species: Reptilian
- type: Hunger
Expand Down Expand Up @@ -59,6 +121,12 @@
types:
Heat : 1.5 #per second, scales with temperature & other constants
- type: Wagging
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
Comment on lines +124 to +129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
- type: TailVisual

- type: LanguageKnowledge
speaks:
- GalacticCommon
Expand Down
67 changes: 67 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,61 @@
components:
- type: Sprite
scale: 0.8, 0.8
layers:
- map: [ "enum.HumanoidVisualLayers.Chest" ]
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115
# its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear.
# sprite refactor when
state: l_leg
- shader: StencilMask
map: ["enum.HumanoidVisualLayers.StencilMask"]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: ["jumpsuit"]
- map: ["enum.HumanoidVisualLayers.LFoot"]
- map: ["enum.HumanoidVisualLayers.RFoot"]
- map: ["enum.HumanoidVisualLayers.LHand"]
- map: ["enum.HumanoidVisualLayers.RHand"]
- map: [ "gloves" ]
- map: [ "shoes" ]
- map: [ "ears" ]
- map: [ "outerClothing" ]
- map: [ "eyes" ]
- map: [ "belt" ]
- map: [ "id" ]
- map: [ "neck" ]
- map: [ "back" ]
- map: [ "enum.HumanoidVisualLayers.FacialHair" ]
- map: [ "enum.HumanoidVisualLayers.Hair" ]
- map: [ "enum.HumanoidVisualLayers.HeadSide" ]
- map: [ "enum.HumanoidVisualLayers.HeadTop" ]
- map: [ "enum.HumanoidVisualLayers.Tail" ]
- map: [ "mask" ]
- map: [ "head" ]
- map: [ "pocket1" ]
- map: [ "pocket2" ]
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
color: "#ffffff"
sprite: Objects/Misc/handcuffs.rsi
state: body-overlay-2
visible: false
- map: [ "clownedon" ] # Dynamically generated
sprite: "Effects/creampie.rsi"
state: "creampie_human"
visible: false
- map: [ "tailcover" ]
sprite: "Clothing/tailcover.rsi"
state: "tailcover-felinds"
visible: false
- type: HumanoidAppearance
species: Felinid
initial: Felinid
Expand Down Expand Up @@ -65,6 +120,18 @@
Unsexed: MaleFelinid
- type: Felinid
- type: NoShoesSilentFootsteps
- type: GenericVisualizer
visuals:
enum.TailVisuals.Tailcover:
tailcover:
True: {visible: true}
False: {visible: false}
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
Comment on lines +129 to +134
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: Tag
tags:
- CanPilot
- FootstepSound
- DoorBumpOpener
- HidesTail
- type: TailVisual

- type: LanguageKnowledge
speaks:
- GalacticCommon
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,9 @@
- type: Tag
id: HidesNose # for non-standard noses.

- type: Tag
id: HidesTail # Protecc the tails!

- type: Tag
id: HighRiskItem

Expand Down
23 changes: 23 additions & 0 deletions Resources/Textures/Clothing/tailcover.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "TailCover by gentlebutter (588410099190726656) and ghostprince (115894681304301569)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"copyright": "TailCover by gentlebutter (588410099190726656) and ghostprince (115894681304301569)",
"copyright": "TailCover by DSC@gentlebutter (588410099190726656) and DSC@ghostprince (115894681304301569)",

"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "tailcover-vulpkanin",
"directions": 4
},
{
"name": "tailcover-reptilian",
"directions": 4
},
{
"name": "tailcover-felinds",
"directions": 4
}
]
}
Comment on lines +1 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you check in Resources/Textures/DeltaV/Mobs/Customization/Harpy, there is a stray png file listed as harpy_wingcover.png not present in any RSI. Do you mind moving it to this folder, and rename it to tailcover-harpy, then add the TailVisual component and required visual layers to Harpy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm having Still-Icarus make a wing cover for Harpies too, after this is merged I'll implement a wing cover system for Harpies so that they can finally have actual proper hardsuits.
Fari_heart

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading