From e46946c41eae4354dbf9cd7ce9b38bf41bf94d1e Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 14:09:59 +0100 Subject: [PATCH 1/8] - Change for slide-in animation --- Mongoose_Traveller2e/MongooseTraveller.css | 31 +++++++++------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index 942662625198..780c9b943dba 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -33,11 +33,6 @@ select[multiple]:focus option:checked { opacity: 0; } -@keyframes fadein { - from {opacity: 0;} - to {opacity: 1;} -} - /* Show the selected tab */ .sheet-tabstoggle[value="prime"] ~ .sheet-prime, .sheet-tabstoggle[value="skills"] ~ .sheet-skills, @@ -46,7 +41,7 @@ select[multiple]:focus option:checked { .sheet-tabstoggle[value="powers"] ~ .sheet-powers, .sheet-tabstoggle[value="notes"] ~ .sheet-notes { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -54,7 +49,7 @@ select[multiple]:focus option:checked { .sheet-typetoggle[value="pc"] ~ .sheet-topbar, .sheet-typetoggle[value="pc"] ~ .sheet-pc { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -62,35 +57,35 @@ select[multiple]:focus option:checked { .sheet-typetoggle[value="npc"] ~ .sheet-topbar, .sheet-typetoggle[value="npc"] ~ .sheet-npc { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } .sheet-typetoggle[value="animal"] ~ .sheet-animal { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } .sheet-typetoggle[value="ship"] ~ .sheet-ship { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } .sheet-typetoggle[value="trade"] ~ .sheet-trade { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } .sheet-typetoggle[value="vehicle"] ~ .sheet-vehicle { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -98,7 +93,7 @@ select[multiple]:focus option:checked { .sheet-tradetoggle[value="passengers"] ~ .sheet-passengers { display: block; margin-left: 3px; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -106,7 +101,7 @@ select[multiple]:focus option:checked { .sheet-tradetoggle[value="freight"] ~ .sheet-freight { display: block; margin-left: 3px; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -114,7 +109,7 @@ select[multiple]:focus option:checked { .sheet-tradetoggle[value="speculative"] ~ .sheet-speculative { display: block; margin-left: 3px; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -122,7 +117,7 @@ select[multiple]:focus option:checked { .sheet-tradetoggle[value="tradelog"] ~ .sheet-tradelog { display: block; margin-left: 3px; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; } @@ -2200,7 +2195,7 @@ input.sheet-laf-ship-component-hider { .repitem { display: block; - animation-name: fadein; + animation-name: slide-in; animation-duration: 1s; opacity: 1; -} \ No newline at end of file +} From c199b47b78a9d03b84432277ad5be48b3eb8dafe Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 16:30:01 +0100 Subject: [PATCH 2/8] - Allow cargo manifest to be minimised --- Mongoose_Traveller2e/MongooseTraveller.css | 1 + Mongoose_Traveller2e/MongooseTraveller.html | 181 ++++++++++---------- 2 files changed, 95 insertions(+), 87 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index 780c9b943dba..7d344b606e5d 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -2193,6 +2193,7 @@ input.sheet-laf-ship-component-hider { width: 90% !important; } +.sheet-slidein, .repitem { display: block; animation-name: slide-in; diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index 14c1031424f3..3d87767d902b 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -3074,99 +3074,103 @@

Notes

-
-

 Cargo Manifest

-

Group Funds: Cr

- - - - -
-
-
-
Key
-
Type
-
Tons
-
Base Px/Ton
-
Supp. Px/Ton
-
Total Tons:
-
-
-
-

Speculative Goods

-
+  Cargo Manifest   + + +
+
+

Group Funds: Cr

+ + + + +
+
- - - Cr - Cr +
Key
+
Type
+
Tons
+
Base Px/Ton
+
Supp. Px/Ton
+
Total Tons:
+
-
-
-
-
- -
-
-
-
- -
-
-
-
-

Freight Goods

-
+
+

Speculative Goods

+
+
+ + + Cr + Cr +
+
- - - Cr +
+
+ +
+
+
+
+ +
+
-
-
-
-
-
-
-
- -
-
-
-
-

Other Goods

-
+
+

Freight Goods

+
+
+ + + Cr +
+
- - - - +
+
+
+
+
+ +
+
+
+
+

Other Goods

+
+
+ - + + +
+
+
+

Passengers

+
+
High:
+ +
Medium:
+ +
Basic:
+ +
Low:
+ +
+
+
+
+
+
+
+ +
+
-
-
-

Passengers

-
-
High:
- -
Medium:
- -
Basic:
- -
Low:
- -
-
-
-
-
-
-
- -
-
@@ -8645,5 +8649,8 @@

Trade Log

+ + +
\ No newline at end of file From 7b72b6c107697bf879fb8534fe8f9ac9f48c1b73 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 17:22:28 +0100 Subject: [PATCH 3/8] - Added repeating sensors to Ship - Added All and Combat selection buttons back to skills - Made trained skills a green tick again --- Mongoose_Traveller2e/MongooseTraveller.css | 4 +-- Mongoose_Traveller2e/MongooseTraveller.html | 27 +++++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index 7d344b606e5d..8490d2d5c8fe 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -787,7 +787,7 @@ input.sheet-reddot[type="checkbox"] + span::before { height: 20px; font-size: 15px; background: transparent; - color: black; + color: red; } input.sheet-reddot[type="checkbox"]:active + span::before { @@ -852,7 +852,7 @@ input.sheet-untrained[type="checkbox"] + span::before { position: relative; top: 0px; left: -5px; - color: red; + color: green; text-shadow: none; margin-right: 4px; line-height: 14px; diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index 3d87767d902b..6d1e7933adeb 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -362,6 +362,11 @@
Tactics VaccSuit +   + All + + Combat +
@@ -2468,17 +2473,17 @@

Sensors

Player Mod Roll - - - - - - -
- +
+
+ + + + +
+

@@ -5344,6 +5349,7 @@

Trade Log

on(`change:${skill.toLowerCase()} sheet:opened`, () => { getAttrs([skill], values => { const toggle = int(values[skill]); + console.log("MgT2E: Skill: " + skill + ", toggle: " + toggle); setAttrs({ [`${skill}_show`]: toggle }) @@ -8652,5 +8658,6 @@

Trade Log

+
\ No newline at end of file From 0b3cf422f535ce841106d70622f3589c18d49609 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 17:30:02 +0100 Subject: [PATCH 4/8] - Fixed Ship damage for multiple weapons/hardpoint --- Mongoose_Traveller2e/MongooseTraveller.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index 6d1e7933adeb..cdb801b91917 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -8617,7 +8617,10 @@

Trade Log

console.log("- weaponType: " + weaponType + ", weaponDamage: " + weaponDamage + ", numWeapons: " + numWeapons); // We need to handle the weapon damage based on a) are they Destructive (DD) and b) number of weapons which adds the number of damage dice as extra damage - var damageMod = +numWeapons - 1; + var numDamageDice = weaponDamage.match(/^(\d+)/)[0]; + console.log("- numDamageDice: " + numDamageDice); + var damageMod = (+numWeapons - 1) * + numDamageDice; + console.log("- damageMod: " + damageMod); if(weaponDamage.includes("DD")) { weaponDamage = weaponDamage.replace("DD", "D6*10"); damageMod = 0; From 49bdf9c516e76051d602bdb42bdb72a23006a03e Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 17:34:53 +0100 Subject: [PATCH 5/8] - More sensor fixes for Ship --- Mongoose_Traveller2e/MongooseTraveller.css | 1 + Mongoose_Traveller2e/MongooseTraveller.html | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index 8490d2d5c8fe..b06682cc59cb 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -1869,6 +1869,7 @@ sheet-vehicle h3 { .sheet-laf-vehicle-sensors { width: 90% !important; grid-template-columns: 2fr 0.25fr 0.25fr 0.1fr 5fr; + margin-bottom: 3px; } .sheet-laf-vehicle-sensors span, diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index cdb801b91917..b7306abd4ff2 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -2473,6 +2473,15 @@

Sensors

Player Mod Roll + + + + + + +
@@ -8662,5 +8671,6 @@

Trade Log

+
\ No newline at end of file From f35f033523ad47921beb9da7254dd6f2f995fc13 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 18:34:52 +0100 Subject: [PATCH 6/8] - Added show trained skills toggle --- Mongoose_Traveller2e/MongooseTraveller.css | 9 ++++- Mongoose_Traveller2e/MongooseTraveller.html | 43 ++++++++++++++++++--- Mongoose_Traveller2e/translation.json | 1 + 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index b06682cc59cb..ca3e5000512a 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -790,10 +790,10 @@ input.sheet-reddot[type="checkbox"] + span::before { color: red; } -input.sheet-reddot[type="checkbox"]:active + span::before { +input.sheet-reddot[type="checkbox"]:checked + span::before { color: red; font-family: "Pictos"; - content: "0"; + content: "D"; font-size: 15px; } @@ -2201,3 +2201,8 @@ input.sheet-laf-ship-component-hider { animation-duration: 1s; opacity: 1; } + +.sheet-skill-toggles { + display: grid; + grid-template-columns: 0.5fr 1fr 0.5fr 1fr 0.5fr 1fr 0.5fr 6fr; +} \ No newline at end of file diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index b7306abd4ff2..2d8b6719c8f3 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -362,11 +362,15 @@
Tactics VaccSuit -   - All - - Combat - +
+
+ All + + Trained + + Combat + +
@@ -5376,6 +5380,34 @@

Trade Log

}); }); + + on("change:skill_trained", (info) => { + + console.log("MgT2E: Skill trained: " + JSON.stringify(info)); + + attrs=[]; + skills.forEach(skill => { + attrs.push("untrained-" + skill); + }); + + getAttrs(attrs, values => { + + var attrsToSet = {}; + skills.forEach(skill => { + if(+values["untrained-" + skill] === 0) { + // Trained + attrsToSet[skill] = +info.newValue; + } + else { + // Untrained + attrsToSet[skill] = +info.previousValue; + } + }); + + setAttrs(attrsToSet); + }); + }); + const buttonlist = ["prime","skills","inventory","combat","powers","notes"]; buttonlist.forEach(button => { on(`clicked:${button}`, function() { @@ -8672,5 +8704,6 @@

Trade Log

+
\ No newline at end of file diff --git a/Mongoose_Traveller2e/translation.json b/Mongoose_Traveller2e/translation.json index 922a460fab5b..75b48a22c47f 100644 --- a/Mongoose_Traveller2e/translation.json +++ b/Mongoose_Traveller2e/translation.json @@ -32,6 +32,7 @@ "skillstitle-u": "Skills", "skills-all-u": "All", "skills-combat-u": "Combat", + "skills-trained-u": "Trained", "skilltableskill-u": "Skill", "skilltabletalent-u": "Talent", "skilltablecharacteristic-u": "Characteristic", From 54a779b36efe09194e61e0d597395ab64c8215b7 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 29 Sep 2023 18:45:44 +0100 Subject: [PATCH 7/8] - Added show trained skills toggle 2 --- Mongoose_Traveller2e/MongooseTraveller.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index 2d8b6719c8f3..d524a79c8770 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -5400,7 +5400,7 @@

Trade Log

} else { // Untrained - attrsToSet[skill] = +info.previousValue; + //attrsToSet[skill] = +info.previousValue; } }); From 9ee1ed13530afeaef43cea33986dfe56cbc8a6b2 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 1 Oct 2023 16:45:59 +0100 Subject: [PATCH 8/8] - ALL inline styles removed --- Mongoose_Traveller2e/MongooseTraveller.css | 46 ++++- Mongoose_Traveller2e/MongooseTraveller.html | 205 +++++++++----------- 2 files changed, 140 insertions(+), 111 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index ca3e5000512a..5a2e275535d8 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -169,6 +169,10 @@ input[type="number"]:hover { height: 75px; } +.sheet-narrowtext textarea { + height: 40px; +} + .sheet-bold { font-weight: bold; } @@ -1363,6 +1367,15 @@ button.btn.repcontrol_edit::after { display: flex; } +.sheet-trade_content div:first-child { + margin-right: 3px; + width: 15%; +} + +.sheet-trade_content div:nth-child(2) { + width: 85%; +} + .sheet-speculative, .sheet-speculative-subpanel { border: red solid 1px; @@ -1395,12 +1408,20 @@ button.btn.repcontrol_edit::after { width: 2%; } +div.sheet-speculativegoods h3 { + margin-left: 5px; +} + div.sheet-speculativegoods-row-pg { display: grid; grid-template-columns: 32px 210px 100px 85px 95px 70px 80px; column-gap: 5px; } +div.sheet-speculativegoods-row-pg h5:first-child, +div.sheet-speculativegoods-row-pg span:first-child { + margin-left: 5px; +} div.sheet-speculativegoods-row { display: grid; grid-template-columns: 22px 190px 100px 75px 80px 70px 75px 75px 40px; @@ -1795,6 +1816,10 @@ sheet-vehicle h3 { height: 30px !important; } +.sheet-laf-weaponlist select { + width: 85px; +} + .sheet-laf-ship { grid-template-columns: 2fr 5fr 1fr 5fr 1fr 1fr 1fr; margin-bottom: 3px; @@ -1841,7 +1866,16 @@ sheet-vehicle h3 { .sheet-laf-animal-init { width: 75%; - grid-template-columns: 0.25fr 0.25fr 1fr 0.01fr; + grid-template-columns: 0.25fr 0.25fr 5fr; +} +.sheet-laf-animal-init span { + margin-top: 5px; +} + +.sheet-laf-animal-init button { + height: 28px !important; + padding: 0; + margin: 0px !important; } .sheet-laf-animal-detail { @@ -2205,4 +2239,14 @@ input.sheet-laf-ship-component-hider { .sheet-skill-toggles { display: grid; grid-template-columns: 0.5fr 1fr 0.5fr 1fr 0.5fr 1fr 0.5fr 6fr; +} + +.sheet-trade-passagetype { + display: grid; + grid-template-columns: 1fr 0.1fr 0.35fr 0.1fr 1fr 0.1fr 1fr 0.1fr 1fr 0.1fr 1fr; +} + +.sheet-trade-parsecs { + display: grid; + grid-template-columns: 0.97fr 0.1fr 0.35fr 0.1fr 0.35fr 0.1fr 0.35fr 0.1fr 0.35fr 0.1fr 0.35fr 0.1fr 0.35fr 2fr; } \ No newline at end of file diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index d524a79c8770..32e1c1e84971 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -1806,10 +1806,11 @@

Weapons

- - + + @@ -1822,13 +1823,13 @@

Weapons

- - + - + @@ -1839,13 +1840,13 @@

Weapons

- - + - + @@ -1856,13 +1857,13 @@

Weapons

- - + - + @@ -1873,13 +1874,13 @@

Weapons

- - + - + @@ -1890,13 +1891,13 @@

Weapons

- - + - + @@ -1908,14 +1909,14 @@

Weapons

- - + - + @@ -2145,7 +2146,7 @@

Weapons

- @@ -2161,7 +2162,7 @@

Weapons

- @@ -2228,7 +2229,7 @@

NPC Skills



@@ -2278,7 +2279,7 @@

Armour

Weapons

-
+
Roll Weapon Skill Total @@ -2295,7 +2296,7 @@

Weapons

- @@ -2312,14 +2313,14 @@

Weapons

- - + - + @@ -2386,10 +2387,10 @@
Speed

-
- Mod:  +
+ Mod:  -
@@ -2472,7 +2473,7 @@
Speed

Sensors

- Type + Type Sensor Mod Player Mod Roll @@ -2972,7 +2973,7 @@

Details

Sensors

- Type + Type Sensor Mod Player Mod Roll @@ -3051,20 +3052,22 @@

Weapons



-

Traits

- -
-
-

Equipment

- -
-
-

Description

- -
-
-

Notes

- +
+

Traits

+ +
+
+

Equipment

+ +
+
+

Description

+ +
+
+

Notes

+ +
@@ -3095,7 +3098,7 @@

Notes

 Cargo Manifest   -
+

Group Funds: Cr

@@ -3203,53 +3206,28 @@

-
- - - - - - - - - -
Passage Type - All - - High Passage - - Medium Passage - - Basic Passage - - Low Passage -
+
+ Passage Type + + All + + High Passage + + Medium Passage + + Basic Passage + + Low Passage

-
- - - - - - - - - - -
Parsecs - 1 - - 2 - - 3 - - 4 - - 5 - - 6 -
+
+ Parsecs + 1 + 2 + 3 + 4 + 5 + 6

@@ -3484,8 +3462,8 @@
Cost/Passenger
-

Freight (Note coloured parameters only applicable to - Mail)

+

Freight (Note coloured parameters only applicable to + Mail)

Broker or Streetwise Check Effect @@ -3498,9 +3476,9 @@
Cost/Passenger

- +
- + @@ -3523,7 +3501,7 @@
Cost/Passenger

-
Cargo TypeCargo Type   All
+
Parsecs @@ -3927,13 +3905,16 @@
Price/Lot
Purchase Trade Goods. This will transfer the trade goods details to your 'Cargo Manifest'

-
-

Population

+
+ Population +
-

Law Level

+
+ Law Level +
-
+

Trade Codes

@@ -4140,13 +4121,15 @@
-
-

Population

+
+ Population +
-

Law Level

+ Law Level +
-
+

Trade Codes

@@ -4294,10 +4277,8 @@

Trade Log

-
Background image: https://www.deviantart.com/elcapitan1023654/art/Free-Sci-fi-Ship-Panel-767780402 -
-
The Traveller game in all forms is owned by Far Future Enterprises. Copyright © 1977 – 2023 Far Future Enterprises. -
+
Background image: https://www.deviantart.com/elcapitan1023654/art/Free-Sci-fi-Ship-Panel-767780402
+
The Traveller game in all forms is owned by Far Future Enterprises. Copyright © 1977 – 2023 Far Future Enterprises.
@@ -8705,5 +8686,9 @@

Trade Log

+ + + + \ No newline at end of file