Playtime Reminders - Raising awareness of addiction by highlighting excessive playtime (#36483)

* grass touch protocol - Rebases to latest master to fix conflicts

* aight local tests are passing lets see if our golf works

* It is 5 am and our ass COMPLETELY overcomplicated this lmaooo

* Addresses feedback - Clarifies comments, swaps internal var names for grasstouchless and selfdestructive, makes the third tier a little less demanding, and fixes 1 hours

* Addresses review - conflict fix

* This too

* Axes playtime exclusion for ghosts

* Use switch expression

code style nit

* Refactor/cleanup

Use IGameTiming.RealTime to track time instead of DateTime. Use nullable instead of magic values.

Expose the current day value through a property that is always up to date, instead of making the API to read the CVar that updates at inconsistent times. This also makes it trivial to debug with VV.

Other minor cleanup like using string interp, code style fixes, comments, etc.

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This commit is contained in:
deathride58
2025-06-18 21:06:26 -04:00
committed by GitHub
parent ca72ca1464
commit 08d9c0aedd
7 changed files with 159 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ using Content.Client.Lobby;
using Content.Client.MainMenu;
using Content.Client.Parallax.Managers;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Playtime;
using Content.Client.Radiation.Overlays;
using Content.Client.Replay;
using Content.Client.Screenshot;
@@ -74,6 +75,7 @@ namespace Content.Client.Entry
[Dependency] private readonly DebugMonitorManager _debugMonitorManager = default!;
[Dependency] private readonly TitleWindowManager _titleWindowManager = default!;
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly ClientsidePlaytimeTrackingManager _clientsidePlaytimeManager = default!;
public override void Init()
{
@@ -136,6 +138,7 @@ namespace Content.Client.Entry
_extendedDisconnectInformation.Initialize();
_jobRequirements.Initialize();
_playbackMan.Initialize();
_clientsidePlaytimeManager.Initialize();
//AUTOSCALING default Setup!
_configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffX", 1080);