Files
l5rx-chiaroscuro/system/scripts/settings.js
Vlyan 1662f59009 FVTT v11 Compatibility
- Added CONFIG.l5r5e.namespace
- Fix new labels for Types
- Fix Effects
- Fix TokenData : actorData->delta
2023-06-11 09:27:49 +02:00

129 lines
4.4 KiB
JavaScript

/**
* Custom system settings register
*/
export const RegisterSettings = function () {
/* ------------------------------------ */
/* User settings */
/* ------------------------------------ */
game.settings.register(CONFIG.l5r5e.namespace, "rnk-deleteOldMessage", {
name: "SETTINGS.RollNKeep.DeleteOldMessage",
hint: "SETTINGS.RollNKeep.DeleteOldMessageHint",
scope: "world",
config: true,
default: true,
type: Boolean,
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange", {
name: "SETTINGS.Initiative.SetTn1OnTypeChange",
hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint",
scope: "world",
config: true,
type: Boolean,
default: true,
});
game.settings.register(CONFIG.l5r5e.namespace, "token-reverseFatigueBar", {
name: "SETTINGS.ReverseFatigueBar",
scope: "world",
config: true,
type: Boolean,
default: false,
});
game.settings.register(CONFIG.l5r5e.namespace, "techniques-customs", {
name: "SETTINGS.CustomTechniques.Title",
hint: "SETTINGS.CustomTechniques.Hint",
scope: "world",
config: true,
type: Boolean,
default: false,
});
/* ------------------------------------ */
/* Update */
/* ------------------------------------ */
game.settings.register(CONFIG.l5r5e.namespace, "systemMigrationVersion", {
name: "System Migration Version",
scope: "world",
config: false,
type: String,
default: 0,
});
/* ------------------------------------ */
/* Initiative Roll Dialog (GM only) */
/* ------------------------------------ */
game.settings.register(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden", {
name: "Initiative difficulty is hidden",
scope: "world",
config: false,
type: Boolean,
default: false,
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-difficulty-value", {
name: "Initiative difficulty value",
scope: "world",
config: false,
type: Number,
default: 2,
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-encounter", {
name: "Initiative encounter type",
scope: "world",
config: false,
type: String,
default: "skirmish",
onChange: () => {
if (game.settings.get(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange")) {
game.settings.set(CONFIG.l5r5e.namespace, "initiative-difficulty-value", 1);
}
ui.combat.render(true);
},
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-character", {
name: "Initiative PC prepared or not",
scope: "world",
config: false,
type: String,
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);
},
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-adversary", {
name: "Initiative NPC adversary are prepared or not",
scope: "world",
config: false,
type: String,
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);
},
});
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-minion", {
name: "Initiative NPC minion are prepared or not",
scope: "world",
config: false,
type: String,
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);
},
});
/* ------------------------------------ */
/* GM Monitor windows (GM only) */
/* ------------------------------------ */
game.settings.register(CONFIG.l5r5e.namespace, "gm-monitor-actors", {
name: "Gm Monitor",
scope: "world",
config: false,
type: Array,
default: [],
onChange: () => game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor"),
});
};