diff --git a/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.css b/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.css index b3fd02bc7f..cbfd8f6514 100644 --- a/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.css +++ b/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.css @@ -875,7 +875,7 @@ input.sheet-rollselect[value="bane"] ~ .sheet-button:not(.sheet-roll_bane) { .sheet-gear_grid { display: grid; - grid-template-columns: 1fr 1fr 1fr; + grid-template-columns: 0.8fr 0.8fr 0.8fr 1fr 1fr; } .sheet-gear_col { @@ -1995,6 +1995,18 @@ span.sheet-vehiclecomponent { grid-template-columns: 150px 80px 80px 1fr 1fr 1fr 1fr 1fr; } +.sheet-pcrobotskills { + display: none; +} + +.sheet-robotshowskills { + margin-bottom: 3px !important; +} + +span:has(.sheet-robotshowskills:checked) ~ .sheet-pcrobotskills { + display: block; +} + .sheet-laf-skillrow button[type="compendium"] { width: 18px; margin-left: auto !important; @@ -2061,6 +2073,10 @@ span.sheet-vehiclecomponent { grid-column: 1 / 9; } +.sheet-gridspan10 { + grid-column: 1 / 10; +} + .sheet-laf-skillrow button:first-child { margin-top: 2px !important; } @@ -2095,6 +2111,10 @@ span.sheet-vehiclecomponent { text-align: right; } +.sheet-laf-gearrow input:nth-of-type(3) { + width: 3em !important; +} + .sheet-laf-finance { width: 300px; display: grid; @@ -2203,12 +2223,12 @@ span.sheet-vehiclecomponent { .sheet-laf-armourlist { - grid-template-columns: 1.5fr 1fr 1.2fr 1.75fr 1.2fr 1fr 1.2fr 0.4fr; + grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr 1.2fr 1fr 0.1fr 1.5fr 0.4fr; margin-bottom: 3px; } .sheet-laf-armourlist-px { - grid-template-columns: 220px 1fr 1.2fr 1.75fr 1.2fr 1fr 1.2fr 0.4fr; + grid-template-columns: 220px 1fr 1.2fr 1.2fr 1.2fr 1fr 0.1fr 1.5fr 0.4fr; margin-bottom: 3px; } @@ -2218,10 +2238,18 @@ span.sheet-vehiclecomponent { margin-bottom: 3px; } +.sheet-laf-armourlist input[type="checkbox"] { + outline: none; +} + .sheet-laf-armourlist select { width: 100%; } +.sheet-laf-armourlist > div { + width: max-content; +} + /* Do not know why I've had to do this but header spans just do not line up */ .sheet-laf-header-offset span: { margin-left: 10px; diff --git a/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.html b/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.html index 27a46ca60a..463e3fb8a9 100644 --- a/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.html +++ b/Mongoose Traveller 2e Official/Official Mongoose Publishing Traveller 2nd Edition.html @@ -18,7 +18,6 @@
To represent the core character attributes on a token so they can be
@@ -14058,17 +14095,10 @@
});
// Total Weight
- on("change:weightright change:weightleft change:fixedcombatweight change:repeatingarmourweight change:repeatingweaponweight change:current-Strength change:current-Endurance change:skilllevel-Athletics change:armour-mass sheet:opened", function() {
+ on("change:weightright change:weightleft change:fixedcombatweight change:repeatingarmourweight change:repeatingweaponweight change:current-Strength change:current-Endurance change:injury-Strength change:injury-Endurance change:skilllevel-Athletics change:armour-mass sheet:opened", function() {
getAttrs(["weightright", "weightleft", "fixedcombatweight", "repeatingarmourweight", "repeatingweaponweight",
"current-Strength", "current-Endurance", "skilllevel-Athletics", "armour-mass", "armour-carried"], function(values) {
- //console.log("current-Strength: " + values["current-Strength"]);
- //console.log("current-Endurance: " + values["current-Endurance"]);
- //console.log("skilllevel-Athletics: " + values["skilllevel-Athletics"]);
- //console.log("values.repeatingarmourweight: " + values.repeatingarmourweight);
- // Carried
- //
-
// Grab our attrs to check weight against, then remove from values so we can tot up equipment weight
const carryCapacity = parseInt(values["current-Strength"]) + parseInt(values["current-Endurance"]) + parseInt(values["skilllevel-Athletics"]);
const armourMass = parseFloat(values["armour-mass"]) * parseFloat(values["armour-carried"]);
@@ -14083,12 +14113,8 @@
// Calculate encumberance, Armour is only 25% of its weight for encumberance purposes, knock it off and re-calc
const totalArmourWeight = parseFloat(values.repeatingarmourweight) + armourMass;
- //console.log("tw: " + tw);
- //console.log("totalArmourWeight: " + totalArmourWeight);
- let totalEncumberanceWeight = (tw - totalArmourWeight) + (totalArmourWeight * 0.25);
- //console.log("tew: " + totalEncumberanceWeight);
- totalEncumberanceWeight = Math.round(totalEncumberanceWeight * 10) / 10;
- //console.log("tew: " + totalEncumberanceWeight);
+ let totalEncumberanceWeight = tw; // (tw - totalArmourWeight) + (totalArmourWeight * 0.25);
+ totalEncumberanceWeight = totalEncumberanceWeight.toFixed(2); //Math.round(totalEncumberanceWeight * 10) / 10;
let encumbered = totalEncumberanceWeight > carryCapacity ? "Yes" : "No";
// If the total gear weight is TWICE our capacity, then signal the DM-2 on physical actions
@@ -14101,7 +14127,8 @@
totalweight: tw.toFixed(1),
totalitemweight: tiw,
encumbered: encumbered,
- carrycapacity: "" + carryCapacity + "/" + totalEncumberanceWeight
+ carrycapacity: "" + totalEncumberanceWeight + "/" + carryCapacity,
+ totalequipmentweight: tiw.toFixed(2)
});
});
});
@@ -14109,6 +14136,11 @@
// Left equipment weight
on("change:repeating_othergear:massleft change:repeating_othergear:quantityleft change:repeating_othergear:equippedleft xxxsheet:opened", function() {
getAttrs(["repeating_othergear_massleft", "repeating_othergear_quantityleft", "repeating_othergear_equippedleft"], function(values) {
+
+ if(isNaN(values.repeating_othergear_massleft)) {
+ values.repeating_othergear_massleft = 0;
+ }
+
const mass = (parseFloat(values.repeating_othergear_massleft).toFixed(2)) * (parseInt(values.repeating_othergear_quantityleft) * parseInt(values.repeating_othergear_equippedleft));
console.log("othergear-left: " + mass);
setAttrs({
@@ -14120,7 +14152,11 @@
// Right equipment weight
on("change:repeating_othergear:massright change:repeating_othergear:quantityright change:repeating_othergear:equippedright xxxsheet:opened", function() {
getAttrs(["repeating_othergear_massright", "repeating_othergear_quantityright", "repeating_othergear_equippedright"], function(values) {
- console.log("change:repeating_othergear:massright");
+
+ if(isNaN(values.repeating_othergear_massright)) {
+ values.repeating_othergear_massright = 0;
+ }
+
const mass = (parseFloat(values.repeating_othergear_massright).toFixed(2)) * (parseInt(values.repeating_othergear_quantityright) * parseInt(values.repeating_othergear_equippedright));
console.log("othergear-right: " + mass);
setAttrs({
@@ -14130,33 +14166,38 @@
});
// Fixed combat weight
- on("change:armour-mass change:armour-carried change:weapon_weight-1 change:weapon_weight-2 change:weapon_weight-3 change:weapon_weight-4 change:weapon_weight-5 change:weapon_weight-6 change:weapon_carried-1 change:weapon_carried-2 change:weapon_carried-3 change:weapon_carried-4 change:weapon_carried-5 change:weapon_carried-6 sheet:opened", function() {
+ on("change:armour-mass change:repeatingarmourweight change:armour-carried change:armour-powered change:weapon_weight-1 change:weapon_weight-2 change:weapon_weight-3 change:weapon_weight-4 change:weapon_weight-5 change:weapon_weight-6 change:weapon_carried-1 change:weapon_carried-2 change:weapon_carried-3 change:weapon_carried-4 change:weapon_carried-5 change:weapon_carried-6 sheet:opened", function() {
- const attrs = ["armour-mass", "armour-carried",
+ const attrs = ["armour-mass", "armour-carried", "armour-powered", "repeatingarmourweight",
"weapon_weight-1", "weapon_weight-2", "weapon_weight-3", "weapon_weight-4", "weapon_weight-5", "weapon_weight-6",
"weapon_carried-1", "weapon_carried-2", "weapon_carried-3", "weapon_carried-4", "weapon_carried-5", "weapon_carried-6"];
getAttrs(attrs, function(values) {
- //let fcw = Object.values(values).reduce((a, b) => parseFloat(a) + parseFloat(b), 0);
// More complicated now we have carried stuff, carried attrs are either 1 or 0
- let fcw = parseFloat(values["armour-mass"]) * parseInt(values["armour-carried"]);
+ // Also need to account for powered armour which does not contribute to encumberance, otherwise is
+ // 25% of weight
+ let armourModifier = values["armour-powered"] === "1" ? 0 : 0.25;
+
+ let fcw = parseFloat(values["armour-mass"]) * parseInt(values["armour-carried"]) * armourModifier;
+ let taw = fcw + parseFloat(values["repeatingarmourweight"]);
+ let tww = 0;
for (let i=1; i<=6; i++) {
- fcw += parseFloat(values["weapon_weight-" + i]) * parseInt(values["weapon_carried-" + i]);
+ tww += parseFloat(values["weapon_weight-" + i]) * parseInt(values["weapon_carried-" + i]);
}
+ fcw += tww;
console.log("armour-weapon-mass change: " + fcw + " : " + JSON.stringify(values));
setAttrs({
- fixedcombatweight: fcw
+ fixedcombatweight: fcw,
+ totalweaponsweight: tww.toFixed(2),
+ totalarmourweight: taw.toFixed(2)
});
- console.log("leaving armour-weapon-mass change: " + fcw + " : " + JSON.stringify(values));
});
});
// Repeating armour weight
on('change:repeating_armour remove:repeating_armour', function(){
console.log("reparmour-mass change");
- // Made more complex by carrying
- //TAS.repeatingSimpleSum('armour','reparmour-mass','repeatingarmourweight');
let attrs = [];
getSectionIDs("repeating_armour", function (idarr) {
let total = 0;
@@ -14165,12 +14206,18 @@
for (var i=0; i