Upstream species (#6066)
* Step 1 of porting; grabbed most of the files via patches. * Add species field to the DB * Appearance patches for slimes. * Fix the db test. * Add slime's biocompat. * slimby * Fixes, allow specifying if a species is playable or not. * Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com> * Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com> * Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com> * Address reviews. * Address reviews. * make an if-case. * Fix a goof where species wouldn't get shown in the editor correctly (it'd always default to human) Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -41,9 +41,10 @@ namespace Content.Client.CharacterAppearance.Systems
|
||||
HumanoidVisualLayers.LFoot
|
||||
};
|
||||
|
||||
private void UpdateLooks(EntityUid uid, HumanoidAppearanceComponent component, ChangedHumanoidAppearanceEvent args)
|
||||
private void UpdateLooks(EntityUid uid, HumanoidAppearanceComponent component,
|
||||
ChangedHumanoidAppearanceEvent args)
|
||||
{
|
||||
if(!EntityManager.TryGetComponent(uid, out SpriteComponent? sprite))
|
||||
if (!EntityManager.TryGetComponent(uid, out SpriteComponent? sprite))
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent(uid, out SharedBodyComponent? body))
|
||||
@@ -58,13 +59,18 @@ namespace Content.Client.CharacterAppearance.Systems
|
||||
}
|
||||
}
|
||||
|
||||
sprite.LayerSetColor(HumanoidVisualLayers.Hair,
|
||||
component.CanColorHair ? component.Appearance.HairColor : Color.White);
|
||||
sprite.LayerSetColor(HumanoidVisualLayers.FacialHair,
|
||||
component.CanColorFacialHair ? component.Appearance.FacialHairColor : Color.White);
|
||||
var hairColor = component.CanColorHair ? component.Appearance.HairColor : Color.White;
|
||||
hairColor = component.HairMatchesSkin ? component.Appearance.SkinColor : hairColor;
|
||||
sprite.LayerSetColor(HumanoidVisualLayers.Hair, hairColor.WithAlpha(component.HairAlpha));
|
||||
|
||||
var facialHairColor = component.CanColorHair ? component.Appearance.FacialHairColor : Color.White;
|
||||
facialHairColor = component.HairMatchesSkin ? component.Appearance.SkinColor : facialHairColor;
|
||||
sprite.LayerSetColor(HumanoidVisualLayers.FacialHair, facialHairColor.WithAlpha(component.HairAlpha));
|
||||
|
||||
foreach (var layer in _bodyPartLayers)
|
||||
{
|
||||
sprite.LayerSetColor(layer, component.Appearance.SkinColor);
|
||||
}
|
||||
|
||||
sprite.LayerSetColor(HumanoidVisualLayers.Eyes, component.Appearance.EyeColor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user