Commit graph

3 commits

Author SHA1 Message Date
d2b14dbe94 Dialog: Provide hints for the sender name
The dialog form has a simple text input for the sender's name.
This can lead to typos or mistakes if the GM wants to send a message
using the same sender name as a previous message.

Add a new function that goes through all the players' histories and
compiles a list of all unique senders, which we can then use to build
a list of hints that will be used to show suggestions when the GM fills
the sender name in the form.

This is currently quite ineficcient as it re-does all the work for every
single dialog.
A better way would be to cache it or store it explicitly somewhere when
we send a message, but this would require a way for the GM to edit it.
2025-06-11 18:48:44 +01:00
16e1eab24b Form: Simplify player filtering
The game.users provides a .players member, listing only non-GM
users.

Use this instead of filtering the list manually.
2025-05-27 22:54:09 +01:00
c83122548a Initial commit - v0.1.0
This is the initial version of the module, for Foundry v12.

It allows GMs to write and send messages to players via socketlib,
storing an history of those messages, and displaying them on the player's
side, with some potential flair, and some controls in the settings.

This *does not work* with Foundry v13, as the toolbar registration process
has changed.
2025-05-12 21:26:21 +01:00