From dc7b54f8329ca2f5a3bfcc6a6c06e381650000e9 Mon Sep 17 00:00:00 2001 From: Sh1ntra Date: Fri, 28 Jun 2024 02:25:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D1=83=D1=81?= =?UTF-8?q?=D1=81=D0=BA=D0=B8=D1=85=20=D0=B8=D0=BC=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Preferences/HumanoidCharacterProfile.cs | 4 ++- .../Nuclear14/Catalog/Fills/storage_fills.yml | 30 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index ece9a82bb24..736c556cd32 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -25,6 +25,7 @@ public sealed partial class HumanoidCharacterProfile : ICharacterProfile { public const int MaxNameLength = 32; public const int MaxDescLength = 512; + private static readonly Regex RestrictedNameRegex = new("[^А-Яа-яёЁ0-9' -]"); private readonly Dictionary _jobPriorities; private readonly List _antagPreferences; @@ -460,7 +461,7 @@ public void EnsureValid(IConfigurationManager configManager, IPrototypeManager p if (configManager.GetCVar(CCVars.RestrictedNames)) { - name = Regex.Replace(name, @"[^\u0030-\u0039,\u0041-\u005A,\u0061-\u007A,\u00C0-\u00D6,\u00D8-\u00F6,\u00F8-\u00FF,\u0100-\u017F, '.,-]", string.Empty); + //name = Regex.Replace(name, @"[^\u0030-\u0039,\u0041-\u005A,\u0061-\u007A,\u00C0-\u00D6,\u00D8-\u00F6,\u00F8-\u00FF,\u0100-\u017F, '.,-]", string.Empty); /* * 0030-0039 Basic Latin: ASCII Digits * 0041-005A Basic Latin: Uppercase Latin Alphabet @@ -470,6 +471,7 @@ public void EnsureValid(IConfigurationManager configManager, IPrototypeManager p * 00F8-00FF Latin-1 Supplement: Letters III * 0100-017F Latin Extended A: European Latin */ + name = RestrictedNameRegex.Replace(name, string.Empty); } if (configManager.GetCVar(CCVars.ICNameCase)) diff --git a/Resources/Prototypes/Nuclear14/Catalog/Fills/storage_fills.yml b/Resources/Prototypes/Nuclear14/Catalog/Fills/storage_fills.yml index b93076ad552..de318615847 100644 --- a/Resources/Prototypes/Nuclear14/Catalog/Fills/storage_fills.yml +++ b/Resources/Prototypes/Nuclear14/Catalog/Fills/storage_fills.yml @@ -510,12 +510,12 @@ - id: N14WeaponSniperVarmint prob: 0.3 orGroup: Weapon - - id: N14WeaponRevolvermagnum - prob: 0.2 - orGroup: Weapon - - id: N14Weapon45SMG - prob: 0.2 - orGroup: Weapon + # - id: N14WeaponRevolvermagnum + # prob: 0.2 + # orGroup: Weapon + # - id: N14Weapon45SMG + # prob: 0.2 + # orGroup: Weapon - id: LongMagazine5.56Rifle prob: 0.4 orGroup: Weapon @@ -822,9 +822,9 @@ - id: N14ClothingMaskDesertMask prob: 0.2 orGroup: Clothing - - id: N14ClothingHeadHatBaseHelmetMetal - prob: 0.1 - orGroup: Clothing + # - id: N14ClothingHeadHatBaseHelmetMetal + # prob: 0.1 + # orGroup: Clothing - id: N14ClothingHeadHatBaseHelmet prob: 0.1 orGroup: Clothing @@ -1096,9 +1096,9 @@ - id: N14WeaponPistolSpy prob: 0.1 orGroup: Weapon - - id: N14WeaponRevolvermagnum - prob: 0.2 - orGroup: Weapon + # - id: N14WeaponRevolvermagnum + # prob: 0.2 + # orGroup: Weapon - id: N14WeaponHunterRevolver prob: 0.1 orGroup: Weapon @@ -1256,9 +1256,9 @@ - id: N14ClothingHeadHatVaultRiot prob: 0.1 orGroup: Clothing - - id: N14ClothingHeadHatBaseHelmetMetal - prob: 0.1 - orGroup: Clothing + # - id: N14ClothingHeadHatBaseHelmetMetal + # prob: 0.1 + # orGroup: Clothing - id: N14ClothingHeadHatBaseHelmet prob: 0.1 orGroup: Clothing