From 4056902642c0fc6bb0e9c5f559b6e01e86c09229 Mon Sep 17 00:00:00 2001 From: SpicyDarkFox <128318785+SpicyDarkFox@users.noreply.github.com> Date: Mon, 23 Sep 2024 22:37:22 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BB=D0=BE=D0=B1=D0=B1=D0=B8=20=D0=A2?= =?UTF-8?q?=D0=A2=D0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/Corvax/TTS/TTSSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/Corvax/TTS/TTSSystem.cs b/Content.Client/Corvax/TTS/TTSSystem.cs index 609fc8fde2..762ff09c8a 100644 --- a/Content.Client/Corvax/TTS/TTSSystem.cs +++ b/Content.Client/Corvax/TTS/TTSSystem.cs @@ -112,7 +112,7 @@ private void OnPlayTTS(PlayTTSEvent ev) } else { - //_audio.PlayGlobal(soundPath, Filter.Local(), false); // поскольку источника нет/не видно, то пусть молчит + _audio.PlayGlobal(soundPath, Filter.Local(), false); } _contentRoot.RemoveFile(filePath); From a80ac1deec989b81677869bc7d5d8968cb8910f0 Mon Sep 17 00:00:00 2001 From: SpicyDarkFox Date: Mon, 23 Sep 2024 23:26:48 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=91=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/Database/ServerDbBase.cs | 34 ++++++++++++++----------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index 69c6e277ff..22427cf67b 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -34,7 +34,7 @@ public ServerDbBase(ISawmill opsLog) public async Task GetPlayerPreferencesAsync(NetUserId userId) { await using var db = await GetDb(); - + Logger.Warning($"Get preferences for profile: {userId}"); //тест БД var prefs = await db.DbContext .Preference .Include(p => p.Profiles).ThenInclude(h => h.Jobs) @@ -86,6 +86,8 @@ public async Task SaveCharacterSlotAsync(NetUserId userId, ICharacterProfile? pr throw new NotImplementedException(); } + Logger.Warning($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД + var oldProfile = db.DbContext.Profile .Include(p => p.Preference) .Where(p => p.Preference.UserId == userId.UserId) @@ -145,7 +147,7 @@ public async Task InitPrefsAsync(NetUserId userId, ICharacter await db.DbContext.SaveChangesAsync(); - return new PlayerPreferences(new[] {new KeyValuePair(0, defaultProfile)}, 0, Color.FromHex(prefs.AdminOOCColor)); + return new PlayerPreferences(new[] { new KeyValuePair(0, defaultProfile) }, 0, Color.FromHex(prefs.AdminOOCColor)); } public async Task DeleteSlotAndSetSelectedIndex(NetUserId userId, int deleteSlot, int newSlot) @@ -184,6 +186,7 @@ private static HumanoidCharacterProfile ConvertProfiles(Profile profile) var traits = profile.Traits.Select(t => t.TraitName); var loadouts = profile.Loadouts.Select(t => t.LoadoutName); #if LPP_Sponsors + Logger.Warning($"Selecting Donates for profile: {profile.Id}/{profile.CharacterName}"); //тест БД var donates = profile.Donate.Select(t => t.DonateName); // Lost Paradise Donate Preferences #endif @@ -298,22 +301,23 @@ private static Profile ConvertProfiles(HumanoidCharacterProfile humanoid, int sl profile.Jobs.AddRange( humanoid.JobPriorities .Where(j => j.Value != JobPriority.Never) - .Select(j => new Job {JobName = j.Key, Priority = (DbJobPriority) j.Value}) + .Select(j => new Job { JobName = j.Key, Priority = (DbJobPriority) j.Value }) ); profile.Antags.Clear(); profile.Antags.AddRange( humanoid.AntagPreferences - .Select(a => new Antag {AntagName = a}) + .Select(a => new Antag { AntagName = a }) ); profile.Traits.Clear(); profile.Traits.AddRange( humanoid.TraitPreferences - .Select(t => new Trait {TraitName = t}) + .Select(t => new Trait { TraitName = t }) ); #if LPP_Sponsors + Logger.Warning($"Converting profile: {profile.Id}/{profile.CharacterName}"); //тест БД profile.Donate.Clear(); // Lost Paradise Donate Preferences profile.Donate.AddRange( humanoid.DonatePreferences @@ -324,7 +328,7 @@ private static Profile ConvertProfiles(HumanoidCharacterProfile humanoid, int sl profile.Loadouts.Clear(); profile.Loadouts.AddRange( humanoid.LoadoutPreferences - .Select(t => new Loadout {LoadoutName = t}) + .Select(t => new Loadout { LoadoutName = t }) ); return profile; @@ -1261,7 +1265,7 @@ ban.Unban is null ban.LastEditedAt, ban.ExpirationTime, ban.Hidden, - new [] { ban.RoleId.Replace(BanManager.JobPrefix, null) }, + new[] { ban.RoleId.Replace(BanManager.JobPrefix, null) }, MakePlayerRecord(unbanningAdmin), ban.Unban?.UnbanTime); } @@ -1425,10 +1429,10 @@ public async Task> GetActiveWatchlists(Guid player) protected async Task> GetActiveWatchlistsImpl(DbGuard db, Guid player) { var entities = await (from watchlist in db.DbContext.AdminWatchlists - where watchlist.PlayerUserId == player && - !watchlist.Deleted && - (watchlist.ExpirationTime == null || DateTime.UtcNow < watchlist.ExpirationTime) - select watchlist) + where watchlist.PlayerUserId == player && + !watchlist.Deleted && + (watchlist.ExpirationTime == null || DateTime.UtcNow < watchlist.ExpirationTime) + select watchlist) .Include(note => note.Round) .ThenInclude(r => r!.Server) .Include(note => note.CreatedBy) @@ -1453,9 +1457,9 @@ public async Task> GetMessages(Guid player) protected async Task> GetMessagesImpl(DbGuard db, Guid player) { var entities = await (from message in db.DbContext.AdminMessages - where message.PlayerUserId == player && !message.Deleted && - (message.ExpirationTime == null || DateTime.UtcNow < message.ExpirationTime) - select message).Include(note => note.Round) + where message.PlayerUserId == player && !message.Deleted && + (message.ExpirationTime == null || DateTime.UtcNow < message.ExpirationTime) + select message).Include(note => note.Round) .ThenInclude(r => r!.Server) .Include(note => note.CreatedBy) .Include(note => note.LastEditedBy) @@ -1534,7 +1538,7 @@ protected async Task> GetGroupedServerRoleBansAsNo // Client side query, as EF can't do groups yet var bansEnumerable = bansQuery - .GroupBy(ban => new { ban.BanTime, CreatedBy = (Player?)ban.CreatedBy, ban.Reason, Unbanned = ban.Unban == null }) + .GroupBy(ban => new { ban.BanTime, CreatedBy = (Player?) ban.CreatedBy, ban.Reason, Unbanned = ban.Unban == null }) .Select(banGroup => banGroup) .ToArray(); From c590b375c05fb64631304d9b372b5dd4cfa01852 Mon Sep 17 00:00:00 2001 From: SpicyDarkFox Date: Mon, 23 Sep 2024 23:50:22 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=91?= =?UTF-8?q?=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/Database/ServerDbBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index 22427cf67b..51d5f0e711 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -34,7 +34,7 @@ public ServerDbBase(ISawmill opsLog) public async Task GetPlayerPreferencesAsync(NetUserId userId) { await using var db = await GetDb(); - Logger.Warning($"Get preferences for profile: {userId}"); //тест БД + _opsLog.Warning($"Get preferences for profile: {userId}"); //тест БД var prefs = await db.DbContext .Preference .Include(p => p.Profiles).ThenInclude(h => h.Jobs) @@ -86,7 +86,7 @@ public async Task SaveCharacterSlotAsync(NetUserId userId, ICharacterProfile? pr throw new NotImplementedException(); } - Logger.Warning($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД + _opsLog.Warning($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД var oldProfile = db.DbContext.Profile .Include(p => p.Preference) From 07fc85f347ef8505d4900abe1172ece52d03cab3 Mon Sep 17 00:00:00 2001 From: SpicyDarkFox Date: Tue, 24 Sep 2024 00:03:55 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BC=D0=B5=D1=82=D0=BD=D1=8B=D0=B5=20=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/Database/ServerDbBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index 51d5f0e711..e87069825c 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -34,7 +34,7 @@ public ServerDbBase(ISawmill opsLog) public async Task GetPlayerPreferencesAsync(NetUserId userId) { await using var db = await GetDb(); - _opsLog.Warning($"Get preferences for profile: {userId}"); //тест БД + _opsLog.Error($"Get preferences for profile: {userId}"); //тест БД var prefs = await db.DbContext .Preference .Include(p => p.Profiles).ThenInclude(h => h.Jobs) @@ -86,7 +86,7 @@ public async Task SaveCharacterSlotAsync(NetUserId userId, ICharacterProfile? pr throw new NotImplementedException(); } - _opsLog.Warning($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД + _opsLog.Error($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД var oldProfile = db.DbContext.Profile .Include(p => p.Preference) @@ -186,7 +186,7 @@ private static HumanoidCharacterProfile ConvertProfiles(Profile profile) var traits = profile.Traits.Select(t => t.TraitName); var loadouts = profile.Loadouts.Select(t => t.LoadoutName); #if LPP_Sponsors - Logger.Warning($"Selecting Donates for profile: {profile.Id}/{profile.CharacterName}"); //тест БД + Logger.Error($"Selecting Donates for profile: {profile.Id}/{profile.CharacterName}"); //тест БД var donates = profile.Donate.Select(t => t.DonateName); // Lost Paradise Donate Preferences #endif @@ -317,7 +317,7 @@ private static Profile ConvertProfiles(HumanoidCharacterProfile humanoid, int sl ); #if LPP_Sponsors - Logger.Warning($"Converting profile: {profile.Id}/{profile.CharacterName}"); //тест БД + Logger.Error($"Converting profile: {profile.Id}/{profile.CharacterName}"); //тест БД profile.Donate.Clear(); // Lost Paradise Donate Preferences profile.Donate.AddRange( humanoid.DonatePreferences From 127fc24923bf1ed40eeeaaab5bb2571cf6d0a4ec Mon Sep 17 00:00:00 2001 From: SpicyDarkFox <128318785+SpicyDarkFox@users.noreply.github.com> Date: Tue, 24 Sep 2024 00:12:43 +0300 Subject: [PATCH 5/5] Update ServerDbBase.cs --- Content.Server/Database/ServerDbBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index e87069825c..51d5f0e711 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -34,7 +34,7 @@ public ServerDbBase(ISawmill opsLog) public async Task GetPlayerPreferencesAsync(NetUserId userId) { await using var db = await GetDb(); - _opsLog.Error($"Get preferences for profile: {userId}"); //тест БД + _opsLog.Warning($"Get preferences for profile: {userId}"); //тест БД var prefs = await db.DbContext .Preference .Include(p => p.Profiles).ThenInclude(h => h.Jobs) @@ -86,7 +86,7 @@ public async Task SaveCharacterSlotAsync(NetUserId userId, ICharacterProfile? pr throw new NotImplementedException(); } - _opsLog.Error($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД + _opsLog.Warning($"Saving Character Slot: {userId}/{profile.Name}"); //тест БД var oldProfile = db.DbContext.Profile .Include(p => p.Preference) @@ -186,7 +186,7 @@ private static HumanoidCharacterProfile ConvertProfiles(Profile profile) var traits = profile.Traits.Select(t => t.TraitName); var loadouts = profile.Loadouts.Select(t => t.LoadoutName); #if LPP_Sponsors - Logger.Error($"Selecting Donates for profile: {profile.Id}/{profile.CharacterName}"); //тест БД + Logger.Warning($"Selecting Donates for profile: {profile.Id}/{profile.CharacterName}"); //тест БД var donates = profile.Donate.Select(t => t.DonateName); // Lost Paradise Donate Preferences #endif @@ -317,7 +317,7 @@ private static Profile ConvertProfiles(HumanoidCharacterProfile humanoid, int sl ); #if LPP_Sponsors - Logger.Error($"Converting profile: {profile.Id}/{profile.CharacterName}"); //тест БД + Logger.Warning($"Converting profile: {profile.Id}/{profile.CharacterName}"); //тест БД profile.Donate.Clear(); // Lost Paradise Donate Preferences profile.Donate.AddRange( humanoid.DonatePreferences