Initial dice roller

This commit is contained in:
Anthony Murphy
2024-03-28 21:40:20 +11:00
parent 03fffa2f19
commit 115fcc4f18
26 changed files with 1077 additions and 44 deletions

View File

@@ -202,7 +202,7 @@ export default class RMSSPlayerSheet extends ActorSheet {
async renderCharacterSettings(data) {
console.log(data);
const configSheet = await renderTemplate("systems/rmss/templates/sheets/actors/dialogs/actor-settings.html", data);
const configSheet = await renderTemplate("systems/rmss/templates/sheets/actors/dialogs/app_skill_category_importer.html", data);
return (configSheet);
}
@@ -215,6 +215,11 @@ export default class RMSSPlayerSheet extends ActorSheet {
item.sheet.render(true);
});
html.find(".item-roll").click(ev => {
const item = this.actor.items.get(ev.currentTarget.getAttribute("data-item-id"));
new game.rmss.applications.RMSSToolsDiceRoller(item.name, item.system.total_bonus).render(true);
});
// -------------------------------------------------------------
// Everything below here is only needed if the sheet is editable
if (!this.isEditable) return;
@@ -229,15 +234,14 @@ export default class RMSSPlayerSheet extends ActorSheet {
item.delete();
});
// Show Sheet Settings
// Show Skill Category Importer
html.find(".import-skillcats").click(async ev => {
let selectOptions = {};
for (const pack of game.packs) {
selectOptions[pack.metadata.id] = pack.metadata.label;
}
new game.rmss.applications.RMSSActorSheetConfig(selectOptions, this.actor).render(true);
new game.rmss.applications.RMSSToolsSCImporter(selectOptions, this.actor).render(true);
});
// Check/Uncheck Favorite Skill