Merge remote-tracking branch 'azhar/i18n' into character-generator
This commit is contained in:
+16
-96
@@ -1728,97 +1728,16 @@ export class MothershipActor extends Actor {
|
||||
let buttonDesc = ``;
|
||||
//create HTML for this window
|
||||
//header
|
||||
let dialogDesc = `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center; //do I need this
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px; padding-left: 8px;">
|
||||
<div class="macro_desc"><h3>Select a Stat</h3>Choose the Stat that best suits the nature of this Skill Check. You will add your skill bonus to the Stat value for this roll <em>(giving you a higher number to roll under)</em>.</div>
|
||||
</div>
|
||||
<label for="str">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="str" name="stat" value="strength" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/strength.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>Strength:</strong> Holding airlocks closed, carrying fallen comrades, climbing, pushing, jumping.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="spd">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="spd" name="stat" value="speed">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/speed.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>Speed:</strong> Getting out of the cargo bay before the blast doors close, acting before someone <em>(or something)</em> else, running away.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="int">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="int" name="stat" value="intellect">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/intellect.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>Intellect:</strong> Recalling your training and experience under duress, thinking through difficult problems, inventing or fixing things.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="com">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="com" name="stat" value="combat">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/combat.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>Combat:</strong> Fighting for your life.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
`;
|
||||
let dialogDesc = await renderTemplate('systems/mosh/templates/dialogs/skill-check-stat-selection-dialog.html');
|
||||
//create button header if needed
|
||||
if (!rollString) {
|
||||
buttonDesc = `<h4>Select your roll type:</h4>`;
|
||||
buttonDesc = `<h4>` + game.i18n.localize("Mosh.SelectYourRollType") + `:</h4>`;
|
||||
} else {
|
||||
buttonDesc = ``;
|
||||
}
|
||||
//create final dialog data
|
||||
const dialogData = {
|
||||
title: `Choose a Stat`,
|
||||
title: game.i18n.localize("Mosh.ChooseAStat"),
|
||||
content: dialogDesc + buttonDesc,
|
||||
buttons: {}
|
||||
};
|
||||
@@ -1827,7 +1746,7 @@ export class MothershipActor extends Actor {
|
||||
//we need to generate a roll string
|
||||
//Advantage
|
||||
dialogData.buttons.button1 = {
|
||||
label: `Advantage`,
|
||||
label: game.i18n.localize("Mosh.Advantage"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100 [+]`;
|
||||
aimFor = `low`;
|
||||
@@ -1839,7 +1758,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Normal
|
||||
dialogData.buttons.button2 = {
|
||||
label: `Normal`,
|
||||
label: game.i18n.localize("Mosh.Normal"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100`;
|
||||
aimFor = `low`;
|
||||
@@ -1851,7 +1770,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Disadvantage
|
||||
dialogData.buttons.button3 = {
|
||||
label: `Disadvantage`,
|
||||
label: game.i18n.localize("Mosh.Disadvantage"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100 [-]`;
|
||||
aimFor = `low`;
|
||||
@@ -1864,7 +1783,7 @@ export class MothershipActor extends Actor {
|
||||
//add a next button if we dont need a rollString
|
||||
} else {
|
||||
dialogData.buttons.button1 = {
|
||||
label: `Next`,
|
||||
label: game.i18n.localize("Mosh.Next"),
|
||||
callback: (html) => {
|
||||
aimFor = `low`;
|
||||
attribute = html.find("input[name='stat']:checked").attr("value");
|
||||
@@ -1995,7 +1914,7 @@ export class MothershipActor extends Actor {
|
||||
}
|
||||
//create button header if needed
|
||||
if (!rollString) {
|
||||
buttonDesc = `<h4>Select your roll type:</h4>`;
|
||||
buttonDesc = `<h4>` + game.i18n.localize("Mosh.SelectYourRollType") + `:</h4>`;
|
||||
} else {
|
||||
buttonDesc = ``;
|
||||
}
|
||||
@@ -2010,7 +1929,7 @@ export class MothershipActor extends Actor {
|
||||
//we need to generate a roll string
|
||||
//Advantage
|
||||
dialogData.buttons.button1 = {
|
||||
label: `Advantage`,
|
||||
label: game.i18n.localize("Mosh.Advantage"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100 [+]`;
|
||||
skill = html.find("input[name='skill']:checked").attr("id");
|
||||
@@ -2022,7 +1941,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Normal
|
||||
dialogData.buttons.button2 = {
|
||||
label: `Normal`,
|
||||
label: game.i18n.localize("Mosh.Normal"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100`;
|
||||
skill = html.find("input[name='skill']:checked").attr("id");
|
||||
@@ -2034,7 +1953,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Disadvantage
|
||||
dialogData.buttons.button3 = {
|
||||
label: `Disadvantage`,
|
||||
label: game.i18n.localize("Mosh.Disadvantage"),
|
||||
callback: (html) => {
|
||||
rollString = `1d100 [-]`;
|
||||
skill = html.find("input[name='skill']:checked").attr("id");
|
||||
@@ -2047,7 +1966,7 @@ export class MothershipActor extends Actor {
|
||||
//add a next button if we dont need a rollString
|
||||
} else {
|
||||
dialogData.buttons.button1 = {
|
||||
label: `Next`,
|
||||
label: game.i18n.localize("Mosh.Next"),
|
||||
callback: (html) => {
|
||||
skill = html.find("input[name='skill']:checked").attr("id");
|
||||
skillValue = html.find("input[name='skill']:checked").attr("value");
|
||||
@@ -2074,13 +1993,13 @@ export class MothershipActor extends Actor {
|
||||
//create final dialog data
|
||||
const dialogData = {
|
||||
title: dlgTitle,
|
||||
content: `<h4>Select your roll type:</h4>`,
|
||||
buttonDesc: `<h4>` + game.i18n.localize("Mosh.SelectYourRollType") + `:</h4>`,
|
||||
buttons: {}
|
||||
};
|
||||
//add buttons
|
||||
//Advantage
|
||||
dialogData.buttons.button1 = {
|
||||
label: `Advantage`,
|
||||
label: game.i18n.localize("Mosh.Advantage"),
|
||||
callback: (html) => {
|
||||
rollString = dieAdv;
|
||||
resolve([rollString]);
|
||||
@@ -2090,7 +2009,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Normal
|
||||
dialogData.buttons.button2 = {
|
||||
label: `Normal`,
|
||||
label: game.i18n.localize("Mosh.Normal"),
|
||||
callback: (html) => {
|
||||
rollString = die;
|
||||
resolve([rollString]);
|
||||
@@ -2100,6 +2019,7 @@ export class MothershipActor extends Actor {
|
||||
};
|
||||
//Disadvantage
|
||||
dialogData.buttons.button3 = {
|
||||
label: game.i18n.localize("Mosh.Normal"),
|
||||
label: `Disadvantage`,
|
||||
callback: (html) => {
|
||||
rollString = dieDis;
|
||||
|
||||
Reference in New Issue
Block a user