6 Commits

Author SHA1 Message Date
ilmenwe
432042e945 Logger Sawmill Cleanup (#2413)
# Description
Cleaned up Logger obsolete compiler warnings in non robust code.
Should probably be changed to a ISawmill reference in classes to avoid
repeated lookups in heavy logging logic.
---

# Changelog

🆑

- tweak: Logger to Logger.GetSawmill("name");

---------

Co-authored-by: ilmenwe <no@mail.com>

(cherry picked from commit 2e8ffd971716d38dc6d5a520bebdf88b743045a3)
2025-05-10 01:00:05 +03:00
Pieter-Jan Briers
837272c745 Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.

So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.

Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.

Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.

Fixes #19897

(cherry picked from commit 2e6eaa45c57c7f5ba561d1fb1ef6712d2432a8fa)
2024-02-21 04:03:44 +01:00
DrSmugleaf
d7344bde95 Fix editing a watchlist note temporarily making it appear as a low severity note (#19100)
* Fix editing a watchlist temporarily making it appear as a low severity note

* Change condition to check that the note type is anything other than note

* Revert "Change condition to check that the note type is anything other than note"

This reverts commit 5c12d89fe8b3547dc11b19bb04e980fe4e7bf206.

* Update Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>

* Check that the note type doesn't have a special icon instead

---------

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
2023-08-14 15:05:47 -06:00
Riggle
579913b617 Better notes and bans (#14228)
Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
2023-07-21 13:38:52 +02:00
DrSmugleaf
da29a01846 Add ban list window (#12574) 2022-11-14 20:06:55 +01:00
DrSmugleaf
5227d1a023 Admin notes (#7259)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-04-16 20:57:50 +02:00