forked from GitHub-Mirrors/foundry-sw5e

System main update to be inline with dnd5e 1.1.1 Added active effects to as many sheets as I thought applicable. Please check loot, I made an attempt but it may be broken All .less .css and actor .html updates were made to the old actors. New actors may be broken with this update removed templates\actors\oldActor\parts\actor-effects.html for newer templates\actors\parts\active-effects.html removed module\apps\cast-dialog, templates\apps\cast-cast.html, and templates\items\cast.html. I do not think they are used, I think they were deprecated when powers were treated as items, if not we can add them back in. **NOTE** REQUIRES Foundry 0.7.6
32 lines
865 B
JavaScript
32 lines
865 B
JavaScript
/**
|
|
* A simple form to set actor movement speeds
|
|
* @implements {BaseEntitySheet}
|
|
*/
|
|
export default class MovementConfig extends BaseEntitySheet {
|
|
|
|
/** @override */
|
|
static get defaultOptions() {
|
|
return mergeObject(super.defaultOptions, {
|
|
title: "SW5E.MovementConfig",
|
|
classes: ["sw5e"],
|
|
template: "systems/sw5e/templates/apps/movement-config.html",
|
|
width: 240,
|
|
height: "auto"
|
|
});
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
/** @override */
|
|
getData(options) {
|
|
const data = {
|
|
movement: duplicate(this.entity._data.data.attributes.movement),
|
|
units: CONFIG.SW5E.movementUnits
|
|
}
|
|
for ( let [k, v] of Object.entries(data.movement) ) {
|
|
if ( ["units", "hover"].includes(k) ) continue;
|
|
data.movement[k] = Number.isNumeric(v) ? v.toNearest(0.1) : 0;
|
|
}
|
|
return data;
|
|
}
|
|
}
|