Integrate changes from the Prof

Received as-is changes from the Prof.
This commit is contained in:
supervj 2021-05-21 14:58:11 -04:00
parent cacc43740e
commit b3344ba8b9
19 changed files with 490 additions and 30 deletions

View file

@ -187,6 +187,7 @@
"SW5E.BonusSaveForm": "Update Bonuses",
"SW5E.BonusTechPowerDC": "Global Tech Power DC Bonus",
"SW5E.BonusTitle": "Configure Actor Bonuses",
"SW5E.BurnFuel": "Burn",
"SW5E.CapacityMultiplier": "Capacity Multiplier",
"SW5E.CentStorageCapacity": "Central Storage Capacity",
"SW5E.ChallengeRating": "Challenge Rating",
@ -480,7 +481,9 @@
"SW5E.Flaws": "Flaws",
"SW5E.ForcePowerbook": "Force Powers",
"SW5E.Formula": "Formula",
"SW5E.FuelCapacity": "Fuel Capacity",
"SW5E.FuelCostsMod": "Fuel Costs Modifier",
"SW5E.FuelCostPerUnit": "Fuel Cost per Unit",
"SW5E.GrantedAbilities": "Granted Abilities",
"SW5E.HalfProficient": "Half Proficient",
"SW5E.HardpointSizeMod": "Hardpoint Size Modifier",
@ -868,6 +871,7 @@
"SW5E.RefittingRestResultHD": "{name} takes a refitting rest and recovers {dice} Hull Dice.",
"SW5E.RefittingRestResultHP": "{name} takes a refitting rest and recovers {health} Hull Points.",
"SW5E.RefittingRestResultHPHD": "{name} takes a refitting rest and recovers {health} Hull Points and {dice} Hull Dice.",
"SW5E.Refuel": "Refuel",
"SW5E.RegenerationRateCoefficient": "Regeneration Rate Coefficient",
"SW5E.RequiredMaterials": "Required Materials",
"SW5E.Requirements": "Requirements",

View file

@ -662,6 +662,77 @@
.editor {
padding: 0 8px;
}
.fuel {
flex: 0 0 12px;
background: #7a7971;
margin: 1px 15px 0 1px;
border: 1px solid #191813;
border-radius: 3px;
position: relative;
.fuel-bar {
position: absolute;
top: 1px;
left: 1px;
background: #6c8aa5;
height: 8px;
border: 1px solid #cde4ff;
border-radius: 2px;
}
.fuel-label {
height: 10px;
padding: 0 5px;
position: absolute;
top: 0;
right: 0;
font-size: 13px;
line-height: 12px;
text-align: right;
color: #EEE;
text-shadow: 0 0 5px #000;
}
.fuel-breakpoint {
display: block;
position: absolute;
}
.fuel-breakpoint.fuel-20 {
left: 20%;
}
.fuel-breakpoint.fuel-40 {
left: 40%;
}
.fuel-breakpoint.fuel-60 {
left: 60%;
}
.fuel-breakpoint.fuel-80 {
left: 80%;
}
.arrow-up {
bottom: 0;
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-bottom: 4px solid #000;
}
.arrow-down {
top: 0;
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid #000;
}
}
.fuel.fueled {
.arrow-up {
border-bottom: 4px solid #fff;
border-bottom: 4px solid #000;
}
.arrow-down {
border-top: 4px solid #fff;
border-top: 4px solid #000;
}
}
}
#actor-flags {

View file

@ -249,7 +249,45 @@
}
}
}
.panel.resources {
.traits {
.fuel-wrapper {
display: grid;
grid-template-columns: 300px 100px;
width: 400px;
justify-self: end;
.fuel-label {
font-size: 12px;
line-height: 14px;
width: 100%;
text-shadow: none;
padding: 0;
margin: 0;
height: auto;
text-align: center;
margin-left: -2px;
border-radius: 0 4px 4px 0;
}
.fuel {
position: relative;
border-radius: 4px;
height: 16px;
margin: 0;
width: 100%;
.fuel-bar {
position: absolute;
top: 0;
left: 0;
height: 100%;
border-radius: 4px;
border: none;
}
}
}
}
}
nav.sheet-navigation {
display: grid;
grid-template-columns: repeat(7, 1fr);
@ -1097,4 +1135,44 @@
}
}
}
input[type=range][orient=vertical] {
-webkit-appearance: slider-vertical;
width: 10px;
height: 60px !important;
padding: 0 0 !important;
background-color: #c40f0f !important;
box-sizing: border-box;
&::-webkit-slider-runnable-track {
-webkit-appearance: slider-vertical !important;
height: 60px !important;
width: 10px !important;
line-height: 60px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-top: 0 0 !important;
border-radius: 3px !important;
background: linear-gradient( to top, #c40f0f 50%, #0dce0d 50% );
}
&::-webkit-slider-thumb {
-webkit-appearance: none !important;
background-color: #c40f0f !important;
margin-right: -4px !important;
margin-top: 0px !important;
cursor: grab !important;
border-radius: 0 0 0 0 !important;
width: 10px !important;
height: 5px !important;
font-size: 10px;
}
}
output {
display: block;
margin: 5px auto;
font-size: 1.75em;
}
input {
.vertslider {
height: 60px;
}
}
}

