* Sends a toast notification when initializations complete. (#72465)
Initialization is significantly slowed down by the presence of clients,
though when testing features, you need to join the server. I've been
told that some devs (particularly Mothblocks) are alt-tabbed out of
Dream Daemon while doing dev work, meaning that they are liable to miss
initializations completing, causing an effective slowdown in the dev
cycle. Mothblocks said it would be nice if there was a way to produce a
desktop notification when initialization completes.
I originally intended to add a function to rust_g that would produce a
Windows toast notification with a button allowing you to immediately
launch Dream Seeker. However, I couldn't find a reliable way to detect
if the OS version was Windows 7 or earlier, so running this function on
such an OS would cause a rust panic (which I was told is only a problem
because MSO probably still uses Windows 7).
Fortunately, PowerShell scripts can access the necessary .NET APIs to
produce toast notifications on Windows 10, while also failing more
gracefully than crashing the host process. So I recreated the
functionality I intended in PowerShell.
Toast notifications will only be sent on Windows, if the
TOAST_NOTIFICATION_ON_INIT config flag is enabled, AND there are no
clients on the server.
**Note for downstreams:** If you want the toast notification to have
your downstream's icon, copy it, scale the copy down to 16x16, and
either rename it "tg_16.png" or change that path in the call to
`world.shelleo` to the name of the new file.
Video Demo:
https://user-images.githubusercontent.com/12720844/210492033-963923d7-a1de-4326-9c9f-4f0c0b71d1a5.mp4
This isn't really a line item in the Dev Cycles Initiative, but even if
Mothblocks was exaggerating the benefits, it would still be a
significant speedup in the dev cycles.
No player-facing changes.
* Sends a toast notification when initializations complete.
Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
* Butts
* testicle fix + hidden is back
* updated booba
* prob bad idea actually thinking about icon states
* fuck
* this should be everything now
* SandPoot's suggestion
Co-authored-by: SandPoot <43283559+SandPoot@users.noreply.github.com>
* tguify that last option
* Revert "tguify that last option"
This reverts commit f9d7a075e9.
* Revert "Merge branch 'master' into cursingcitadel"
This reverts commit 2998b1908a, reversing
changes made to 6fc65a28fa.
* Revert "Revert "Merge branch 'master' into cursingcitadel""
This reverts commit c4a2ad1a63.
Co-authored-by: SandPoot <43283559+SandPoot@users.noreply.github.com>
Co-authored-by: Putnam3145 <putnam3145@gmail.com>