some factorisation
This commit is contained in:
@@ -20,32 +20,11 @@ export class WeaponSheetL5r5e extends ItemSheetL5r5e {
|
||||
const sheetData = super.getData();
|
||||
sheetData.data.dtypes = ["String", "Number", "Boolean"];
|
||||
|
||||
sheetData.data.isWeapon = true;
|
||||
sheetData.data.isEquipment = true;
|
||||
// Martial skills only
|
||||
sheetData.data.skills = Array.from(L5R5E.skills)
|
||||
.filter(([id, cat]) => cat === "martial")
|
||||
.map(([id, cat]) => id);
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to events from the sheet.
|
||||
* @param html HTML content of the sheet.
|
||||
*/
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update item with values from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
_updateObject(event, formData) {
|
||||
return this.object.update(formData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user