Shadowrun 5th Edition 1.41, Warhammer 40k Wrath & Glory 1.1 (#4683)

* SR 1.41 - fixed modifier,edge,wound buttons

* CSS update for French & Spanish
This commit is contained in:
Cassie Levett
2019-02-11 17:42:19 -06:00
committed by GitHub
parent 38c5cb38d5
commit 7c7496f0b3
5 changed files with 156 additions and 18 deletions
+29 -7
View File
@@ -3049,26 +3049,48 @@
});
const versioning = (version) => {
console.log(`Shadowrun 5th Edition versioning, ${version}`);
if (version === "1.36") {
setAttrs({version: "1.4"});
console.log(`%c Shadowrun 5th Edition versioning, ${version}`, "color: blue; font-weight:bold");
if (version === "1.41") {
console.log(`%c Shadowrun 5th Edition is update to date`, "color: red; font-weight:bold");
} else if (version === "1.4") {
const toggles = [`wound_toggle`, `edge_toggle`, `modifier_toggle`];
getAttrs(toggles, (v) => {
let set = {};
toggles.forEach(attr => {
const name = attr.split("_")[0], value = v[`${attr}`].toString();
(value != "0" || !value.includes(name)) ? set[`${attr}`] = 0 : false;
});
setAttrs(set);
});
setAttrs({version: "1.41"}, () => {versioning("1.41")});
} else if (version === "1.35") {
getAttrs(["sheet_type"], (v) => {
let update = {};
(v.sheet_type === "goon") ? update["sheet_type"] = "grunt" : false;
setAttrs(update);
});
setAttrs({version: "1.36"}, () => {versioning("1.36")});
setAttrs({version: "1.36"}, () => {versioning("1.4")});
} else {
setAttrs({version: "1.35"}, () => {versioning("1.35")});
};
};
on("clicked:whisper clicked:wound clicked:modifier clicked:edge", (eventinfo) => {
const attr = (eventinfo.triggerName.includes("whisper")) ? "gm" : eventinfo.triggerName.split("clicked:")[1];
on("clicked:whisper", (eventinfo) => {
getAttrs([`gm_toggle`], (v) => {
const value = v[`${attr}_toggle`];
const change = (attr === "gm" && value != "/w gm") ? "/w gm" : " ";
setAttrs({
[`${attr}_toggle`]: change
});
});
});
on("clicked:wound clicked:modifier clicked:edge", (eventinfo) => {
const attr = eventinfo.triggerName.split("clicked:")[1];
getAttrs([`${attr}_toggle`], (v) => {
const value = v[`${attr}_toggle`];
const change = (attr === "gm" && value != "/w gm") ? "/w gm" : (attr === "wound" && value != "@{wounds}") ? "@{wounds}" : (attr === "edge" && value != "@{edge}") ? "@{edge}" : (attr === "modifier" && value != "?{Modifiers +/-|0}") ? "?{Modifiers +/-|0}" : " ";
const change = (attr === "wound" && value != "@{wounds}") ? "@{wounds}" : (attr === "edge" && value != "@{edge}") ? "@{edge}" : (attr === "modifier" && value != "?{Modifiers +/-|0}") ? "?{Modifiers +/-|0}" : 0;
setAttrs({
[`${attr}_toggle`]: change
+1 -1
View File
@@ -5,7 +5,7 @@
"roll20userid": "557736",
"patreon": "https://www.patreon.com/emeraldgrid",
"preview": "preview.png",
"instructions": "Instructions for use can be found on the [GitHub README](https://github.com/Roll20/roll20-character-sheets/blob/master/Shadowrun5thEdition/README.md). Special thanks to Thomas Brown for bug fixes & code refactor. \n\n* *The Topps Company, Inc. has sole ownership of the names, logo, artwork, marks, photographs, sounds, audio, video and/or any proprietary material used in connection with the game Shadowrun. The Topps Company, Inc. has granted permission to use such names, logos, artwork, marks and/or any proprietary materials for promotional and informational purposes on its website but does not endorse, and is not affiliated with any official capacity whatsoever.*",
"instructions": "Instructions for use can be found on the [GitHub README](https://github.com/Roll20/roll20-character-sheets/blob/master/Shadowrun5thEdition/README.md). Special thanks to Thomas Brown for bug fixes & code refactor and Dyvim for French traslations. \n\n* *The Topps Company, Inc. has sole ownership of the names, logo, artwork, marks, photographs, sounds, audio, video and/or any proprietary material used in connection with the game Shadowrun. The Topps Company, Inc. has granted permission to use such names, logos, artwork, marks and/or any proprietary materials for promotional and informational purposes on its website but does not endorse, and is not affiliated with any official capacity whatsoever.*",
"useroptions": [{
"attribute": "sheet_type",
"displayname": "Sheet Type",
+119 -3
View File
@@ -493,12 +493,12 @@
font-family: "pictos";}
div.sheet-weapons h2:nth-of-type(1) {
margin-right: 20%;
margin-right: 21%;
margin-left : 1%;}
/* DAMAGE HEADER */
div.sheet-weapons h2:nth-of-type(2){
margin-right: 3%;}
margin-right: 2.7%;}
/* AP HEADER */
div.sheet-weapons h2:nth-of-type(3) {
@@ -583,7 +583,7 @@
width: 36%;}
div.sheet-weapons div.sheet-display div:nth-of-type(2) {
width: 10%;}
width: 8%;}
div.sheet-weapons div.sheet-display div:nth-of-type(3),
div.sheet-weapons div.sheet-display div:nth-of-type(4),
@@ -1178,3 +1178,119 @@
outline : none;
text-shadow : 1px 1px 2px black, 0 0 25px red, 0 0 5px #610b0d;}
/********************************************************************************************/
/***************** Spanish & French Adjustments ********************************/
/*******************************************************************************************/
.charsheet.lang-es {}
.charsheet.lang-es img.sheet-logo {
margin-right: -5%}
.charsheet.lang-es div.sheet-tabs button[name*="npc"] {
margin-left: 1%}
.charsheet.lang-es div.sheet-personal-info input[type="text"] {
width: 80%;}
.charsheet.lang-es div.sheet-personal-info input + label {
margin-left: 0px;}
.charsheet.lang-es div.sheet-attributes h2:nth-child(3),
.charsheet.lang-es div.sheet-weapons h2:nth-of-type(2),
.charsheet.lang-fr div.sheet-attributes h2:nth-child(2) {
margin-right: 5%;}
.charsheet.lang-es div.sheet-combat-traits h2:nth-child(3) {
margin-right: 18%;}
.charsheet.lang-es div.sheet-2col-left div:nth-of-type(2) input[type="text"] {
width: 60%;}
.charsheet.lang-es .sheet-personal-info div:nth-of-type(3) label,
.charsheet.lang-es div.sheet-dieroller label,
.charsheet.lang-fr div.sheet-dieroller label {
font-size: 1.1em;}
.charsheet.lang-es div.sheet-skills h2:nth-of-type(1) {
margin-right: 10%;}
.charsheet.lang-es div.sheet-weapons h2:nth-of-type(1) {
margin-right: 14%;}
.charsheet.lang-es div.sheet-weapons h2:nth-of-type(3) {
margin-right: 2%;}
.charsheet.lang-es div.sheet-weapons div.sheet-display div:nth-of-type(3){
width: 6%;}
.charsheet.lang-es div.sheet-weapons div.sheet-display div:nth-of-type(4),
.charsheet.lang-es div.sheet-weapons div.sheet-display div:nth-of-type(5),
.charsheet.lang-es div.sheet-weapons div.sheet-display div:nth-of-type(2) {
width: 8%;}
.charsheet.lang-es div.sheet-weapons div.sheet-display div:nth-of-type(1) {
width: 20%;}
.charsheet.lang-es div.sheet-npc-skill-list h2:nth-of-type(1),
.charsheet.lang-es div.sheet-npc-skill-list h2:nth-of-type(3) {
width: 5%;}
.charsheet.lang-es .sheet-npc div.sheet-dieroller label {
width: 26%;}
.charsheet.lang-es .sheet-npc div.sheet-dieroller button[type="roll"],
.charsheet.lang-fr .sheet-npc div.sheet-dieroller button[type="roll"] {
margin-left: -0.5%;}
.charsheet.lang-es div.sheet-npc div.sheet-col-right div.sheet-settings div > div {
margin-right: 1%;}
/********************************************************************************************/
/***************** French Adjustments ********************************/
/*******************************************************************************************/
.charsheet.lang-fr {}
.charsheet.lang-fr .sheet-wrath h1 {
font-size: 1.3em;}
.charsheet.lang-fr div.sheet-personal-info input[type="number"] {
width: 22%;}
.charsheet.lang-fr div.sheet-attributes input[type="number"] + input[type="number"] {
width: 30%;}
.charsheet.lang-fr div.sheet-attributes button[type="action"] {
width: 34%;}
.charsheet.lang-fr div.sheet-combat-traits h2:nth-child(2) {
margin-right: 32%;}
.charsheet.lang-fr div.sheet-other-traits h2:nth-of-type(1) {
margin-right: 52%;}
.charsheet.lang-fr div.sheet-2col-right .sheet-personal-info textarea {
height: 400px;}
.charsheet.lang-fr div.sheet-skills h2:nth-of-type(1) {
margin-right: 8%;}
.charsheet.lang-fr div.sheet-skills h2:nth-of-type(2),
.charsheet.lang-fr div.sheet-skills h2:nth-of-type(3) {
margin-right: 12%;}
.charsheet.lang-fr div.sheet-weapons h2:nth-of-type(1) {
margin-right: 22%;}
.charsheet.lang-fr div.sheet-stat-long-row input[type="text"] {
width: 68%;}
.charsheet.lang-fr div.sheet-npc-skill-list h2:nth-of-type(1),
.charsheet.lang-fr div.sheet-npc-skill-list h2:nth-of-type(3) {
margin-right: 11%;}
.charsheet.lang-fr div.sheet-npc div.sheet-dieroller label {
width: 24%;}
.charsheet.lang-fr div.sheet-npc div.sheet-dieroller input {
width: 3em;}
+6 -6
View File
@@ -494,20 +494,20 @@
<input type="checkbox" class="settings-toggle" name="attr_flag" checked="checked" title="Weapon settings" /><span>x</span>
<div class="settings">
<div>
<label>name</label><input type="text" name="attr_name" title="@{name}" placeholder="Shoota" value="" />
<label>damage</label>
<label data-i18n="name">name</label><input type="text" name="attr_name" title="@{name}" placeholder="Shoota" value="" />
<label data-i18n="damage">damage</label>
<div class="damage">
<input type="number" name="attr_damage_base" title="@{damage_base}" placeholder="10" value="" />
<span>+</span>
<input type="number" min="0" name="attr_damage_ed" title="@{damage_ed}" placeholder="1" value="" />
<span>ed</span>
</div>
<label>ap</label><input type="text" name="attr_ap" title="@{ap}" placeholder="0" value="" />
<label>salvo</label><input type="text" name="attr_salvo" title="@{salvo}" placeholder="2" value="" />
<label>range</label><input type="text" name="attr_range" title="@{range}" placeholder="36m" value="" />
<label data-i18n="ap">ap</label><input type="text" name="attr_ap" title="@{ap}" placeholder="0" value="" />
<label data-i18n="salvo">salvo</label><input type="text" name="attr_salvo" title="@{salvo}" placeholder="2" value="" />
<label data-i18n="range">range</label><input type="text" name="attr_range" title="@{range}" placeholder="36m" value="" />
</div>
<div>
<label>traits</label><input type="text" name="attr_traits" title="@{traits}" placeholder="Assault, Waaagh!" value="" />
<label data-i18n="traits">traits</label><input type="text" name="attr_traits" title="@{traits}" placeholder="Assault, Waaagh!" value="" />
</div>
</div>
<button type="roll" name="roll_attack_dmg" style="display: none;" value="@{gm_toggle} &{template:rolls}{{shiftdice=[[1d6cf<3cs6]]}}"></button>
+1 -1
View File
@@ -4,7 +4,7 @@
"authors": "Cassie Levett",
"roll20userid": "557736",
"preview": "preview.png",
"instructions": "A simple character sheet for Warhammer 40,000: Wrath & Glory. Instructions for use can be found on the [GitHub README](https://github.com/Roll20/roll20-character-sheets/blob/master/Warhammer40k-WrathandGlory/README.md).",
"instructions": "A simple character sheet for Warhammer 40,000: Wrath & Glory by Ulisses North America. Instructions for use can be found on the [GitHub README](https://github.com/Roll20/roll20-character-sheets/blob/master/Warhammer40k-WrathandGlory/README.md).\n\n* En español & en français. Merci y gracias to Dyvim & WallaceMcGregor for providing translations",
"useroptions": [{
"attribute": "sheet_type",
"displayname": "Sheet Type",