diff --git a/Star Trek Adventures 2d20/Star Trek Adventures 2d20.css b/Star Trek Adventures 2d20/Star Trek Adventures 2d20.css index 7ff14fb4fc..cf9a46b795 100644 --- a/Star Trek Adventures 2d20/Star Trek Adventures 2d20.css +++ b/Star Trek Adventures 2d20/Star Trek Adventures 2d20.css @@ -413,9 +413,10 @@ button[type="roll"]:before { border-color: #ff9900; } -.sheet-scale .sheet-attributecontainer input[type="number"] { +.sheet-scale .sheet-attributecontainer input[type="text"] { border-color: #ff9900; color: #ff9900; + width: 40px; } @@ -577,18 +578,20 @@ input[type="number"]:focus -moz-appearance: number-input; } -.sheet-attributecontainer input[type="number"] { +.sheet-attributecontainer input[type="text"] { border-color: darkviolet; color: darkviolet; + width: 40px; } .sheet-weaponscontainer { display: inline-block; } -.sheet-weaponscontainer input[type="number"] { +.sheet-weaponscontainer input[type="text"][name="attr_weapval"] { border-color: #cc6699; color: #cc6699; + width: 40px; } .sheet-weaponscontainer input[type="text"] { diff --git a/Star Trek Adventures 2d20/Star Trek Adventures 2d20.html b/Star Trek Adventures 2d20/Star Trek Adventures 2d20.html index 2b1fc69e71..da64c92640 100644 --- a/Star Trek Adventures 2d20/Star Trek Adventures 2d20.html +++ b/Star Trek Adventures 2d20/Star Trek Adventures 2d20.html @@ -97,7 +97,7 @@
- VERSION + VERSION
@@ -107,17 +107,17 @@
- CURRENT + CURRENT
- BONUS + BONUS
- MAX + MAX
@@ -127,17 +127,17 @@
- CURRENT + CURRENT
- BONUS + BONUS
- MAX + MAX
@@ -147,7 +147,7 @@
- BONUS + BONUS
@@ -195,7 +195,7 @@ - +
@@ -203,7 +203,7 @@ - +
@@ -211,7 +211,7 @@ - +
@@ -221,7 +221,7 @@ - +
@@ -229,7 +229,7 @@ - +
@@ -237,7 +237,7 @@ - +
@@ -252,7 +252,7 @@ - +
@@ -260,7 +260,7 @@ - +
@@ -268,7 +268,7 @@ - +
@@ -278,7 +278,7 @@ - +
@@ -286,7 +286,7 @@ - +
@@ -294,7 +294,7 @@ - +
@@ -337,13 +337,13 @@
- NAME/TYPE + NAME/TYPE
- +
@@ -456,7 +456,7 @@ - +
BREACHES @@ -473,7 +473,7 @@ - +
BREACHES @@ -490,7 +490,7 @@ - +
BREACHES @@ -509,7 +509,7 @@ - +
BREACHES @@ -526,7 +526,7 @@ - +
BREACHES @@ -543,7 +543,7 @@ - +
BREACHES @@ -559,7 +559,7 @@
- SCALE + SCALE
@@ -572,7 +572,7 @@ - +
@@ -580,7 +580,7 @@ - +
@@ -588,7 +588,7 @@ - +
@@ -598,7 +598,7 @@ - +
@@ -606,7 +606,7 @@ - +
@@ -614,7 +614,7 @@ - +
@@ -636,12 +636,12 @@
- CURRENT + CURRENT
- TOTAL + TOTAL
@@ -738,12 +738,12 @@
- CURRENT + CURRENT
- TOTAL + TOTAL
@@ -757,13 +757,13 @@
- NAME/TYPE + NAME/TYPE
- +
@@ -781,7 +781,6 @@
-
@@ -813,6 +812,7 @@ on("sheet:opened", function () { versioning(); + fixattr(); }); on("change:show_settings change:show_settings_max", function () { @@ -825,11 +825,11 @@ }); }); - on("change:stress_max", function () { + on("change:stress_max change:fitness change:security change:stress_bonus", function () { configure_stress(); }); - on("change:shields_max", function () { + on("change:shields_max change:ship_security change:ship_structure change:shields_bonus", function () { configure_shields(); }); @@ -841,7 +841,7 @@ count_shields(); }); - on("change:stress", function () { + on("change:stress" , function () { update_stress(); }); @@ -867,6 +867,87 @@ }); }); + // A Fix for Previous Numerical Values that didn't create right in v1.1 + var fixattr = function () { + getAttrs(["control", "fitness", "presence", "daring", "insight", "reason", "command", "security", "science", "conn", "engineering", "medicine", "ship_engines", "ship_computers", "ship_weapons", "ship_structure", "ship_sensors", "ship_comms", "ship_scale", "ship_command", "ship_security", "ship_science", "ship_conn", "ship_engineering", "ship_medicine"], function (v) { + if (v.control === "") { + setAttrs({"control": "1"}); + } + if (v.fitness === "") { + setAttrs({"fitness": "1"}); + } + if (v.presence === "") { + setAttrs({"presence": "1"}); + } + if (v.daring === "") { + setAttrs({"daring": "1"}); + } + if (v.insight === "") { + setAttrs({"insight": "1"}); + } + if (v.reason === "") { + setAttrs({"reason": "1"}); + } + if (v.command === "") { + setAttrs({"command": "0"}); + } + if (v.security === "") { + setAttrs({"security": "0"}); + } + if (v.science === "") { + setAttrs({"science": "0"}); + } + if (v.conn === "") { + setAttrs({"conn": "0"}); + } + if (v.engineering === "") { + setAttrs({"engineering": "0"}); + } + if (v.medicine === "") { + setAttrs({"medicine": "0"}); + } + if (v.ship_engines === "") { + setAttrs({"ship_engines": "1"}); + } + if (v.ship_computers === "") { + setAttrs({"ship_computers": "1"}); + } + if (v.ship_weapons === "") { + setAttrs({"ship_weapons": "1"}); + } + if (v.ship_structure === "") { + setAttrs({"ship_structure": "1"}); + } + if (v.ship_sensors === "") { + setAttrs({"ship_sensors": "1"}); + } + if (v.ship_comms === "") { + setAttrs({"ship_comms": "1"}); + } + if (v.ship_scale === "") { + setAttrs({"ship_scale": "1"}); + } + if (v.ship_command === "") { + setAttrs({"ship_command": "0"}); + } + if (v.ship_security === "") { + setAttrs({"ship_security": "0"}); + } + if (v.ship_science === "") { + setAttrs({"ship_science": "0"}); + } + if (v.ship_conn === "") { + setAttrs({"ship_conn": "0"}); + } + if (v.ship_engineering === "") { + setAttrs({"ship_engineering": "0"}); + } + if (v.ship_medicine === "") { + setAttrs({"ship_medicine": "0"}); + } + }); + }; + var configure_stress = function () { getAttrs(["fitness", "security", "stress_bonus"], function (v) { @@ -1005,7 +1086,8 @@ if (!v["version"] || v["version"] === "" ) { update_to_1_1(); } else { - setAttrs({"version": "1.1"}); + setAttrs({"version": "1.2"}); + setAttrs({"character_sheet": "Star Trek Adventures 2d20 version " + v.version}); console.log("Star Trek Adventures 2d20 version " + v.version); } }); @@ -1019,7 +1101,8 @@ update_dyanamic_weapon(v.wep1_name, v.wep1_dr, v.wep1_qualities); update_dyanamic_weapon(v.wep2_name, v.wep2_dr, v.wep2_qualities); update_dyanamic_weapon(v.wep3_name, v.wep3_dr, v.wep3_qualities); - setAttrs({"version": "1.1"}); + setAttrs({"version": "1.2"}); + setAttrs({"character_sheet": "Star Trek Adventures 2d20 version " + v.version }); console.log("Star Trek Adventures 2d20 version " + v.version); }); }; diff --git a/Star Trek Adventures 2d20/changelog.md b/Star Trek Adventures 2d20/changelog.md index a3b7b6faad..b3ff060018 100644 --- a/Star Trek Adventures 2d20/changelog.md +++ b/Star Trek Adventures 2d20/changelog.md @@ -2,6 +2,12 @@ The sheet will always upgrade itself unless I specify otherwise, though some things like roll template fields changing will require users who have added custom macros to fix. +## 1.2 + +### Bug Fixes + +* Cleaner calculation, removal of restrictions on fields (was interfering with NPCs), changed number fields to text fields to correct numbers not changing behavior. + ## 1.1 ### Features