Begin working on a custom DOTDUNGEON config block
This commit is contained in:
parent
07bebdba4d
commit
c273111004
3 changed files with 16 additions and 4 deletions
|
|
@ -19,6 +19,7 @@ import "./module/hooks/hotReload.mjs";
|
||||||
|
|
||||||
// Misc Imports
|
// Misc Imports
|
||||||
import loadSettings from "./module/settings/index.mjs";
|
import loadSettings from "./module/settings/index.mjs";
|
||||||
|
import { DOTDUNGEON } from "./module/config.mjs";
|
||||||
|
|
||||||
|
|
||||||
Hooks.once(`init`, () => {
|
Hooks.once(`init`, () => {
|
||||||
|
|
@ -31,6 +32,8 @@ Hooks.once(`init`, () => {
|
||||||
CONFIG.Item.dataModels.aspect = AspectItemData;
|
CONFIG.Item.dataModels.aspect = AspectItemData;
|
||||||
CONFIG.Actor.documentClass = ActorHandler;
|
CONFIG.Actor.documentClass = ActorHandler;
|
||||||
|
|
||||||
|
CONFIG.DOTDUNGEON = DOTDUNGEON;
|
||||||
|
|
||||||
Actors.unregisterSheet("core", ActorSheet);
|
Actors.unregisterSheet("core", ActorSheet);
|
||||||
Actors.registerSheet("dotdungeon", PlayerSheet, {
|
Actors.registerSheet("dotdungeon", PlayerSheet, {
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
|
|
|
||||||
9
module/config.mjs
Normal file
9
module/config.mjs
Normal file
|
|
@ -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`];
|
||||||
|
|
@ -4,7 +4,7 @@ function diceChoiceField() {
|
||||||
blank: true,
|
blank: true,
|
||||||
trim: true,
|
trim: true,
|
||||||
options() {
|
options() {
|
||||||
return [ `d4`, `d6`, `d8`, `d10`, `d12`, `d20` ];
|
return CONFIG.DOTDUNGEON.statDice;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -14,7 +14,7 @@ function trainingLevelField() {
|
||||||
initial: ``,
|
initial: ``,
|
||||||
blank: true,
|
blank: true,
|
||||||
trim: true,
|
trim: true,
|
||||||
options: [ ``, `locked`, `+2`, `+4` ],
|
options: CONFIG.DOTDUNGEON.trainingLevels,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ function weaponDamageTypeField() {
|
||||||
return new foundry.data.fields.StringField({
|
return new foundry.data.fields.StringField({
|
||||||
initial: ``,
|
initial: ``,
|
||||||
blank: true,
|
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({
|
return new foundry.data.fields.StringField({
|
||||||
initial: ``,
|
initial: ``,
|
||||||
blank: true,
|
blank: true,
|
||||||
options: [ ``, `quivers`, `mags`, `cells` ],
|
options: [ ``, ...CONFIG.DOTDUNGEON.ammoTypes ],
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue