Skip to content

Commit

Permalink
Merge pull request Xacus#194 from juanferrer/master
Browse files Browse the repository at this point in the history
4.2.1
  • Loading branch information
ClipplerBlood authored Jul 16, 2024
2 parents a6e53b4 + e600d97 commit 0a3b859
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 937 deletions.
6 changes: 3 additions & 3 deletions src/module/pixi/action-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class ActionTemplate extends MeasuredTemplate {
if (now - moveTime <= 20) return
const center = event.data.getLocalPosition(this.layer)
const interval = canvas.grid.type === CONST.GRID_TYPES.GRIDLESS ? 0 : 2
const snapped = canvas.grid.getSnappedPosition(center.x, center.y, interval)
const snapped = canvas.grid.getSnappedPoint(center, { mode: 1, resolution: interval })
await this.document.updateSource({x: snapped.x, y: snapped.y})
this.refresh()
this.autoTargeting()
Expand All @@ -118,7 +118,7 @@ export class ActionTemplate extends MeasuredTemplate {

// Confirm final snapped position
const interval = canvas.grid.type === CONST.GRID_TYPES.GRIDLESS ? 0 : 2
const destination = canvas.grid.getSnappedPosition(this.document.x, this.document.y, interval)
const destination = canvas.grid.getSnappedPoint(this.document, {mode: 1, resolution: interval})
await this.document.updateSource(destination)
const data = this.document.toObject()
this.autoTargeting()
Expand Down Expand Up @@ -159,7 +159,7 @@ export class ActionTemplate extends MeasuredTemplate {
x: token.x + x * gridSize - templatePos.x,
y: token.y + y * gridSize - templatePos.y,
}
const contains = this.shape.contains(currGrid.x, currGrid.y)
const contains = this.shape?.contains(currGrid.x, currGrid.y)
if (contains) return true
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/styles/components/actor-sheets/_aside-creature.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ form {
height: 40px;
background-image: url('../assets/ui/bloodstain.webp');
position: relative;
top: -14px;
top: -5px;
left: -7px;
}
}
Expand Down Expand Up @@ -155,5 +155,10 @@ form {
-ms-transform: translateX(116px);
transform: translateX(116px);
}

input:disabled + .slider:before {
content: '';
background-image: url('../assets/ui/bloodstain.webp');
}
}
}
240 changes: 0 additions & 240 deletions src/styles/components/actor-sheets/_body-character.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
.features {
.featureheader {
width: 100%;
font-size: 12px;
}

.items-list {
margin-right: 0;
}
Expand All @@ -19,172 +14,11 @@
}
}

.responsive-table {
padding: 0 10px 0 0;
margin: 0;

li {
display: flex;
}

.table-header {
margin-bottom: 4px;
height: 16px;
border-bottom: 1px solid var(--demonlord-red);
font-weight: bold;
font-family: 'IM Fell English SC', serif;
font-size: 10px;
text-transform: uppercase;
}

.table-row {
margin-bottom: 4px;
border-bottom: 1px solid #333;
}

.col-1 {
flex-basis: 60%;

.item-image {
float: left;
margin-right: 5px;
}

.spellinfo {
margin-top: 10px;
}
}

.col-2 {
flex-basis: 15%;
text-align: center;
}

.col-3 {
flex-basis: 12%;
text-align: right;
padding-right: 10px;
}

.col-4 {
flex-basis: 13%;
text-align: right;
font-size: 12px;

.item-wearoff {
color: #999;
}
}

@media all and (max-width: 100%) {
.table-header {
display: none;
}
.table-row {
}
li {
display: block;
}
.col {
flex-basis: 100%;
}
.col {
display: flex;

&:before {
padding-right: 10px;
content: attr(data-label);
flex-basis: 50%;
text-align: right;
}
}
}
}

.items-list {
list-style: none;
padding: 0;
margin: 5px 10px 20px 0;

.tradition-header {
margin-top: 15px;
font-weight: bold;
font-family: $font-header;
font-size: 13px;
}

.item-header {
height: 16px;
border-bottom: 1px solid var(--demonlord-red);
font-weight: bold;
font-family: $font-header;
font-size: 11px;
text-transform: uppercase;

.item-controls {
height: 0;
}

.weaponnameheader {
float: left;
width: 300px;
}

.damageheader {
float: left;
width: 70px;
margin-right: 10px;
}

.bonesbanesheader {
float: left;
width: 50px;
margin-right: 10px;
}

.spelltypeheader {
float: left;
width: 50px;
}

.spellcastingsheader {
float: left;
width: 50px;
}

.propertiesheader {
float: left;
width: 230px;
}

.defenseheader {
float: left;
width: 100px;
margin-right: 10px;
}

.itemname {
float: left;
margin-right: 15px;
}

.spellnameheader {
float: left;
width: 270px;
}

.traditionnameheader {
float: left;
width: 380px;
}

.item-inv {
float: right;
width: 50px;
height: 16px;
}
}

.item-list {
list-style: none;
margin: 0 0 20px 0;
Expand Down Expand Up @@ -274,13 +108,6 @@
width: 50px;
}

.bonesbanes {
float: left;
width: 50px;
margin-right: 10px;
padding-left: 5px;
}

.properties {
float: left;
width: 350px;
Expand Down Expand Up @@ -384,16 +211,6 @@
font-size: 11px;
margin-top: 10px;

.featurename {
height: 14px;
font-weight: bold;
}

.featurediscription {
width: 100%;
height: auto;
}

.item-controls {
float: right;
}
Expand Down Expand Up @@ -495,67 +312,10 @@
}
}

.listitems {
margin-top: -10px;
}

.colright .items-list {
margin-top: 0;
}

.professionslist,
.featureslist {
list-style: none;
margin: 0;
padding: 0;
overflow-y: auto;

.item,
.feature {
padding: 3px 0;
border-bottom: 1px solid #333;
font-size: 12px;

label {
font-weight: bold;
padding-right: 15px;
}

div {
margin-right: 15px;
}
}

.editprofession,
.editfeature {
height: 130px;

input {
margin-bottom: 5px;
}

textarea {
background: rgba(0, 0, 0, 0.1);
border: 0;
border-radius: 0;
font-family: 'Gelasio', 'Signika', Georgia, serif;
font-size: 12px;

&:focus,
&:hover {
background: rgba(0, 0, 0, 0.3);
}
}

.item-controls {
float: right;
width: 15px;
margin: 0;
margin-top: 1px;
}
}
}

.isPC {
float: right;
}
Expand Down
44 changes: 1 addition & 43 deletions src/styles/components/actor-sheets/_body-creature.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
width: 100%;
margin-top: 5px;

.grid,
.grid-2col {
.grid {
margin: 0 0 2px 0;
}
}
Expand Down Expand Up @@ -151,56 +150,15 @@
}
}

.credescription {
margin: -10px 0 0 0;
}

.items-list {
margin: 5px 10px 20px 0;

.item-header {
border: 0;
margin-top: 5px;
}

.feature {
font-size: 12px;

.featurename {
margin-bottom: -5px;
font-weight: bold;
}
}
}

.itemnamefull {
font-weight: bold;
}

.itemtext {
margin: -5px 10px 5px 10px;
}

.turnmode {
margin-top: 5px;
margin-left: 30px;
}

.hidesection {
float: right;
margin-left: 3px;
margin-top: 0;
font-family: 'Font Awesome 5 Free';

input.checkbox {
display: none;
}

input.checkbox + label:before {
content: '\f070';
}

input.checkbox:checked + label:before {
content: '\f06e';
}
}
Loading

0 comments on commit 0a3b859

Please sign in to comment.