diff --git a/dotdungeon.mjs b/dotdungeon.mjs index 0697ca7..3aa723d 100644 --- a/dotdungeon.mjs +++ b/dotdungeon.mjs @@ -19,6 +19,7 @@ import "./module/hooks/hotReload.mjs"; // Misc Imports import loadSettings from "./module/settings/index.mjs"; +import { DOTDUNGEON } from "./module/config.mjs"; Hooks.once(`init`, () => { @@ -31,6 +32,8 @@ Hooks.once(`init`, () => { CONFIG.Item.dataModels.aspect = AspectItemData; CONFIG.Actor.documentClass = ActorHandler; + CONFIG.DOTDUNGEON = DOTDUNGEON; + Actors.unregisterSheet("core", ActorSheet); Actors.registerSheet("dotdungeon", PlayerSheet, { makeDefault: true, diff --git a/module/config.mjs b/module/config.mjs new file mode 100644 index 0000000..1501331 --- /dev/null +++ b/module/config.mjs @@ -0,0 +1,9 @@ +export const DOTDUNGEON = {}; + +DOTDUNGEON.statDice = [ `d4`, `d6`, `d8`, `d10`, `d12`, `d20` ]; + +DOTDUNGEON.trainingLevels = [``, `locked`, `+2`, `+4`]; + +DOTDUNGEON.damageTypes = [ `slashing`, `piercing`, `smashing`, `gun`, `neon`, `shadow`, `solar` ]; + +DOTDUNGEON.ammoTypes = [`quivers`, `mags`, `cells`]; diff --git a/module/models/PlayerData.mjs b/module/models/PlayerData.mjs index a9db6f7..9018947 100644 --- a/module/models/PlayerData.mjs +++ b/module/models/PlayerData.mjs @@ -4,7 +4,7 @@ function diceChoiceField() { blank: true, trim: true, options() { - return [ `d4`, `d6`, `d8`, `d10`, `d12`, `d20` ]; + return CONFIG.DOTDUNGEON.statDice; }, }); }; @@ -14,7 +14,7 @@ function trainingLevelField() { initial: ``, blank: true, trim: true, - options: [ ``, `locked`, `+2`, `+4` ], + options: CONFIG.DOTDUNGEON.trainingLevels, }); }; @@ -22,7 +22,7 @@ function weaponDamageTypeField() { return new foundry.data.fields.StringField({ initial: ``, blank: true, - options: [ ``, `slashing`, `piercing`, `smashing`, `gun`, `neon`, `shadow`, `solar` ], + options: [ ``, ...CONFIG.DOTDUNGEON.damageTypes ], }); }; @@ -30,7 +30,7 @@ function ammoTypeField() { return new foundry.data.fields.StringField({ initial: ``, blank: true, - options: [ ``, `quivers`, `mags`, `cells` ], + options: [ ``, ...CONFIG.DOTDUNGEON.ammoTypes ], }); };