Einstein-Engines
Einstein-Engines copied to clipboard
Mirror: Obsolete `Logger` cleanup for `EntitySystem`s part 2
Mirror of PR #26159: Obsolete Logger
cleanup for EntitySystem
s part 2 from
space-wizards/space-station-14
7d275a4b5e4188db424cc417c609dced3f9aca89
PR opened by LordCarve at 2024-03-15 20:15:41 UTC
PR changed 14 files with 36 additions and 25 deletions.
The PR had the following labels:
- Status: Needs Review
Original Body
About the PR
Part 2 of 2, continuation of #25941 Gets rid of the remaining obsolete
Logger
method calls from allEntitySystem
s and uses the expectedLog
to get at the proper sawmill.In particular:
- Make the
ExamineSystemShared
'sInRangeUnObstructed
non-static
(so finally able to use instance-basedLog
rather thanLogger
) and inject dependency to all systems that were using it asstatic
.- Adjust 4 more
EntitySystem
s to useLog
rather thanLogger
that were missed in the previous PR.Tested that the game runs and the affected systems direct logs to the correct sawmill.
Why / Balance
Using Logger directly for logging is marked obsolete. Brings some order to logs (i.e. all
EntitySystem
logs start with a precedingsystem.
).Technical details
I'm pretty sure
ExamineSystemShared
'sInRangeUnObstructed
not beingstatic
is the intended way since it beingstatic
dodges the IoC entirely. It even has dirty hacks such as getting the occluder system inside to make it happen. I didn't fix any of that as it's beyond the scope of this PR, but it's another thing that needs improving.These are the changes to the log sawmills:
ExamineSystemShared.cs
: BEFORE:root
-> NEW:system.examine
AtmosphereSystem.Monstermos.cs
: BEFORE:root
-> NEW:system.atmosphere
TypingIndicatorSystem.cs
: BEFORE:root
-> NEW:system.typing_indicator
PiratesRuleSystem.cs
BEFORE:pirates
-> NEW:system.pirates_rule
TabletopSystem.Session.cs
BEFORE:root
-> NEW:system.tabletop
Media
- [X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
Breaking changes
Some logs now fall under a different sawmill (more precise). Any software that analyzes logs and makes assumptions on which sawmill do these logs fall to will need to be adjusted.