Réglage de la difficulté par défaut
Release Creation / build (release) Successful in 1m13s

This commit is contained in:
2026-05-29 18:28:09 +02:00
parent ec0e522145
commit 5c2a364832
37 changed files with 191 additions and 83 deletions
+23
View File
@@ -43,6 +43,7 @@ const MOON_EFFECT_FLAG = "moonEffectApplied"
const FACTION_ASPECT_STATE_SETTING = "factionAspectState"
const PREGENS_IMPORTED_SETTING = "pregensImported"
const WELCOME_SCENE_IMPORTED_SETTING = "welcomeSceneImported"
const DEFAULT_ROLL_THRESHOLD_SETTING = "defaultRollThreshold"
/* ─── Init hook ──────────────────────────────────────────────────────────── */
@@ -65,6 +66,7 @@ Hooks.once("init", () => {
// Expose SYSTEM constants + utilities globales
game.celestopol = {
SYSTEM,
DEFAULT_ROLL_THRESHOLD_SETTING,
rollMoonStandalone: (actor = null) => CelestopolRoll.rollMoonStandalone(actor),
manageFactionAspects: (actor = null) => _manageFactionAspects(actor),
resetFactionAspects: () => _resetFactionAspects(),
@@ -357,6 +359,11 @@ function _registerHandlebarsHelpers() {
return false
})
// Helper : récupérer un setting système par son nom
Handlebars.registerHelper("getSetting", (settingName) => {
return game.settings.get(SYSTEM_ID, settingName)
})
Handlebars.registerHelper("let", function(value, options) {
return options.fn({ value })
})
@@ -626,6 +633,22 @@ function _registerSettings() {
type: Boolean,
default: false,
})
// Seuil de difficulté par défaut pour les jets normaux (hors combat)
game.settings.register(SYSTEM_ID, DEFAULT_ROLL_THRESHOLD_SETTING, {
name: "CELESTOPOL.Setting.defaultRollThreshold.name",
hint: "CELESTOPOL.Setting.defaultRollThreshold.hint",
scope: "world",
config: true,
type: Number,
default: 11,
range: {
min: 1,
max: 30,
step: 1,
},
})
// Suivi de l'import des anomalies (caché)
game.settings.register(SYSTEM_ID, "anomaliesImported", {
scope: "world",