From 9c3f46f13e17b28a505c32039927ab10608ef473 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 4 Feb 2024 13:48:18 +0000 Subject: [PATCH] - Added missing critical damage locations to repeating groups - Added Ship subtabs for Details & Notes --- Mongoose_Traveller2e/MongooseTraveller.css | 32 + Mongoose_Traveller2e/MongooseTraveller.html | 963 ++++++++++---------- 2 files changed, 527 insertions(+), 468 deletions(-) diff --git a/Mongoose_Traveller2e/MongooseTraveller.css b/Mongoose_Traveller2e/MongooseTraveller.css index 297c87fe9033..b621a51bb431 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.css +++ b/Mongoose_Traveller2e/MongooseTraveller.css @@ -23,6 +23,8 @@ select[multiple]:focus option:checked { .sheet-npc, .sheet-animal, .sheet-ship, +.sheet-shipdetails, +.sheet-shipnotes, .sheet-passengers, .sheet-freight, .sheet-speculative, @@ -76,6 +78,34 @@ select[multiple]:focus option:checked { opacity: 1; } +.sheet-shiptypetoggle[value="ship"] ~ .sheet-ship { + display: block; + animation-name: slide-in; + animation-duration: 1s; + opacity: 1; +} + +.sheet-typetoggle[value="ship"] ~ .sheet-ship { + display: block; + animation-name: slide-in; + animation-duration: 1s; + opacity: 1; +} + +.sheet-shiptype[value="shipdetails"] ~ .sheet-shipdetails { + display: block; + animation-name: slide-in; + animation-duration: 1s; + opacity: 1; +} + +.sheet-shiptype[value="shipnotes"] ~ .sheet-shipnotes { + display: block; + animation-name: slide-in; + animation-duration: 1s; + opacity: 1; +} + .sheet-typetoggle[value="trade"] ~ .sheet-trade { display: block; animation-name: slide-in; @@ -1304,6 +1334,8 @@ input.sheet-typeshow[value="pc"] ~ .sheet-type-pc, input.sheet-typeshow[value="npc"] ~ .sheet-type-npc, input.sheet-typeshow[value="animal"] ~ .sheet-type-animal, input.sheet-typeshow[value="ship"] ~ .sheet-type-ship, +input.sheet-shiptypeshow[value="shipdetails"] ~ .sheet-type-shipdetails, +input.sheet-shiptypeshow[value="shipnotes"] ~ .sheet-type-shipnotes, input.sheet-typeshow[value="vehicle"] ~ .sheet-type-vehicle, input.sheet-tradetypeshow[value="passengers"] ~ .sheet-type-passengers, input.sheet-tradetypeshow[value="freight"] ~ .sheet-type-freight, diff --git a/Mongoose_Traveller2e/MongooseTraveller.html b/Mongoose_Traveller2e/MongooseTraveller.html index 6c96b01b3e34..980a51717cc4 100644 --- a/Mongoose_Traveller2e/MongooseTraveller.html +++ b/Mongoose_Traveller2e/MongooseTraveller.html @@ -2794,503 +2794,524 @@
Speed
-
-
- - - - - - + + +
+ + +
-
-
- - - - - - - - - - - - - -
-
-
- Critical Damage - - - - - -
-
+
+
+
+ + + + + +
-
-
-
-

Sensors

-
- Type - Sensor Mod - Player Mod - Roll - - - - - - +
+
+ + + + + - + + + + + + + +
+
+
+ Critical Damage + + + + + +
+
+
-
-
+
+
+

Sensors

+
+ Type + Sensor Mod + Player Mod + Roll + + + +
-
-
-
-
-

Hardpoints/Firmpoints []

- -

Add a hardpoint then add the weapons below for that hardpoint. Destructive weapons should have their damage in the form e.g.: 2DD

- -
-
- Hardpoint -
- Gunner Skill: - - DEX Mod. - - Custom Mod. - - - +
+
+ + + +
+
+
+
+
+

Hardpoints/Firmpoints []

+ +

Add a hardpoint then add the weapons below for that hardpoint. Destructive weapons should have their damage in the form e.g.: 2DD

+ +
+
+ Hardpoint +
+ Gunner Skill: + + DEX Mod. + + Custom Mod. + + + +
+
+ Name + Type + TL + Power + Tons + Cost (MCr) + + + + + + + + + + + + + + + +
+
+
+
+
+
+

Weapons

+

Add weapons ensuring you set the hardpoint name correctly.
+ Note that for hardpoints with missiles you will have to add the number of missiles in the salvo to the custom modifier.
+ (Note that weapons information from before new updates appear below after Cargo as 'Legacy Weapons'.) +

+ +
+ Hardpoint Name + Type + TL + Power + Range + Cost (MCr) + Damage + Traits + # + +
+
- Name - Type - TL - Power - Tons - Cost (MCr) + + + + + + + + + + + +
+
+
+
+
+
+
+ Component + Detail + Tons + Cost (MCr) +
+
+
+ Hull + + + +
+
+ Armour + + + +
+
+ M-Drive + + + +
+
+ J-Drive + + + - - - - - - - +
+
+ Power Plant +
+ +  Power: + +
+ + +
+
+ Fuel Tanks + + + +
+
+ Bridge + + + +
+
+ Computer + + +
-
-
-
-
-
-

Weapons

-

Add weapons ensuring you set the hardpoint name correctly.
- Note that for hardpoints with missiles you will have to add the number of missiles in the salvo to the custom modifier.
- (Note that weapons information from before new updates appear below after Cargo as 'Legacy Weapons'.)

- -
- Hardpoint Name - Type - TL - Power - Range - Cost (MCr) - Damage - Traits - # - -
-
-
- - - - - - - - - - - -
-
-
-
-
-
-
- Component - Detail - Tons - Cost (MCr) -
-
-
- Hull - - - - -
-
- Armour - - - - -
-
- M-Drive - - - - -
-
- J-Drive - - - - -
-
- Power Plant -
- -  Power: - +
+ Sensors + + + + + + +
+
+
+ Sensors + + + +
+
+
- - - -
-
- Fuel Tanks - - - - -
-
- Bridge - - - - -
-
- Computer - - - - -
-
- Sensors - - - - - - -
-
-
- Sensors - - - -
-
+
+ Ammunition + + + + + + +
+
+
+ Ammunition + + + +
+
+
-
-
- Ammunition - - - - - - -
-
-
- Ammunition - - - -
-
+
+ Screens + + + + + + +
+
+
+ Screens + + + +
+
+
-
-
- Screens - - - - - - -
-
-
- Screens - - - -
-
+
+ Armoured Bulkheads + + + + + + +
+
+
+ Armoured Bulkheads + + + +
+
+
-
-
- Armoured Bulkheads - - - - - - -
-
-
- Armoured Bulkheads - - - -
-
+
+ Craft + + + + + + +
+
+
+ Craft + + + +
+
+
-
-
- Craft - - - - - - -
-
-
- Craft - - - -
-
+
+ Systems + + + + + + +
+
+
+ Systems + + + +
+
+
-
-
- Systems - - - - - - -
-
-
- Systems - - - -
-
+
+ Staterooms + + + + + + +
+
+
+ Staterooms + + + +
+
+
-
-
- Staterooms - - - - - - -
-
-
- Staterooms - - - -
-
+
+ Software + + + + + + +
+
+
+ Software + + + +
+
+
-
-
- Software - - - - - - -
-
-
- Software - - - -
-
+
+ CommonAreas + + + + + + +
+
+
+ Software + + + +
+
+
-
-
- CommonAreas - - - - - - -
-
-
- Software - - - -
-
+
+ Cargo + + +
-
-
- Cargo - - - -
-
- Legacy Weapons - - - - - - -
-
-
- Weapons - - - -
-
+
+ Legacy Weapons + + + + + + +
+
+
+ Weapons + + + +
+
+
-
-
-

Crew

- -
-
-

Running Costs

-
Maintenance Cost
-   Cr  - - -
Mortgage
-   Cr  -
Life Support
-   Cr  -
Salaries
-   Cr  -
Fuel (Full Tank)
-   Cr  +
+

Crew

+ +
+
+

Running Costs

+
Maintenance Cost
+   Cr  + + +
Mortgage
+   Cr  +
Life Support
+   Cr  +
Salaries
+   Cr  +
Fuel (Full Tank)
+   Cr  +
+
+

Power [/]

+ +
Manoeuvre Drive
+ +
Jump Drive
+ +
Basic Ship Systems
+ +
Fuel Processor
+ +
Sensors
+ +
Weapons
+ +   +
-
-

Power [/]

- -
Manoeuvre Drive
- -
Jump Drive
- -
Basic Ship Systems
- -
Fuel Processor
- -
Sensors
- -
Weapons
- -   +
+
+
+ Description +
+
+ +
-
-
-
- Description -
-
- +
+
+
@@ -5057,7 +5078,6 @@

Trade Log

{{skill}}: {{spec}} - {{#rollhasboon}} @@ -5069,7 +5089,6 @@

Trade Log

Skill: {{roll}} -
@@ -5085,9 +5104,6 @@

Trade Log

{{skill}} Passage - - - Passengers: {{roll}} @@ -6083,6 +6099,16 @@

Trade Log

}); }); + const buttonlist_sheetshiptype = ["shipdetails", "shipnotes"]; + buttonlist_sheetshiptype.forEach(button => { + on(`clicked:${button}`, function() { + setAttrs({ + sheetShipType: button, + sheetShipTypeShow: button + }); + }); + }); + const buttonlist_sheettradetype = ["passengers", "freight", "speculative", "tradelog"]; buttonlist_sheettradetype.forEach(button => { on(`clicked:${button}`, function() { @@ -9345,9 +9371,7 @@

Trade Log

// We need to handle the weapon damage based on a) are they Destructive (DD) // DOES THIS APPLY: and b) number of weapons which adds the number of damage dice as extra damage - if(weaponDamage.includes("DD")) { - weaponDamage = weaponDamage.replace("DD", "D6*10"); - } + weaponDamage = formatWeaponDamage(weaponDamage).weaponDamage; startRoll("@{whispertoggle}&{template:combat@{alt_rolltemplate_val}} {{character=@{character_name}}} {{weapon=" + mountName + ":" + weaponType + "}} @{ro_default_rolltype} + " + gunnerDM + " + " + dexMod + " + " + customMod + " @{ro_default_mod}]]}} {{damage=[[" + weaponDamage + "]]}}", (results) => { const toHit = results.results.roll.result; @@ -9477,7 +9501,7 @@

Trade Log

var customMod = v[hardpointPrefix + "custommod"]; var weaponType = v[weaponPrefix + "w_type"]; - var weaponDamage = v[weaponPrefix + "w_damage"]; + var weaponDamage = v[weaponPrefix + "w_damage"].toUpperCase(); var numWeapons = v[weaponPrefix + "w_num"]; console.log("- hpName: " + hpName + ", gunnerDM: " + gunnerDM + ", dexMod: " + dexMod + ", customMod: " + customMod); @@ -9694,5 +9718,8 @@

Trade Log

+ + +