Skip to content

Commit

Permalink
fix: missing ship-cargo weights and vehicle-shipping size (#1569)
Browse files Browse the repository at this point in the history
Some fixes per @Kepabar
* fix: missing cargo weights on ship
* fix: shippingSize on vehicle isn't saved
* fix: active Effects edit window has alignment issues
  • Loading branch information
marvin9257 authored May 26, 2024
1 parent d5cf5ba commit 3835487
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/module/data/vehicles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class VehicleData extends TwodsixVehicleBaseData {
schema.openVehicle = new fields.BooleanField({required: true, initial: false});
schema.traits = new fields.StringField({...requiredBlankString});
schema.weight = new fields.StringField({...requiredBlankString});

schema.shippingSize = new fields.StringField({...requiredBlankString});
return schema;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/module/sheets/TwodsixActorSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class TwodsixActorSheet extends AbstractTwodsixActorSheet {
width: 862,
height: 720,
resizable: true,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills"}],
tabs: [{navSelector: ".actor-sheet-tabs", contentSelector: ".sheet-body", initial: "skills"}],
scrollY: [".skills", ".inventory", ".finances", ".info", ".effects", ".actor-notes"],
dragDrop: [{dragSelector: ".item", dropSelector: null}]
});
Expand Down
2 changes: 1 addition & 1 deletion src/module/sheets/TwodsixShipSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class TwodsixShipSheet extends AbstractTwodsixActorSheet {
width: 825,
height: 686,
resizable: true,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "ship-positions"}],
tabs: [{navSelector: ".actor-sheet-tabs", contentSelector: ".sheet-body", initial: "ship-positions"}],
scrollY: [".ship-positions", ".ship-crew", ".ship-component", ".ship-storage", ".storage-wrapper", ".finances", ".ship-notes"],
dragDrop: [
//{dropSelector: ".ship-positions-list", dragSelector: ".drag"}, UNKNOWN NEED
Expand Down
12 changes: 8 additions & 4 deletions static/styles/twodsix.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ table tr:nth-child(even) {
margin: 8px 2%;
width: 96%;
}
.sheet nav.sheet-tabs {
.sheet nav.actor-sheet-tabs {
height: 100%;
/* flex: 0 0 23px !important; */
margin: 0 !important;
Expand Down Expand Up @@ -308,7 +308,7 @@ table tr:nth-child(even) {
overflow: hidden;
}

.sheet nav.sheet-tabs .item {
.sheet nav.actor-sheet-tabs .item {
padding: 2px;
/* border: none; */
/* border: solid 2px var(--s2d6-default-color); */
Expand Down Expand Up @@ -2848,6 +2848,10 @@ a.ship-crew-tab.active, a.ship-positions-tab.active , a.ship-storage-tab.active,
justify-content: space-evenly;
}

.cargo-weight span.ship-stat.centre {
margin-top: 0;
}

.cargo-list {
/*margin-top: 1.1em;*/
/* overflow-y: auto; */
Expand Down Expand Up @@ -3685,14 +3689,14 @@ div.app.window-app.minimized.twodsix.ship.actor header a.close {

/* TOKEN SHEET */

.token-sheet .sheet-tabs {
.token-sheet .actor-sheet-tabs {
flex: 0 0 32px;
border-bottom: 1px solid var(--s2d6-form-light);
line-height: 10px;
/*width: 32.5em;*/
}

.sheet-tabs {
.actor-sheet-tabs {
justify-content: space-around;
font-size: 2ch;
text-align: center;
Expand Down
6 changes: 3 additions & 3 deletions static/styles/twodsix_basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ svg:hover {
align-items: center;
}

.sheet nav.sheet-tabs{
.sheet nav.actor-sheet-tabs{
height: auto !important;
/* line-height: 100%; */
text-align: center;
Expand All @@ -1054,7 +1054,7 @@ svg:hover {
/* overflow: hidden; */
}

.sheet nav.sheet-tabs .item {
.sheet nav.actor-sheet-tabs .item {
padding: 2px;
}

Expand Down Expand Up @@ -2927,7 +2927,7 @@ div.app.window-app.twodsix.ship.actor header a.close {
*/
/* TOKEN SHEET */
/*
.token-sheet .sheet-tabs {
.token-sheet .actor-sheet-tabs {
flex: 0 0 32px;
border-bottom: 1px solid var(--form-light);
line-height: 28px !important;
Expand Down
2 changes: 1 addition & 1 deletion static/templates/actors/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{#unless limited}}
{{!-- Sheet Tab Navigation --}}
<div class="character-tabs">
<nav class="sheet-tabs tabs" data-group="primary">
<nav class="actor-sheet-tabs tabs" data-group="primary">
<a class="skill-tab" data-tab="skills" data-tooltip="{{localize 'TWODSIX.Actor.Tabs.SkillsTabTooltip'}}">{{localize "TWODSIX.Actor.Tabs.Skills"}}</a>
<a class="item-tab" data-tab="inventory" data-tooltip="{{localize 'TWODSIX.Actor.Tabs.InventoryTabTooltip'}}">{{localize "TWODSIX.Actor.Tabs.Inventory"}}</a>
<a class="finances-tab" data-tab="finances" data-tooltip="{{localize 'TWODSIX.Actor.Tabs.FinancesTabTooltip'}}">{{localize "TWODSIX.Actor.Tabs.Finances"}}</a>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/actors/ship-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{{/unless}}
{{!-- Sheet Tab Navigation --}}
<div class="ship-tabs">
<nav class="sheet-tabs tabs" data-group="primary">
<nav class="actor-sheet-tabs tabs" data-group="primary">
<a class="ship-positions-tab" data-tab="ship-positions"><i class="fa-solid fa-street-view"></i><br>{{localize "TWODSIX.Ship.Tabs.ShipPositions"}}</a>
<a class="ship-crew-tab" data-tab="ship-crew"><i class="fa-solid fa-users"></i><br>{{localize "TWODSIX.Ship.Tabs.Crew"}}</a>
<a class="ship-component-tab" data-tab="ship-component"><i class="fa-solid fa-gears"></i><br>{{localize "TWODSIX.Ship.Tabs.Components"}}</a>
Expand Down

0 comments on commit 3835487

Please sign in to comment.