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

[Port] Markings support shaders #2767

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion Content.Client/Humanoid/HumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,13 @@ private void ApplyMarking(MarkingPrototype markingPrototype,
sprite.LayerMapSet(layerId, layer);
sprite.LayerSetSprite(layerId, rsi);
}

// impstation edit begin - check if there's a shader defined in the markingPrototype's shader datafield, and if there is...
if (markingPrototype.Shader != null)
{
// use spriteComponent's layersetshader function to set the layer's shader to that which is specified.
sprite.LayerSetShader(layerId, markingPrototype.Shader);
}
// impstation edit end
sprite.LayerSetVisible(layerId, visible);

if (!visible || setting == null) // this is kinda implied
Expand Down
5 changes: 5 additions & 0 deletions Content.Shared/Humanoid/Markings/MarkingPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public sealed partial class MarkingPrototype : IPrototype
[DataField("sprites", required: true)]
public List<SpriteSpecifier> Sprites { get; private set; } = default!;

// impstation edit - allow markings to support shaders
[DataField("shader")]
public string? Shader { get; private set; } = null;
// end impstation edit

public Marking AsMarking()
{
return new Marking(ID, Sprites.Count);
Expand Down
5 changes: 5 additions & 0 deletions Resources/Locale/en-US/_Impstation/markings/arachnid.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
marking-SpiderMirror = Mirror
marking-SpiderMirror-spidermirror = Mirror

marking-SpiderGlowEyes = Glowing Eyes
marking-SpiderGlowEyes-spidergloweyes = Glowing Eyes
8 changes: 8 additions & 0 deletions Resources/Locale/en-US/_Impstation/markings/diona.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
marking-DionaMoonBloom = Diona Flower (Moon Bloom)
marking-DionaMoonBloom-dionamoonbloom = Diona Flower (Moon Bloom)

marking-DionaBigFirefly = Big Fireflies
marking-DionaBigFirefly-dionabigfirefly = Big Fireflies

marking-DionaFirefly = Fireflies
marking-DionaFirefly-dionafirefly = Fireflies
8 changes: 8 additions & 0 deletions Resources/Locale/en-US/_Impstation/markings/moth.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
marking-MothGlowAntenna = Antennae (Glowing)
marking-MothGlowAntenna-mothglowantenna = Antennae (Glowing)

marking-MothFireflyOverlay = Firefly Overlay
marking-MothFireflyOverlay-mothfirefly1 = Firefly Overlay

marking-MothFirefly = Wings (Firefly)
marking-MothFirefly-mothfirefly2 = Wings (Firefly)
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/_Impstation/markings/slimeperson.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
marking-SlimeEyeglow = Glowing Eyes
marking-SlimeEyeglow-eyeglow = Glowing Eyes
marking-FadingStars = Fading Starlight
marking-FadingStars-fadingstars1 = Brightest
marking-FadingStars-fadingstars2 = Middling
marking-FadingStars-fadingstars3 = Darkest
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_Impstation/markings/vox.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
marking-VoxTailLantern = Lantern
marking-VoxTailLantern-voxtaillantern = Lantern
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ marking-HarpyWingBat-bat_wings_tone_2 = Membrane

marking-HarpyWingBionic = Simple Bionic Wings (Whitescale)
marking-HarpyWingBionic-bionic_wings_tone_1 = Wings
marking-HarpyWingBionic-bionic_wings_tone_2 = Lights (Unshaded)

marking-HarpyWingBionicHighlights = Simple Bionic Wings (Lights)
marking-HarpyWingBionicHighlights-bionic_wings_tone_2 = Lights (Unshaded)

marking-HarpyEarsDefault = Feather Tufts
marking-HarpyEarsDefault-harpy_ears_default = Tufts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,24 @@
bodyPart: RArm
markingCategory: Arms
speciesRestriction: [Harpy]
forcedColoring: false # DeltaV
followSkinColor: false # DeltaV
sprites:
- sprite: Einstein-Engines/Mobs/Customization/Harpy/harpy_wings.rsi
state: bionic_wings_tone_1
# DeltaV - commenting out because this does not work. doing an alternate implementation
# - sprite: Einstein-Engines/Mobs/Customization/Harpy/harpy_wings.rsi
# state: bionic_wings_tone_2
# shader: unshaded

- type: marking
id: HarpyWingBionicHighlights
bodyPart: RArm
markingCategory: Overlay
speciesRestriction: [Harpy]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: Einstein-Engines/Mobs/Customization/Harpy/harpy_wings.rsi
state: bionic_wings_tone_2
shader: unshaded
shader: unshaded
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- type: marking
id: SpiderMirror
bodyPart: Chest
markingCategory: Chest
speciesRestriction: [ Arachnid ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: spidermirror
shader: unshaded

- type: marking
id: SpiderGlowEyes
bodyPart: Eyes
markingCategory: Head
speciesRestriction: [ Arachnid ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/arachnid.rsi
state: spidergloweyes
shader: unshaded
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- type: marking
id: DionaMoonBloom
bodyPart: HeadTop
markingCategory: HeadTop
speciesRestriction: [ Diona ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/diona.rsi
state: dionamoonbloom
shader: unshaded

- type: marking
id: DionaBigFirefly
bodyPart: Head
markingCategory: Head
speciesRestriction: [ Diona ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: dionabigfirefly
shader: unshaded

- type: marking
id: DionaFirefly
bodyPart: Chest
markingCategory: Chest
speciesRestriction: [ Diona ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: dionafirefly
shader: unshaded
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- type: marking
id: MothGlowAntenna
bodyPart: HeadTop
markingCategory: HeadTop
speciesRestriction: [ Moth ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: mothglowantenna
shader: unshaded

- type: marking
id: MothFireflyOverlay
bodyPart: Tail
markingCategory: Overlay
speciesRestriction: [ Moth ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: mothfirefly1
shader: unshaded

- type: marking
id: MothFirefly
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [ Moth ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/moth.rsi
state: mothfirefly2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- type: marking
id: SlimeEyeglow
bodyPart: Eyes
markingCategory: Head
speciesRestriction: [SlimePerson]
coloring:
default:
type:
!type:EyeColoring
negative: false
sprites:
- sprite: _Impstation/Mobs/Customization/slime_parts.rsi
state: eyeglow
shader: unshaded

- type: marking
id: FadingStars
bodyPart: Head
markingCategory: Head
speciesRestriction: [SlimePerson]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: fadingstars1
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: fadingstars2
- sprite: _Impstation/Mobs/Customization/animatedmarkings.rsi
state: fadingstars3
shader: unshaded
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: marking
id: VoxTailLantern
bodyPart: Tail
markingCategory: Overlay
speciesRestriction: [ Vox ]
forcedColoring: false
followSkinColor: false
sprites:
- sprite: _Impstation/Mobs/Customization/vox.rsi
state: voxtaillantern
shader: unshaded
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
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
Loading