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.
This commit is contained in:
commit
c83122548a
11 changed files with 1143 additions and 0 deletions
58
scripts/settings.mjs
Normal file
58
scripts/settings.mjs
Normal file
|
@ -0,0 +1,58 @@
|
|||
import {module_id} from "./mills_messages.mjs";
|
||||
|
||||
export const module_settings = Object.freeze({
|
||||
MessageDialogTitle: "messageDialogTitle",
|
||||
MessageDialogSenderTitle: "messageDialogSenderTitle",
|
||||
HistoryJournalTitle: "historyJournalTitle",
|
||||
StoreHistory: "storeHistory",
|
||||
NotificationSound: "notificationSound",
|
||||
})
|
||||
|
||||
export function register_settings() {
|
||||
game.settings.register(module_id, module_settings.MessageDialogTitle, {
|
||||
name: "MM.Settings.MessageDialogTitle.Title",
|
||||
hint: "MM.Settings.MessageDialogTitle.Hint",
|
||||
type: String,
|
||||
config: true,
|
||||
scope: "world",
|
||||
default: game.i18n.localize("MM.Dialogs.MessageDialog.Title"),
|
||||
})
|
||||
|
||||
game.settings.register(module_id, module_settings.MessageDialogSenderTitle, {
|
||||
name: "MM.Settings.MessageDialogSenderTitle.Title",
|
||||
hint: "MM.Settings.MessageDialogSenderTitle.Hint",
|
||||
type: String,
|
||||
config: true,
|
||||
scope: "world",
|
||||
default: game.i18n.localize("MM.Dialogs.MessageDialog.Header"),
|
||||
})
|
||||
|
||||
game.settings.register(module_id, module_settings.StoreHistory, {
|
||||
name: "MM.Settings.StoreHistory.Title",
|
||||
hint: "MM.Settings.StoreHistory.Hint",
|
||||
type: Boolean,
|
||||
config: true,
|
||||
scope: "world",
|
||||
default: true,
|
||||
})
|
||||
|
||||
game.settings.register(module_id, module_settings.HistoryJournalTitle, {
|
||||
name: "MM.Settings.HistoryJournalTitle.Title",
|
||||
hint: "MM.Settings.HistoryJournalTitle.Hint",
|
||||
type: String,
|
||||
config: true,
|
||||
scope: "world",
|
||||
default: game.i18n.localize("MM.UI.HistoryJournalTitle"),
|
||||
})
|
||||
|
||||
game.settings.register(module_id, module_settings.NotificationSound, {
|
||||
name: "MM.Settings.NotificationSound.Title",
|
||||
hint: "MM.Settings.NotificationSound.Hint",
|
||||
type: String,
|
||||
config: true,
|
||||
scope: "world",
|
||||
requiresReload: true,
|
||||
filePicker: 'sound',
|
||||
default: "",
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue