feat: change game settings scope from world to client for critical hit animations and effects
This commit is contained in:
parent
24050067b2
commit
442442621d
1 changed files with 24 additions and 3 deletions
|
|
@ -1,9 +1,30 @@
|
|||
Hooks.once('init', () => {
|
||||
// Register Settings
|
||||
// Register Configuration - Scope Mode
|
||||
game.settings.register('dh-immersive-crits', 'configurationMode', {
|
||||
name: 'Configuration Mode',
|
||||
hint: 'Choose whether settings are global (GM controls everyone) or client-specific (users choose their own). Requires a reload to take effect.',
|
||||
scope: 'world',
|
||||
config: true,
|
||||
type: String,
|
||||
choices: {
|
||||
"world": "Global (GM Controlled)",
|
||||
"client": "Per-User (Player Controlled)"
|
||||
},
|
||||
default: 'world',
|
||||
onChange: () => {
|
||||
// We can't easily force a reload, but the hint says it's required.
|
||||
// Ideally we'd pop a dialog but a hint is sufficient for now.
|
||||
}
|
||||
});
|
||||
|
||||
const configMode = game.settings.get('dh-immersive-crits', 'configurationMode');
|
||||
const targetScope = configMode;
|
||||
|
||||
game.settings.register('dh-immersive-crits', 'critAnimation', {
|
||||
name: 'Critical Hit Animation',
|
||||
hint: 'Select the visual effect for critical hit chat cards.',
|
||||
scope: 'world',
|
||||
scope: targetScope,
|
||||
config: true,
|
||||
type: String,
|
||||
choices: {
|
||||
|
|
@ -21,7 +42,7 @@ Hooks.once('init', () => {
|
|||
game.settings.register('dh-immersive-crits', 'pulseColor', {
|
||||
name: 'Pulse Color',
|
||||
hint: 'Select the color for the Pulse animation.',
|
||||
scope: 'world',
|
||||
scope: targetScope,
|
||||
config: true,
|
||||
type: String,
|
||||
default: '#ff0000'
|
||||
|
|
@ -30,7 +51,7 @@ Hooks.once('init', () => {
|
|||
game.settings.register('dh-immersive-crits', 'dsnCritEffect', {
|
||||
name: 'DiceSoNice Critical Effect',
|
||||
hint: 'Select the DiceSoNice special effect to play on critical hits.',
|
||||
scope: 'world',
|
||||
scope: targetScope,
|
||||
config: true,
|
||||
type: String,
|
||||
choices: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue