SKREEEEEE (#3706)
* Import bird sprites and define basic mob. * SKREEEEEEEEE * Move hair styles to new sprite accessory prototypes. Basic stuff, no multi-species stuff yet. * Vox hair styles and clothes * Make HumanoidCharacterProfile.Default() a static default to fix tests. Usages that wanted the previous random behavior now call Random(). * Remove names from hair style prototypes. (They're in localization files) * Update Content.Shared/Actions/ActionType.cs (sk)reeee github Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5ed935f30a
commit
0ac4c0e85c
@@ -1,23 +1,41 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Preferences;
|
||||
using Content.Shared.Preferences.Appearance;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Mobs
|
||||
{
|
||||
public abstract class SharedHumanoidAppearanceComponent : Component
|
||||
{
|
||||
private HumanoidCharacterAppearance _appearance = default!;
|
||||
private HumanoidCharacterAppearance _appearance = HumanoidCharacterAppearance.Default();
|
||||
private Sex _sex;
|
||||
private Gender _gender;
|
||||
|
||||
public sealed override string Name => "HumanoidAppearance";
|
||||
public sealed override uint? NetID => ContentNetIDs.HUMANOID_APPEARANCE;
|
||||
|
||||
[DataField("categoriesHair")]
|
||||
[ViewVariables]
|
||||
public SpriteAccessoryCategories CategoriesHair { get; set; } = SpriteAccessoryCategories.HumanHair;
|
||||
|
||||
[DataField("categoriesFacialHair")]
|
||||
[ViewVariables]
|
||||
public SpriteAccessoryCategories CategoriesFacialHair { get; set; } = SpriteAccessoryCategories.HumanFacialHair;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("canColorHair")]
|
||||
public bool CanColorHair { get; set; } = true;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("canColorFacialHair")]
|
||||
public bool CanColorFacialHair { get; set; } = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public virtual HumanoidCharacterAppearance Appearance
|
||||
{
|
||||
@@ -80,7 +98,8 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
[NetSerializable]
|
||||
private sealed class HumanoidAppearanceComponentState : ComponentState
|
||||
{
|
||||
public HumanoidAppearanceComponentState(HumanoidCharacterAppearance appearance, Sex sex, Gender gender) : base(ContentNetIDs.HUMANOID_APPEARANCE)
|
||||
public HumanoidAppearanceComponentState(HumanoidCharacterAppearance appearance, Sex sex, Gender gender) :
|
||||
base(ContentNetIDs.HUMANOID_APPEARANCE)
|
||||
{
|
||||
Appearance = appearance;
|
||||
Sex = sex;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Preferences.Appearance;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -19,12 +20,12 @@ namespace Content.Shared.GameObjects.Components
|
||||
[Serializable, NetSerializable]
|
||||
public class HairSelectedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly string HairName;
|
||||
public readonly string HairId;
|
||||
public readonly bool IsFacialHair;
|
||||
|
||||
public HairSelectedMessage(string name, bool isFacialHair)
|
||||
public HairSelectedMessage(string id, bool isFacialHair)
|
||||
{
|
||||
HairName = name;
|
||||
HairId = id;
|
||||
IsFacialHair = isFacialHair;
|
||||
}
|
||||
}
|
||||
@@ -58,17 +59,25 @@ namespace Content.Shared.GameObjects.Components
|
||||
{
|
||||
public readonly Color HairColor;
|
||||
public readonly Color FacialHairColor;
|
||||
public readonly string HairName;
|
||||
public readonly string FacialHairName;
|
||||
public readonly string HairId;
|
||||
public readonly string FacialHairId;
|
||||
public readonly Color EyeColor;
|
||||
public readonly SpriteAccessoryCategories CategoriesHair;
|
||||
public readonly SpriteAccessoryCategories CategoriesFacialHair;
|
||||
public readonly bool CanColorHair;
|
||||
public readonly bool CanColorFacialHair;
|
||||
|
||||
public MagicMirrorInitialDataMessage(Color hairColor, Color facialHairColor, string hairName, string facialHairName, Color eyeColor)
|
||||
public MagicMirrorInitialDataMessage(Color hairColor, Color facialHairColor, string hairId, string facialHairId, Color eyeColor, SpriteAccessoryCategories categoriesHair, SpriteAccessoryCategories categoriesFacialHair, bool canColorHair, bool canColorFacialHair)
|
||||
{
|
||||
HairColor = hairColor;
|
||||
FacialHairColor = facialHairColor;
|
||||
HairName = hairName;
|
||||
FacialHairName = facialHairName;
|
||||
HairId = hairId;
|
||||
FacialHairId = facialHairId;
|
||||
EyeColor = eyeColor;
|
||||
CategoriesHair = categoriesHair;
|
||||
CategoriesFacialHair = categoriesFacialHair;
|
||||
CanColorHair = canColorHair;
|
||||
CanColorFacialHair = canColorFacialHair;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user