View file

@ -34,6 +34,28 @@ body.dark-theme {
border: 1px solid @blockquoteBorder;
box-shadow: @blockquoteShadow;
}
.sw5e.sheet.actor {
.swalt-sheet {
.panel.resources {
.traits {
.fuel-wrapper {
.fuel-label {
background: #D6D6D6;
color: #1C1C1C;
border: 1px solid #1C1C1C;
}
.fuel {
background: #c40f0f;
.fuel-bar {
background: #0dce0d;
}
}
}
}
}
}
}
hr {
border-width: 0 0 1px 0;

View file

@ -34,6 +34,28 @@ body.light-theme {
border: 1px solid @blockquoteBorder;
box-shadow: @blockquoteShadow;
}
.sw5e.sheet.actor {
.swalt-sheet {
.panel.resources {
.traits {
.fuel-wrapper {
.fuel-label {
background: #D6D6D6;
color: #1C1C1C;
border: 1px solid #1C1C1C;
}
.fuel {
background: #c40f0f;
.fuel-bar {
background: #0dce0d;
}
}
}
}
}
}
}
hr {
border-width: 0 0 1px 0;

View file

@ -77,7 +77,11 @@ export default class Actor5e extends Actor {
// Inventory encumbrance
data.attributes.encumbrance = this._computeEncumbrance(actorData);
if (actorData.type === "starship") {
data.attributes.fuel = this._computeFuel(actorData);
}
// Prepare skills
this._prepareSkills(actorData, bonuses, checkBonus, originalSkills);
@ -647,8 +651,17 @@ export default class Actor5e extends Actor {
const pct = Math.clamped((weight * 100) / max, 0, 100);
return { value: weight.toNearest(0.1), max, pct, encumbered: pct > (2/3) };
}
/* -------------------------------------------- */
_computeFuel(actorData) {
let fuel = actorData.data.attributes.fuel.value;
// Compute Fuel percentage
fuel = fuel.toNearest(0.1);
const max = actorData.data.attributes.fuel.cap;
const pct = Math.clamped((fuel * 100) / max, 0, 100);
return { value: fuel.toNearest(0.1), max, pct, fueled: pct > 0 };
}
/* -------------------------------------------- */
/* Socket Listeners and Handlers
/* -------------------------------------------- */

View file

@ -17,6 +17,7 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
return mergeObject(super.defaultOptions, {
classes: ["sw5e", "sheet", "actor", "starship"],
width: 800,
height: 775,
tabs: [{
navSelector: ".root-tabs",
contentSelector: ".sheet-body",
@ -135,6 +136,7 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
activateListeners(html) {
super.activateListeners(html);
html.find(".health .rollable").click(this._onRollHPFormula.bind(this));
html.find('.refuel').click(this._onIncrementFuelLevel.bind(this));
}
/* -------------------------------------------- */
@ -153,4 +155,81 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
this.actor.update({"data.attributes.hp.value": hp, "data.attributes.hp.max": hp});
}
/* -------------------------------------------- */
/**
* Handle refueling a starship
* @param {Event} event The original click event
* @private
*/
_onIncrementFuelLevel(event) {
event.preventDefault();
const fuelcaparray = this.actor.data.effects.changes;
var fuelcappos = fuelcaparray.indexOf('fuel.cap');
const refuel = this.actor.data.effect.changes[fuelcappos].value;
this.actor.update({"data.attributes.fuel.value": refuel});
}
function engineSliderUpdate(num) {
var symbol;
var coefficient;
switch(num) {
case "0":
symbol = "↓";
coefficient = 0.5;
break;
case "1":
symbol = "=";
coefficient = 1;
break;
case "2":
symbol = "↑";
coefficient = 2;
};
let slideroutput = symbol;
document.querySelector('#engineslideroutput').value = slideroutput;
this.actor.update({"data.attributes.engpow": coefficient});
}
function shieldSliderUpdate(num) {
var symbol;
var coefficient;
switch(num) {
case "0":
symbol = "↓";
coefficient = 0.5;
break;
case "1":
symbol = "=";
coefficient = 1;
break;
case "2":
symbol = "↑";
coefficient = 2;
};
let slideroutput = symbol;
document.querySelector('#shieldslideroutput').value = slideroutput;
this.actor.update({"data.attributes.shieldpow": coefficient});
}
function weaponSliderUpdate(num) {
var symbol;
var coefficient;
switch(num) {
case "0":
symbol = "↓";
coefficient = 0.5;
break;
case "1":
symbol = "=";
coefficient = 1;
break;
case "2":
symbol = "↑";
coefficient = 2;
};
let slideroutput = symbol;
document.querySelector('#weaponslideroutput').value = slideroutput;
this.actor.update({"data.attributes.weaponpow": coefficient});
}
}

View file

@ -367,6 +367,7 @@ SW5E.movementTypes = {
"crawl": "SW5E.MovementCrawl",
"fly": "SW5E.MovementFly",
"roll": "SW5E.MovementRoll",
"space": "SW5E.MovementSpace",
"swim": "SW5E.MovementSwim",
"turn": "SW5E.MovementTurn",
"walk": "SW5E.MovementWalk",

View file

@ -52,7 +52,7 @@
{"name":"Traz","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"tool","data":{"description":{"value":"","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":6,"price":300,"attuned":false,"equipped":false,"rarity":"","identified":true,"ability":"int","chatFlavor":"","proficient":0,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Musical%20Instrument/Traz.webp","_id":"UQu4duMtxYEXKAbo"}
{"name":"Tent, two-person","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"loot","data":{"description":{"value":"","chat":"","unidentified":""},"source":"","quantity":1,"weight":5,"price":20,"attuned":false,"equipped":false,"rarity":"","identified":true,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{},"img":"systems/sw5e/packs/Icons/Utility/Tent.webp","_id":"UxL0trd3omeqzBk4"}
{"name":"Homing Beacon","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"loot","data":{"description":{"value":"<p>A homing beacon is a device used to track starships or any other entity being transported. Homing beacons transmit using non-mass HoloNet transceivers able to be tracked through hyperspace. Homing beacons are small enough that they can easily be hidden inside a ship, or tucked into some crevice on its exterior.</p>","chat":"","unidentified":""},"source":"","quantity":1,"weight":1,"price":450,"attuned":false,"equipped":false,"rarity":"","identified":true,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{},"img":"systems/sw5e/packs/Icons/Utility/Homing%20Beacon.webp","_id":"V2hSxkLfq461mvNz"}
{"name":"Power Cell","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"consumable","data":{"description":{"value":"<p>Power cells fuel blaster weapons that deal energy or ion damage. Additionally, power cells are used to energize certain tools.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":1,"price":10,"attuned":false,"equipped":false,"rarity":"","identified":true,"activation": {"type": "none","cost": null,"condition": ""},"duration": {"value": null,"units": ""},"target": {"value": null,"width": null,"units": "","type": ""},range":{"value": null,"long": null,"units": ""},"uses": {"value": 100,"max": "100","per": "charges","autoDestroy": false},"consume": {"type": "","target": "","amount": null},"ability": null,"actionType": "","attackBonus": 0,"chatFlavor": "","critical": null,"damage": {"parts": [],"versatile": ""},"formula": "","save": {"ability": "","dc": null,"scaling": "spell"},"consumableType": "ammo","attributes": {"spelldc": 10},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Ammunition/Power%20Cell.webp","_id":"VUkO1T2aYMuUcBZM"}
{"name":"Power Cell","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"consumable","data":{"description":{"value":"<p>Power cells fuel blaster weapons that deal energy or ion damage. Additionally, power cells are used to energize certain tools.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":1,"price":10,"attuned":false,"equipped":false,"rarity":"","identified":true,"activation":{"type":"","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":240,"max":240,"per":"charges","autoDestroy":false},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"consumableType":"ammo","attributes":{"spelldc":10}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Ammunition/Power%20Cell.webp","_id":"VUkO1T2aYMuUcBZM"}
{"name":"Propulsion pack","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"loot","data":{"description":{"value":"<p>Propulsion packs enhance underwater movement. Activating or deactivating the propulsion pack requires a bonus action and, while active, you have a swimming speed of 30 feet. The propulsion pack lasts for 1 minute per power cell (to a maximum of 10 minutes) and can be recharged by a power source or replacing the power cells.</p>","chat":"","unidentified":""},"source":"WH","quantity":1,"weight":20,"price":400,"attuned":false,"equipped":false,"rarity":"","identified":true,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{},"img":"systems/sw5e/packs/Icons/Weapon%20or%20Armor%20Accessory/Propulsion%20Pack.webp","_id":"XR1obpDj1PqDLfA8"}
{"name":"Emergency Battery","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"consumable","data":{"description":{"value":"<p>All non-expendable droids need recharging as they are used. The battery has ten uses. As an action, you can expend one use of the kit to stabilize a droid that has 0 hit points, without needing to make an Intelligence (Technology) check.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":5,"price":70,"attuned":false,"equipped":false,"rarity":"","identified":true,"activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":10,"max":10,"per":"charges","autoDestroy":true},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"Stabilize Droid","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"consumableType":"potion","attributes":{"spelldc":10}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Medical/Emergency%20Battery.webp","_id":"Z0YM3aYCyCRhL6cx"}
{"name":"Smugglepack","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"backpack","data":{"description":{"value":"<p>This backpack comes with a main compartment that can store up to 15 lb., not exceeding a volume of 1/2 cubic foot. Additionally, it has a hidden storage compartment that can hold up to 5 lb, not exceeding a volume of 1/4 cubic foot. Finding the hidden compartment requires a DC 15 Investigation check.</p>","chat":"","unidentified":""},"source":"WH","quantity":1,"weight":6,"price":400,"attuned":false,"equipped":false,"rarity":"","identified":true,"capacity":{"type":"weight","value":20,"weightless":false},"currency":{"cp":0,"sp":0,"ep":0,"gp":0,"pp":0},"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Storage/Smugglerpack.webp","_id":"Zlj5z56A4oVQ5iEC"}
@ -111,4 +111,3 @@
{"name":"Headcomm","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"loot","data":{"description":{"value":"<p>A headcomm can be installed in a helmet or worn independently. It functions as a hands-free commlink.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":1,"price":200,"attuned":false,"equipped":false,"rarity":"","identified":true,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{},"img":"systems/sw5e/packs/Icons/Communications/Headcomm.webp","_id":"zHERdLuCUPpxzaSJ"}
{"name":"Poisoner's Kit","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"tool","data":{"description":{"value":"<p>A poisoners kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":2,"price":500,"attuned":false,"equipped":false,"rarity":"","identified":true,"ability":"int","chatFlavor":"","proficient":0,"attributes":{"spelldc":10},"damage":{"parts":[]}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Kit/Poisoner_s%20Kit.webp","_id":"zaLzNlsfzRf71Xpl"}
{"name":"Mine, Plasma","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"weapon","data":{"description":{"value":"<p>When you use your action to set it, this mine sets an imperceptible laser line extending up to 15 feet. When the laser is tripped, the mine explodes, coating the area in a 15-foot radius around it in fire that burns for 1 minute. When a creature enters the fire or starts its turn there it must make a DC 13 Dexterity saving throw. On a failed save, the creature takes 2d6 fire damage, or half as much on a successful one. A construct makes this save with disadvantage.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":2,"price":550,"attuned":false,"equipped":false,"rarity":"","identified":true,"activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":15,"units":"ft","type":"radius"},"range":{"value":null,"long":null,"units":""},"uses":{"value":1,"max":1,"per":"charges"},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"dex","dc":13,"scaling":"flat"},"weaponType":"improv","properties":{"amm":false,"fin":false,"fir":false,"foc":false,"hvy":false,"lgt":false,"lod":false,"rch":false,"rel":false,"ret":false,"spc":false,"thr":false,"two":false,"ver":false},"proficient":false,"attributes":{"spelldc":10}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Explosive/Mine%2C%20Plasma.webp","_id":"zrSOUA8dUg9lHVdS"}
{"name":"Power Cell","permission":{"default":0,"vXYkFWX6qzvOu2jc":3},"type":"consumable","data":{"description":{"value":"<p>Power cells fuel blaster weapons that deal energy or ion damage. Additionally, power cells are used to energize certain tools.</p>","chat":"","unidentified":""},"source":"PHB","quantity":1,"weight":1,"price":10,"attuned":false,"equipped":false,"rarity":"","identified":true,"activation":{"type":"","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":240,"max":240,"per":"charges","autoDestroy":false},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"consumableType":"ammo","attributes":{"spelldc":10}},"flags":{"dynamiceffects":{"equipActive":false,"alwaysActive":false,"effects":[]}},"img":"systems/sw5e/packs/Icons/Ammunition/Power%20Cell.webp","_id":"VUkO1T2aYMuUcBZM"}

File diff suppressed because one or more lines are too long

View file

@ -794,3 +794,14 @@ body.dark-theme .sw5e.sheet.actor .swalt-sheet .tab.notes section > input {
body.dark-theme .sw5e.sheet.actor.npc .swalt-sheet header .experience {
color: #4f4f4f;
}
body.dark-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel-label {
background: #D6D6D6;
color: #1C1C1C;
border: 1px solid #1C1C1C;
}
body.dark-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel {
background: #c40f0f;
}
body.dark-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel .fuel-bar {
background: #0dce0d;
}

View file

@ -1727,3 +1727,78 @@ input[type="reset"]:disabled {
transform: rotate(360deg);
}
}
.sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper {
display: grid;
grid-template-columns: 300px 100px;
width: 400px;
justify-self: end;
}
.sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel-label {
font-size: 12px;
line-height: 14px;
width: 100%;
text-shadow: none;
padding: 0;
margin: 0;
height: auto;
text-align: center;
margin-left: -2px;
border-radius: 0 4px 4px 0;
}
.sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel {
position: relative;
border-radius: 4px;
height: 16px;
margin: 0;
width: 100%;
}
.sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel .fuel-bar {
position: absolute;
top: 0;
left: 0;
height: 100%;
border-radius: 4px;
border: none;
}
input[type=range][orient=vertical] {
-webkit-appearance: slider-vertical;
width: 10px;
height: 60px !important;
padding: 0 0 !important;
background-color: #c40f0f !important;
box-sizing: border-box;
}
input[type=range][orient=vertical]::-webkit-slider-runnable-track {
-webkit-appearance: slider-vertical !important;
height: 60px !important;
width: 10px !important;
line-height: 60px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-top: 0 0 !important;
border-radius: 3px !important;
background: linear-gradient(
to top,
#c40f0f 50%,
#0dce0d 50%
);
}
input[type=range][orient=vertical]::-webkit-slider-thumb {
-webkit-appearance: none !important;
background-color: #c40f0f !important;
margin-right: -4px !important;
margin-top: 0px !important;
cursor: grab !important;
border-radius: 0 0 0 0 !important;
width: 10px !important;
height: 5px !important;
font-size: 10px;
}
output {
display: block;
margin: 5px auto;
font-size:1.75em;
}
input .vertslider {
height: 60px;
}

View file

@ -781,3 +781,14 @@ body.light-theme .sw5e.sheet.actor .swalt-sheet .tab.notes section > input {
body.light-theme .sw5e.sheet.actor.npc .swalt-sheet header .experience {
color: #4f4f4f;
}
body.light-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel-label {
background: #D6D6D6;
color: #1C1C1C;
border: 1px solid #1C1C1C;
}
body.light-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel {
background: #c40f0f;
}
body.light-theme .sw5e.sheet.actor .swalt-sheet .panel.resources .traits .fuel-wrapper .fuel .fuel-bar {
background: #0dce0d;
}

View file

@ -426,6 +426,7 @@
list-style: none;
margin: 0;
padding: 0;
display: block;
}
.sw5e.sheet .items-list .item-name {
flex: 2;

View file

@ -277,6 +277,10 @@ Handlebars.registerHelper('getProperty', function (data, property) {
return getProperty(data, property);
});
Handlebars.registerHelper('round', function(value) {
return Math.floor(value);
});
function setFolderBackground(html) {
html.find("header.folder-header").each(function() {

View file

@ -440,6 +440,11 @@
"dr": 0,
"engpow": 1,
"exhaustion": 0,
"fuel": {
"cap": 0,
"cost": 0,
"value": 0
},
"hsm": 1,
"hull": {
"die": "",
@ -502,7 +507,7 @@
},
"details": {
"tier": 0,
"role": "",
"role": [],
"source": ""
},
"skills": {

View file

@ -53,10 +53,10 @@
<section class="attribute health" style="box-sizing: border-box; width: 150px;">
<h1 class="attribute-name rollable">{{ localize "SW5E.ShieldPoints" }}</h1>
<div class="attribute-value multiple">
<input name="data.attributes.hp.temp" type="text" value="{{data.attributes.hp.temp}}"
<input name="data.attributes.hp.temp" type="text" value="{{round data.attributes.hp.temp}}"
data-dtype="Number" placeholder="0" class="value-number" />
<span class="value-separator">/</span>
<input name="data.attributes.hp.tempmax" type="text" value="{{data.attributes.hp.tempmax}}"
<input name="data.attributes.hp.tempmax" type="text" value="{{round data.attributes.hp.tempmax}}"
data-dtype="Number" placeholder="0" class="value-number" />
</div>
<footer class="attribute-footer" style="line-height: 12px; height: 12px; text-align: center; font-family: 'Russo One';">
@ -140,7 +140,10 @@
<section class="panel resources">
<h1>Resources and Traits</h1>
<div class="traits">
<!-- <label>
<table style="border: none; background: none;">
<tr>
<td>
<!-- <label>
{{localize "SW5E.Size"}}
<select class="actor-size" name="data.traits.size">
{{#select data.traits.size}}
@ -163,27 +166,79 @@
</select>
</label>
<br /> -->
<label>
{{localize "SW5E.DmgRed"}}: <input class="hpformula" style="max-width:30px;" name="data.attributes.dr" value="{{data.attributes.dr}}" placeholder="0" />
</label>
<label>
{{localize "SW5E.VehicleCargoCapacity"}}: {{data.attributes.cargcap}} tons
</label>
<br />
<label>
{{localize "SW5E.CrewCap"}}: {{data.attributes.crewcap}}
</label>
<br />
<label>
{{localize "SW5E.DmgRed"}}: <input class="hpformula" style="max-width:30px;" name="data.attributes.dr" value="{{data.attributes.dr}}" placeholder="0" />
</label>
<label>
{{localize "SW5E.VehicleCargoCapacity"}}: {{data.attributes.cargcap}} tons
</label>
</td>
<td>
<label>
{{localize "SW5E.CrewCap"}}: {{data.attributes.crewcap}}
</label>
</td>
</tr>
<tr>
<td>
<label>
{{localize "SW5E.FuelCostPerUnit"}}: {{data.attributes.fuel.cost}} cr/unit
</label>
</td>
<td>
<button type="button" class="rest long-rest burnfuel" style="width:40%;" title="Burn 1 Unit of Fuel">{{ localize "SW5E.BurnFuel" }}</button>&nbsp;&nbsp;
<button type="button" class="rest long-rest refuel" style="width:40%;" title="Refuel">{{ localize "SW5E.Refuel" }}</button>
</td>
</tr>
</table>
<label>
{{localize "SW5E.FuelCapacity"}}
</label>
{{#with data.attributes.fuel}}
<div class="fuel-wrapper" title="Fuel">
<div class="fuel {{#if fueled}}fueled{{/if}}">
<span class="fuel-bar" style="width:{{pct}}%"></span>
<i class="fuel-breakpoint fuel-20 arrow-up"></i>
<i class="fuel-breakpoint fuel-20 arrow-down"></i>
<i class="fuel-breakpoint fuel-40 arrow-up"></i>
<i class="fuel-breakpoint fuel-40 arrow-down"></i>
<i class="fuel-breakpoint fuel-60 arrow-up"></i>
<i class="fuel-breakpoint fuel-60 arrow-down"></i>
<i class="fuel-breakpoint fuel-80 arrow-up"></i>
<i class="fuel-breakpoint fuel-80 arrow-down"></i>
</div>
<span class="fuel-label">{{value}} / {{cap}} units</span>
</div>
{{/with}}
<!-- <label>
{{localize "SW5E.CentStorageCapacity"}}: <input class="hpformula" style="max-width:30px;" name="data.attributes.cscap" value="{{data.attributes.cscap}}" placeholder="0" />
</label>
<label>
{{localize "SW5E.SysStorageCapacity"}}: <input class="hpformula" style="max-width:30px;" name="data.attributes.sscap" value="{{data.attributes.sscap}}" placeholder="0" />
</label> -->
</div>
<h1>{{localize "SW5E.PowerRouting"}}</h1>
<div class="traits">
<label>
</div>
<h1>{{localize "SW5E.PowerRouting"}}</h1>
<div class="traits">
<table style="border:none;">
<tr>
<td align="center"><strong>{{localize "SW5E.EnginePl"}}</strong></td>
<td rowspan=3><input type="range" orient="vertical" id="engineslidervalue" class="vertslider" value="1" step="1" min="0" max="2" oninput="engineSliderUpdate(value)"></td>
<td align="center"><strong>{{localize "SW5E.EquipmentShieldProficiency"}}</strong></td>
<td rowspan=3><input type="range" orient="vertical" id="shieldslidervalue" class="vertslider" value="1" step="1" min="0" max="2" oninput="shieldSliderUpdate(value)"></td>
<td align="center"><strong>{{localize "SW5E.ItemTypeWeaponPl"}}</strong></td>
<td rowspan=3><input type="range" orient="vertical" id="weaponslidervalue" class="vertslider" value="1" step="1" min="0" max="2" oninput="weaponSliderUpdate(value)"></td>
</tr>
<tr>
<td rowspan=2 align="center"><strong><output for=value id="engineslideroutput">=</output></td>
<td rowspan=2 align="center"><strong><output for=value id="shieldslideroutput">=</output></td>
<td rowspan=2 align="center"><strong><output for=value id="weaponslideroutput">=</output></td>
</tr>
<tr></tr>
</table>
<!-- <label>
{{localize "SW5E.EnginePl"}}:
<select name="data.attributes.engpow">
{{#select data.attributes.engpow}}
@ -213,7 +268,7 @@
{{/select}}
</select>
</label>
<br />
<br /> -->
<table style="border: none; width: 400px;">
<tr><th colspan=3 align="left">{{localize "SW5E.PowerDieAlloc"}}</th><th colspan=3 align="right">
{{localize "SW5E.PowerDie"}}:
@ -273,7 +328,10 @@
<label>
{{localize "SW5E.HardpointSizeMod"}}: {{data.attributes.hsm}}
</label>
</div>
<label>
{{localize "SW5E.DmgRed"}}: {{data.attributes.dr}}
</label>
</div>
</section>
</section>
{{!-- Cargo & Crew --}}

View file

@ -24,6 +24,10 @@
<label>{{localize "SW5E.MovementRoll"}}</label>
<input name="data.attributes.movement.roll" type="number" step="0.1" value="{{movement.roll}}"/>
</div>
<div class="form-group">
<label>{{localize "SW5E.MovementSpace"}}</label>
<input name="data.attributes.movement.space" type="number" step="0.1" value="{{movement.space}}"/>
</div>
<div class="form-group">
<label>{{localize "SW5E.MovementSwim"}}</label>
<input name="data.attributes.movement.swim" type="number" step="0.1" value="{{movement.swim}}"/>

View file

@ -98,11 +98,11 @@
<div class="form-group" style="width: 60%;">
<strong style="color:#4b4a44; font-size: 11px">{{ localize "SW5E.CapacityMultiplier" }}</strong>
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.capx.value" value="{{data.capx.value}}" /> &nbsp;&nbsp;
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.attributes.shld.capx" value="{{data.attributes.shld.capx}}" /> &nbsp;&nbsp;
<strong style="color:#4b4a44; font-size: 11px;">{{ localize "SW5E.DmgRed" }}</strong>
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.attributes.dr" value="{{data.attributes.dr}}" /> &nbsp;&nbsp;
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.attributes.dmgred" value="{{data.attributes.dmgred}}" /> &nbsp;&nbsp;
<strong style="color:#4b4a44; font-size: 11px;">{{ localize "SW5E.RegenerationRateCoefficient" }}</strong>
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.regrateco.value" value="{{data.regrateco.value}}" /> &nbsp;&nbsp;
<input style="min-width: 5px; max-width: 35px; padding: none;" type="text" name="data.attributes.shld.regrateco" value="{{data.attributes.shld.regrateco}}" /> &nbsp;&nbsp;
</div>
{{!-- Starship Equipment Properties --}}