diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs index beae9f0696..3900f7a3ca 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs @@ -526,6 +526,7 @@ namespace Content.Client.Preferences.UI _controller.UpdateProfile(Profile); _controller.ReloadCharacterUI(); + IsDirty = true; } @@ -1308,7 +1309,7 @@ namespace Content.Client.Preferences.UI private void SetBodyType(string newBodyType) { Profile = Profile?.WithBodyType(newBodyType); - IsDirty = true; + SetDirty(); _needUpdatePreview = true; } diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index c0d6c6325f..95859d1f92 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -28,7 +28,9 @@ namespace Content.Shared.Preferences [Serializable, NetSerializable] public sealed partial class HumanoidCharacterProfile : ICharacterProfile { - private static readonly Regex RestrictedNameRegex = new("[^A-Z,a-z,0-9, -]"); + // WD edit PLEASE DO NOT CHANGE RUSSIAN TO ENGLISH LETTERS, иначе уебу + private static readonly Regex RestrictedNameRegex = new("[^А-Я,а-я,0-9, -]"); + private static readonly Regex RestrictedNameBorgsRegex = new("[^А-Я,а-я,0-9, -\\.]"); private static readonly Regex ICNameCaseRegex = new(@"^(?\w)|\b(?\w)(?=\w*$)"); public const int MaxNameLength = 32; @@ -461,9 +463,9 @@ namespace Content.Shared.Preferences { if (maybeOther is not HumanoidCharacterProfile other) return false; if (Name != other.Name) return false; - if (ClownName != other.ClownName) return false; - if (MimeName != other.MimeName) return false; - if (BorgName != other.BorgName) return false; + if (ClownName != other.ClownName) return false; // WD + if (MimeName != other.MimeName) return false; // WD + if (BorgName != other.BorgName) return false; // WD if (Age != other.Age) return false; if (Sex != other.Sex) return false; if (Gender != other.Gender) return false; @@ -532,9 +534,13 @@ namespace Content.Shared.Preferences }; string name; + + // WD edit start string clownName; string mimeName; string borgName; + // WD edit end + if (string.IsNullOrEmpty(Name)) { name = GetName(Species, gender); @@ -548,6 +554,7 @@ namespace Content.Shared.Preferences name = Name; } + // WD edit start if (string.IsNullOrEmpty(ClownName)) { clownName = GetClownName(); @@ -586,36 +593,48 @@ namespace Content.Shared.Preferences { borgName = BorgName; } + // WD edit end name = name.Trim(); + + // WD edit start clownName = clownName.Trim(); mimeName = mimeName.Trim(); borgName = borgName.Trim(); + // WD edit end if (configManager.GetCVar(CCVars.RestrictedNames)) { name = RestrictedNameRegex.Replace(name, string.Empty); + + // WD edit start clownName = RestrictedNameRegex.Replace(clownName, string.Empty); mimeName = RestrictedNameRegex.Replace(mimeName, string.Empty); - borgName = RestrictedNameRegex.Replace(borgName, string.Empty); + borgName = RestrictedNameBorgsRegex.Replace(borgName, string.Empty); + // WD edit end } if (configManager.GetCVar(CCVars.ICNameCase)) { // This regex replaces the first character of the first and last words of the name with their uppercase version - name = name = ICNameCaseRegex.Replace(name, m => m.Groups["word"].Value.ToUpper()); + name = ICNameCaseRegex.Replace(name, m => m.Groups["word"].Value.ToUpper()); - clownName = clownName = ICNameCaseRegex.Replace(name, m => m.Groups["word"].Value.ToUpper()); - mimeName = mimeName = ICNameCaseRegex.Replace(name, m => m.Groups["word"].Value.ToUpper()); - borgName = borgName = ICNameCaseRegex.Replace(name, m => m.Groups["word"].Value.ToUpper()); + + // Clowns, mimes and cyborgs may not have surnames + //clownName = ICNameCaseRegex.Replace(clownName, m => m.Groups["word"].Value.ToUpper()); + //mimeName = ICNameCaseRegex.Replace(mimeName, m => m.Groups["word"].Value.ToUpper()); + //borgName = ICNameCaseRegex.Replace(borgName, m => m.Groups["word"].Value.ToUpper()); } if (string.IsNullOrEmpty(name)) { name = GetName(Species, gender); + + // WD edit start clownName = GetClownName(); mimeName = GetMimeName(); borgName = GetBorgName(); + // WD edit end } var flavortext = FlavorText.Length > MaxDescLength diff --git a/Resources/Prototypes/Body/Prototypes/terminator.yml b/Resources/Prototypes/Body/Prototypes/terminator.yml index c271a89d86..506fcd4009 100644 --- a/Resources/Prototypes/Body/Prototypes/terminator.yml +++ b/Resources/Prototypes/Body/Prototypes/terminator.yml @@ -13,8 +13,8 @@ torso: part: TorsoHuman connections: - - left arm - right arm + - left arm - left leg - right leg right arm: @@ -55,8 +55,8 @@ torso: part: TorsoTerminator connections: - - left arm - right arm + - left arm - left leg - right leg right arm: diff --git a/Resources/Prototypes/_White/Body/Prototypes/felinid.yml b/Resources/Prototypes/_White/Body/Prototypes/felinid.yml index 4817e301c3..7d7219b797 100644 --- a/Resources/Prototypes/_White/Body/Prototypes/felinid.yml +++ b/Resources/Prototypes/_White/Body/Prototypes/felinid.yml @@ -13,8 +13,8 @@ torso: part: TorsoHuman connections: - - left arm - right arm + - left arm - left leg - right leg organs: diff --git a/Resources/Prototypes/_White/Body/Prototypes/harpy.yml b/Resources/Prototypes/_White/Body/Prototypes/harpy.yml index 8882a5ed30..ca72bb885e 100644 --- a/Resources/Prototypes/_White/Body/Prototypes/harpy.yml +++ b/Resources/Prototypes/_White/Body/Prototypes/harpy.yml @@ -13,8 +13,8 @@ torso: part: TorsoHuman connections: - - left arm - right arm + - left arm - left leg - right leg organs: diff --git a/Resources/Prototypes/_White/Mobs/Species/harpy.yml b/Resources/Prototypes/_White/Mobs/Species/harpy.yml index f3cad9ff0c..28e6f19ce7 100644 --- a/Resources/Prototypes/_White/Mobs/Species/harpy.yml +++ b/Resources/Prototypes/_White/Mobs/Species/harpy.yml @@ -6,7 +6,6 @@ abstract: true components: - type: HarpySinger - - type: Instrument allowPercussion: false program: 52 @@ -87,13 +86,12 @@ sprite: "Effects/creampie.rsi" state: "creampie_human" visible: false -# Yes, RArm has to be down here +# Yes, RArm has to be down here. WHY - map: [ "enum.HumanoidVisualLayers.RArm" ] - map: [ "enum.HumanoidVisualLayers.Hair" ] - map: [ "enum.HumanoidVisualLayers.HeadTop" ] - map: [ "mask" ] - map: [ "head" ] - - type: HumanoidAppearance species: Harpy - type: Fixtures