diff --git a/css/mosh.css b/css/mosh.css
index 0a1731b..c92f1d0 100644
--- a/css/mosh.css
+++ b/css/mosh.css
@@ -534,11 +534,12 @@ p {
.mosh .roll-image {
-webkit-box-flex: 0;
flex: 0 24px;
- margin-top: -1px;
- margin-right: -9px;
- width: 48px;
+ margin-top: -3px;
+ margin-left: 11px;
+ margin-right: 0px;
+ width: 50px;
border-radius: 0 0 0 16px;
- /* margin-right: 5px; */
+ border: 1px solid #000;
}
.mosh .items-list .item img {
@@ -1593,9 +1594,9 @@ p {
.mosh .rollweaponh1 {
height: 32px;
- margin-top: 0;
- margin-left: -9px;
- margin-right: -9px;
+ margin-top: -15px;
+ margin-left: -8px;
+ margin-right: -11px;
font-size: 1.0rem;
font-weight: bold;
text-transform: uppercase;
@@ -1790,6 +1791,11 @@ p {
border-radius: 9px;
}
+/* MPD macro image */
+.macro-popup-dialog .macro_img {
+
+}
+
/* MPD macro desc */
.macro-popup-dialog .macro_desc {
font-family: "Roboto", sans-serif;
@@ -1811,6 +1817,10 @@ p {
margin-bottom: 8px;
}
+/* MPD macro prompt */
+.macro-popup-dialog .macro_prompt {
+
+}
/* MPD grid layouts */
.macro-popup-dialog .grid-1col {
@@ -1855,14 +1865,14 @@ p {
.macro-popup-dialog input[type="radio"] {
appearance: none;
-webkit-appearance: none;
- accent-color: initial;
+ accent-color: initial; /* ignore theme accent */
box-sizing: border-box;
width: 16px;
height: 16px;
- border: 2px solid #777;
+ border: 2px solid #777; /* medium grey ring */
border-radius: 50%;
- background: #fff;
- display: inline-flex;
+ background: #fff; /* white center when unchecked */
+ display: inline-flex; /* center the pseudo-dot */
align-items: center;
justify-content: center;
line-height: 0;
@@ -1880,7 +1890,7 @@ p {
width: 8px;
height: 8px;
border-radius: 50%;
- background: #111;
+ background: #111; /* dot color */
transform: scale(0);
transition: transform 120ms ease-in-out;
}
diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js
index b9f0009..f25a4e9 100644
--- a/module/actor/actor-sheet.js
+++ b/module/actor/actor-sheet.js
@@ -210,11 +210,8 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
let amount = item.system.treatment.value;
@@ -237,11 +234,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
item.system.equipped = !item.system.equipped;
this.actor.updateEmbeddedDocuments('Item', [item]);
@@ -262,11 +255,8 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
let amount = item.system.quantity;
if (event.button == 0) {
@@ -282,11 +272,8 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
html.on('mousedown', '.severity', ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
let amount = item.system.severity;
@@ -340,11 +327,8 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = event.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
this.actor.rollCheck(null, null, null, item.name, item.system.bonus, null);
});
@@ -353,11 +337,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
this.actor.rollCheck(null, 'low', 'combat', null, null, item);
});
@@ -366,11 +346,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
this.actor.rollCheck(null, null, 'damage', null, null, item);
});
@@ -387,11 +363,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
let amount = item.system.ammo;
if (event.button == 0) {
if (amount >= 0) {
@@ -410,11 +382,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
if (event.button == 0) {
if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
item.system.curShots = Number(item.system.curShots) + 1;
@@ -440,11 +408,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
let amount = item.system.armorPoints;
if (event.button == 0) {
item.system.armorPoints = Number(amount) + 1;
@@ -461,11 +425,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
let amount = item.system.damageReduction;
if (event.button == 0) {
item.system.damageReduction = Number(amount) + 1;
@@ -482,11 +442,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
let amount = item.system.oxygenCurrent;
if (event.button == 0) {
if (amount < item.system.oxygenMax) {
@@ -546,11 +502,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const type = header.dataset.type;
// Grab any data associated with this control.
var data;
- if (game.release.generation >= 12) {
- data = foundry.utils.duplicate(header.dataset);
- } else {
- data = duplicate(header.dataset);
- }
+ data = foundry.utils.duplicate(header.dataset);
// Initialize a default name.
const name = `New ${type.capitalize()}`;
@@ -581,11 +533,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const type = header.dataset.type;
// Grab any data associated with this control.
var data;
- if (game.release.generation >= 12) {
- data = foundry.utils.duplicate(header.dataset);
- } else {
- data = duplicate(header.dataset);
- }
+ data = foundry.utils.duplicate(header.dataset);
//const data = duplicate(header.dataset);
// Initialize a default name.
const name = `New Skill`;
@@ -677,11 +625,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
const actor = this.object;
var updateData;
- if (game.release.generation >= 12) {
- updateData = foundry.utils.expandObject(formData);
- } else {
- updateData = expandObject(formData);
- }
+ updateData = foundry.utils.expandObject(formData);
await actor.update(updateData, {
diff: false
diff --git a/module/actor/actor.js b/module/actor/actor.js
index b24d82e..cd1e73b 100644
--- a/module/actor/actor.js
+++ b/module/actor/actor.js
@@ -544,7 +544,7 @@ export class MothershipActor extends Actor {
let tableResultType = ``;
let tableResultEdited = ``;
let tableResultFooter = ``;
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
let rollTarget = null;
let valueAddress = [];
let specialRoll = null;
@@ -778,9 +778,9 @@ export class MothershipActor extends Actor {
//panic check #19 customiziation
if (tableName === 'Panic Check' && tableResultNumber === 19) {
if (this.system.class.value.toLowerCase() === 'android') {
- tableResultEdited = tableResult[0].text.replace(game.i18n.localize("Mosh.HEARTATTACKSHORTCIRCUITANDROIDS"), game.i18n.localize("Mosh.SHORTCIRCUIT"));
+ tableResultEdited = tableResult[0].description.replace(game.i18n.localize("Mosh.HEARTATTACKSHORTCIRCUITANDROIDS"), game.i18n.localize("Mosh.SHORTCIRCUIT"));
} else {
- tableResultEdited = tableResult[0].text.replace(game.i18n.localize("Mosh.HEARTATTACKSHORTCIRCUITANDROIDS"), game.i18n.localize("Mosh.HEARTATTACK"));
+ tableResultEdited = tableResult[0].description.replace(game.i18n.localize("Mosh.HEARTATTACKSHORTCIRCUITANDROIDS"), game.i18n.localize("Mosh.HEARTATTACK"));
}
}
//assign message description text
@@ -849,7 +849,7 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/rollTable.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//make message
let macroMsg = await rollResult.toMessage({
id: chatId,
@@ -890,10 +890,10 @@ export class MothershipActor extends Actor {
let buttonDesc = ``;
//create HTML for this window
//header
- let dialogDesc = await renderTemplate('systems/mosh/templates/dialogs/skill-check-stat-selection-dialog.html');
+ let dialogDesc = await foundry.applications.handlebars.renderTemplate('systems/mosh/templates/dialogs/skill-check-stat-selection-dialog.html');
//create button header if needed
if (!rollString) {
- buttonDesc = `
` + game.i18n.localize("Mosh.SelectYourRollType") + `:
`;
+ buttonDesc = `` + game.i18n.localize("Mosh.SelectYourRollType") + `
`;
} else {
buttonDesc = ``;
}
@@ -901,7 +901,7 @@ export class MothershipActor extends Actor {
const dialogData = {
window: {title: game.i18n.localize("Mosh.ChooseAStat")},
classes: ["macro-popup-dialog"],
- position: {width: 600,height: 500},
+ position: {width: 600},
content: dialogDesc + buttonDesc,
buttons: []
};
@@ -978,7 +978,7 @@ export class MothershipActor extends Actor {
let buttonDesc = ``;
//create HTML for this window
//header
- let skillHeader = await renderTemplate('systems/mosh/templates/dialogs/choose-skill-dialog-header.html');
+ let skillHeader = await foundry.applications.handlebars.renderTemplate('systems/mosh/templates/dialogs/choose-skill-dialog-header.html');
//skill template
let skillRow = `