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

Fix Humanoid Color #1454

Merged
merged 3 commits into from
Jan 7, 2025
Merged
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
2 changes: 1 addition & 1 deletion Content.Shared/Humanoid/HumanoidCharacterAppearance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
public Color EyeColor { get; private set; }

[DataField]
public Color SkinColor { get; private set; }
public Color SkinColor { get; set; }

[DataField]
public List<Marking> Markings { get; private set; } = new();
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,19 @@ public HumanoidCharacterProfile()
/// <returns>Humanoid character profile with default settings.</returns>
public static HumanoidCharacterProfile DefaultWithSpecies(string species = SharedHumanoidAppearanceSystem.DefaultSpecies)
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var skinColor = SkinColor.ValidHumanSkinTone;

if (prototypeManager.TryIndex<SpeciesPrototype>(species, out var speciesPrototype))
skinColor = speciesPrototype.DefaultSkinTone;

return new()
{
Species = species,
Appearance = new()
{
SkinColor = skinColor,
},
};
}

Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/DeltaV/Species/lamia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
prototype: MobLamia
dollPrototype: MobLamiaDummy
sprites: MobLamiaSprites
defaultSkinTone: "#c0967f"
markingLimits: MobLamiaMarkingLimits
skinColoration: HumanToned
maleFirstNames: names_cyno_male
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
scale: 0.8, 0.8
- type: HumanoidAppearance
species: Felinid
initial: Felinid
- type: Fixtures
fixtures: # TODO: This needs a second fixture just for mob collisions.
fix1:
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Nyanotrasen/Species/Oni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
dollPrototype: MobOniDummy
markingLimits: MobOniMarkingLimits
sprites: MobHumanSprites
defaultSkinTone: "#ab5150"
skinColoration: Hues
maleFirstNames: names_oni_male
femaleFirstNames: names_oni_female
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Nyanotrasen/Species/felinid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: true
prototype: MobFelinid
sprites: MobHumanSprites
defaultSkinTone: "#c0967f"
markingLimits: MobFelinidMarkingLimits
dollPrototype: MobFelinidDummy
skinColoration: HumanToned
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Species/arachne.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: true # I'll kill these issues somehow.
prototype: MobArachne
sprites: MobArachneSprites
defaultSkinTone: "#c0967f"
markingLimits: MobArachneMarkingLimits
dollPrototype: MobArachneDummy
skinColoration: HumanToned
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Species/dwarf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: false # DeltaV - Disable dwarf
prototype: MobDwarf
sprites: MobHumanSprites
defaultSkinTone: "#c0967f"
markingLimits: MobHumanMarkingLimits
dollPrototype: MobDwarfDummy
skinColoration: HumanToned
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Species/harpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: true
prototype: MobHarpy
sprites: MobHarpySprites
defaultSkinTone: "#c0967f"
markingLimits: MobHarpyMarkingLimits
dollPrototype: MobHarpyDummy
skinColoration: HumanToned
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: true
prototype: MobHuman
sprites: MobHumanSprites
defaultSkinTone: "#c0967f"
markingLimits: MobHumanMarkingLimits
dollPrototype: MobHumanDummy
skinColoration: HumanToned
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Species/ipc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
roundStart: true
prototype: MobIPC
sprites: MobIPCSprites
defaultSkinTone: "#aaa9ad"
markingLimits: MobIPCMarkingLimits
dollPrototype: MobIPCDummy
skinColoration: Hues
Expand Down
Loading