Finishing the Sync sheet and some other stuffs

This commit is contained in:
Oliver-Akins 2023-12-21 23:59:38 -07:00
parent a28718b115
commit 554fae5a93
26 changed files with 494 additions and 105 deletions

59
.styles/generic.css Normal file
View file

@ -0,0 +1,59 @@
@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap");
.dotdungeon > .window-content ::-webkit-scrollbar {
width: 10px;
}
.dotdungeon > .window-content ::-webkit-scrollbar-thumb {
border-radius: 5px;
}
.dotdungeon > .window-content h2, .dotdungeon > .window-content h3, .dotdungeon > .window-content h4, .dotdungeon > .window-content h5, .dotdungeon > .window-content h6 {
all: initial;
display: block;
box-sizing: border-box;
font-family: "Pixelify Sans", sans-serif;
margin: 0;
}
.dotdungeon > .window-content label {
cursor: pointer;
}
.dotdungeon > .window-content button, .dotdungeon > .window-content button:hover {
all: initial;
display: block;
box-sizing: border-box;
font-family: inherit;
cursor: pointer;
}
.dotdungeon > .window-content input[type=text],
.dotdungeon > .window-content input[type=number],
.dotdungeon > .window-content textarea {
padding: 5px 7px;
border-width: 2px;
border-radius: 4px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.1);
font-family: sans-serif;
}
.dotdungeon > .window-content input[type=text]:focus, .dotdungeon > .window-content input[type=text]:active,
.dotdungeon > .window-content input[type=number]:focus,
.dotdungeon > .window-content input[type=number]:active,
.dotdungeon > .window-content textarea:focus,
.dotdungeon > .window-content textarea:active {
border-color: rgb(0, 0, 0);
}
.dotdungeon > .window-content select, .dotdungeon > .window-content select:hover {
cursor: pointer;
}
.dotdungeon > .window-content .debug-data {
opacity: 60%;
font-family: sans-serif;
}
.dotdungeon {
container-type: size;
}
.dotdungeon > .window-content {
padding: 0;
background: #f2f2f2;
}
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../styles/generic.scss%22,%22../styles/mixins/_foundry.scss%22,%22../styles/_vars.scss%22,%22../styles/mixins/_partials.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAIQ;AAKP;EACC;;AAED;EACC;;AAGD;ECfA;EACA;EACA;EDeC,aElBW;EFmBX;;AAGD;EACC;;AAGD;ECzBA;EACA;EACA;EDyBC;EACA;;AAGD;AAAA;AAAA;EAGC;EGhCD;EACA;EACA;EACA;EACA;EACA,aDPW;;ACSX;AAAA;AAAA;AAAA;AAAA;EAEC;;AH2BD;EACC;;AAGD;EACC;EACA,aE5CU;;;AFiDZ;EACC;;AAEA;EACC;EACA,YEpDW%22,%22file%22:%22generic.css%22%7D */

View file

@ -9,12 +9,10 @@
all: initial; all: initial;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
display: block;
font-family: "Pixelify Sans", sans-serif; font-family: "Pixelify Sans", sans-serif;
margin: 0; margin: 0;
} }
.dotdungeon > .window-content label { .dotdungeon > .window-content label {
display: inline-block;
cursor: pointer; cursor: pointer;
} }
.dotdungeon > .window-content button, .dotdungeon > .window-content button:hover { .dotdungeon > .window-content button, .dotdungeon > .window-content button:hover {
@ -27,9 +25,6 @@
.dotdungeon > .window-content input[type=text], .dotdungeon > .window-content input[type=text],
.dotdungeon > .window-content input[type=number], .dotdungeon > .window-content input[type=number],
.dotdungeon > .window-content textarea { .dotdungeon > .window-content textarea {
all: initial;
display: block;
box-sizing: border-box;
padding: 5px 7px; padding: 5px 7px;
border-width: 2px; border-width: 2px;
border-radius: 4px; border-radius: 4px;
@ -95,7 +90,6 @@
} }
.dotdungeon .panel__header { .dotdungeon .panel__header {
background: black; background: black;
color: white;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
@ -107,7 +101,7 @@
all: initial; all: initial;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
color: inherit; color: white;
flex-grow: 1; flex-grow: 1;
font-family: "Pixelify Sans", sans-serif; font-family: "Pixelify Sans", sans-serif;
font-size: 20px; font-size: 20px;
@ -186,6 +180,10 @@
.dotdungeon .actor--pc .panel--sync .sync__header { .dotdungeon .actor--pc .panel--sync .sync__header {
flex-grow: 1; flex-grow: 1;
} }
.dotdungeon .actor--pc .panel--sync .sync__input {
width: 80px;
margin: 3px 5px;
}
.dotdungeon .actor--pc .panel--aspect { .dotdungeon .actor--pc .panel--aspect {
grid-area: aspect; grid-area: aspect;
} }
@ -241,6 +239,37 @@
flex-direction: column; flex-direction: column;
} }
} }
.dotdungeon .actor--circle-sync {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 4px;
}
.dotdungeon .actor--circle-sync label {
display: flex;
flex-direction: column;
align-items: center;
}
.dotdungeon .actor--circle-sync .sync-input {
width: 30%;
text-align: center;
}
.dotdungeon .actor--circle-sync .name-input {
width: 60%;
text-align: center;
}
.dotdungeon--sync-sheet header .configure-token {
display: none;
visibility: hidden;
}
@container (max-width: 300px) {
.dotdungeon--sync-sheet header .configure-sheet {
display: none;
visibility: hidden;
}
}
.dotdungeon .item--aspect { .dotdungeon .item--aspect {
padding: 4px; padding: 4px;
} }
@ -254,4 +283,4 @@
resize: vertical; resize: vertical;
} }
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../styles/root.scss%22,%22../styles/mixins/_foundry.scss%22,%22../styles/_vars.scss%22,%22../styles/mixins/_partials.scss%22,%22../styles/sheets/partials/stat.scss%22,%22../styles/sheets/partials/skill.scss%22,%22../styles/sheets/partials/panel.scss%22,%22../styles/mixins/_breakpoints.scss%22,%22../styles/sheets/actor/mvp.scss%22,%22../styles/sheets/items/aspect.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAIQ;AAKP;EACC;;AAED;EACC;;AAGD;ECfA;EACA;EACA;EDeC;EACA,aEnBW;EFoBX;;AAGD;EACC;EACA;;AAGD;EC3BA;EACA;EACA;ED2BC;EACA;;AAGD;AAAA;AAAA;ECjCA;EACA;EACA;EDmCC;EGnCD;EACA;EACA;EACA;EACA;EACA,aDPW;;ACSX;AAAA;AAAA;AAAA;AAAA;EAEC;;AH8BD;EACC;;AAGD;EACC;EACA,aE/CU;;;AFoDZ;EACC;;AAEA;EACC;EACA,YEvDW;;;AEHb;EACC;EACA;EACA;;ACHD;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;;ACdH;EACC;EACA;EAEA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ELpBD;EACA;EACA;EKoBE;EACA;EACA,aJzBU;EI0BV;;AAGD;EAEC,QADO;EAEP,OAFO;EAGP;;AAIF;EACC;;;AC/BD;EDoCA;IACC;IACA;;;AE1CF;EACC;EACA,qBACC;EASD;EACA,oBACC;EAGD;EACA;;AAGC;EACC;;AACA;EACC;EACA;;AAGD;EACC;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAEA;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;;AAEA;AAAA;EACC;;AAIH;EACC;;AACA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;;ADvGF;EC+GC;IACC;IACA;IACA,qBACC;;EAgBD;IACC;;EAGC;IACC;;EAKD;IACC;IACA;;;ADzIL;ECmJC;IACC;IACA;IACA,qBACC;;EAeC;IACC;;;AC5KN;EACC;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA%22,%22file%22:%22root.css%22%7D */ /*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../styles/generic.scss%22,%22../styles/mixins/_foundry.scss%22,%22../styles/_vars.scss%22,%22../styles/mixins/_partials.scss%22,%22../styles/sheets/partials/stat.scss%22,%22../styles/sheets/partials/skill.scss%22,%22../styles/sheets/partials/panel.scss%22,%22../styles/mixins/_breakpoints.scss%22,%22../styles/sheets/actor/mvp.scss%22,%22../styles/sheets/actor/sync/basic.scss%22,%22../styles/sheets/items/aspect.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAIQ;AAKP;EACC;;AAED;EACC;;AAGD;ECfA;EACA;EACA;EDeC,aElBW;EFmBX;;AAGD;EACC;;AAGD;ECzBA;EACA;EACA;EDyBC;EACA;;AAGD;AAAA;AAAA;EAGC;EGhCD;EACA;EACA;EACA;EACA;EACA,aDPW;;ACSX;AAAA;AAAA;AAAA;AAAA;EAEC;;AH2BD;EACC;;AAGD;EACC;EACA,aE5CU;;;AFiDZ;EACC;;AAEA;EACC;EACA,YEpDW;;;AEHb;EACC;EACA;EACA;;ACHD;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;;ACdH;EACC;EACA;EAEA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ELnBD;EACA;EACA;EKmBE;EACA;EACA,aJxBU;EIyBV;;AAGD;EAEC,QADO;EAEP,OAFO;EAGP;;AAIF;EACC;;;AC9BD;EDmCA;IACC;IACA;;;AEzCF;EACC;EACA,qBACC;EASD;EACA,oBACC;EAGD;EACA;;AAGC;EACC;;AACA;EACC;EACA;;AAGD;EACC;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAEA;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;;AAEA;AAAA;EACC;;AAIF;EACC;EACA;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;;AD5GF;ECoHC;IACC;IACA;IACA,qBACC;;EAgBD;IACC;;EAGC;IACC;;EAKD;IACC;IACA;;;AD9IL;ECwJC;IACC;IACA;IACA,qBACC;;EAeC;IACC;;;AChLL;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAMA;EACC;EACA;;;AFlBH;EE4BG;IACC;IACA;;;ACzCL;EACC;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA%22,%22file%22:%22root.css%22%7D */

View file

@ -57,6 +57,10 @@
.dotdungeon .actor--pc .panel--sync .sync__header { .dotdungeon .actor--pc .panel--sync .sync__header {
flex-grow: 1; flex-grow: 1;
} }
.dotdungeon .actor--pc .panel--sync .sync__input {
width: 80px;
margin: 3px 5px;
}
.dotdungeon .actor--pc .panel--aspect { .dotdungeon .actor--pc .panel--aspect {
grid-area: aspect; grid-area: aspect;
} }
@ -113,4 +117,4 @@
} }
} }
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../styles/sheets/actor/mvp.scss%22,%22../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAGA;EACC;EACA,qBACC;EASD;EACA,oBACC;EAGD;EACA;;AAGC;EACC;;AACA;EACC;EACA;;AAGD;EACC;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAEA;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;;AAEA;AAAA;EACC;;AAIH;EACC;;AACA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;;ACvGF;ED+GC;IACC;IACA;IACA,qBACC;;EAgBD;IACC;;EAGC;IACC;;EAKD;IACC;IACA;;;ACzIL;EDmJC;IACC;IACA;IACA,qBACC;;EAeC;IACC%22,%22file%22:%22mvp.css%22%7D */ /*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../styles/sheets/actor/mvp.scss%22,%22../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAGA;EACC;EACA,qBACC;EASD;EACA,oBACC;EAGD;EACA;;AAGC;EACC;;AACA;EACC;EACA;;AAGD;EACC;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAEA;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;;AAEA;AAAA;EACC;;AAIF;EACC;EACA;;AAGF;EACC;;AACA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;;;AC5GF;EDoHC;IACC;IACA;IACA,qBACC;;EAgBD;IACC;;EAGC;IACC;;EAKD;IACC;IACA;;;AC9IL;EDwJC;IACC;IACA;IACA,qBACC;;EAeC;IACC%22,%22file%22:%22mvp.css%22%7D */

View file

@ -0,0 +1,19 @@
.dotdungeon .actor--sync {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.dotdungeon .actor--sync .sync-input {
width: 30%;
text-align: center;
}
@container (max-width: 400px) {
.dotdungeon--sync-sheet header .configure-sheet,
.dotdungeon--sync-sheet header .configure-token {
display: none;
}
}
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../styles/sheets/actor/sync.scss%22,%22../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAGC;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;;;ACJF;EDaG;AAAA;IAEC%22,%22file%22:%22sync.css%22%7D */

View file

@ -0,0 +1,33 @@
.dotdungeon .actor--circle-sync {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 4px;
}
.dotdungeon .actor--circle-sync label {
display: flex;
flex-direction: column;
align-items: center;
}
.dotdungeon .actor--circle-sync .sync-input {
width: 30%;
text-align: center;
}
.dotdungeon .actor--circle-sync .name-input {
width: 60%;
text-align: center;
}
.dotdungeon--sync-sheet header .configure-token {
display: none;
visibility: hidden;
}
@container (max-width: 300px) {
.dotdungeon--sync-sheet header .configure-sheet {
display: none;
visibility: hidden;
}
}
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../../styles/sheets/actor/sync/basic.scss%22,%22../../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAGC;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAMA;EACC;EACA;;;AClBH;ED4BG;IACC;IACA%22,%22file%22:%22basic.css%22%7D */

View file

@ -6,7 +6,6 @@
} }
.dotdungeon .panel__header { .dotdungeon .panel__header {
background: black; background: black;
color: white;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
@ -18,7 +17,7 @@
all: initial; all: initial;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
color: inherit; color: white;
flex-grow: 1; flex-grow: 1;
font-family: "Pixelify Sans", sans-serif; font-family: "Pixelify Sans", sans-serif;
font-size: 20px; font-size: 20px;
@ -39,4 +38,4 @@
} }
} }
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../styles/sheets/partials/panel.scss%22,%22../../../styles/mixins/_foundry.scss%22,%22../../../styles/_vars.scss%22,%22../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAIA;EACC;EACA;EAEA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ECpBD;EACA;EACA;EDoBE;EACA;EACA,aEzBU;EF0BV;;AAGD;EAEC,QADO;EAEP,OAFO;EAGP;;AAIF;EACC;;;AG/BD;EHoCA;IACC;IACA%22,%22file%22:%22panel.css%22%7D */ /*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../../../styles/sheets/partials/panel.scss%22,%22../../../styles/mixins/_foundry.scss%22,%22../../../styles/_vars.scss%22,%22../../../styles/mixins/_breakpoints.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAIA;EACC;EACA;EAEA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ECnBD;EACA;EACA;EDmBE;EACA;EACA,aExBU;EFyBV;;AAGD;EAEC,QADO;EAEP,OAFO;EAGP;;AAIF;EACC;;;AG9BD;EHmCA;IACC;IACA%22,%22file%22:%22panel.css%22%7D */

View file

@ -1,12 +1,20 @@
{ {
"dotdungeon.settings.showAvatarOnSheet.name": "Show Avatar On Player Sheet", "dotdungeon.settings.showAvatarOnSheet.name": "Show Avatar On Player Sheet",
"dotdungeon.settings.showAvatarOnSheet.description": "Determines whether or not to show the avatar to you on the Player Character sheets, turning this off will replace the image with a file picker so that you can still change the image from the character sheet.", "dotdungeon.settings.showAvatarOnSheet.description": "Determines whether or not to show the avatar to you on the Player Character sheets, turning this off will replace the image with a file picker so that you can still change the image from the character sheet.",
"dotdungeon.settings.playersCanChangeGroup.name": "Allow Players to Change Group",
"dotdungeon.settings.playersCanChangeGroup.description": "Setting this to true allows non-GM players to modify the group that the Actor belongs to. While this is disabled the GM will still be able to modify each player's group by editing the character sheet.",
"dotdungeon.settings.resourcesOrSupplies.name": "Use Resources or Supplies",
"dotdungeon.settings.resourcesOrSupplies.description": "Determines which term to use for the objects that allow travelling into the next hex tile. This is because of the",
"dotdungeon.settings.resourcesOrSupplies.option.supplies": "Resources",
"dotdungeon.settings.resourcesOrSupplies.option.resources": "Supplies",
"dotdungeon.sheet.PlayerSheet": "PC Sheet", "dotdungeon.sheet.PlayerSheet": "PC/PUG Sheet",
"dotdungeon.sheet.SyncSheet.basic": "Theme: Basic",
"dotdungeon.sheet.AspectSheet": "Aspect Sheet", "dotdungeon.sheet.AspectSheet": "Aspect Sheet",
"TYPES.Actor.player": "Player", "TYPES.Actor.player": "Player",
"TYPES.Actor.sync": "Sync",
"TYPES.Item.aspect": "Aspect", "TYPES.Item.aspect": "Aspect",
"TYPES.Item.weapon": "Weapon", "TYPES.Item.weapon": "Weapon",
"TYPES.Item.armour": "Armour", "TYPES.Item.armour": "Armour",
@ -68,20 +76,29 @@
"dotdungeon.actor.pc.skill.piloting": "Piloting", "dotdungeon.actor.pc.skill.piloting": "Piloting",
"dotdungeon.actor.pc.respawns.header": "Respawns", "dotdungeon.actor.pc.respawns.header": "Respawns",
"dotdungeon.actor.pc.sync.header": "Sync",
"dotdungeon.actor.pc.profile.avatar.label": "Avatar", "dotdungeon.actor.pc.profile.avatar.label": "Avatar",
"dotdungeon.actor.pc.profile.group.label": "Group Name", "dotdungeon.actor.pc.profile.group.label": "Group Name",
"dotdungeon.actor.pc.profile.group.gm-edit": "(GM Only)",
"dotdungeon.actor.pc.profile.group.placeholder": "Group Name...", "dotdungeon.actor.pc.profile.group.placeholder": "Group Name...",
"dotdungeon.actor.pc.profile.name.label": "Character Name", "dotdungeon.actor.pc.profile.name.label": "Character Name",
"dotdungeon.actor.pc.profile.name.placeholder": "Character Name...", "dotdungeon.actor.pc.profile.name.placeholder": "Character Name...",
"dotdungeon.actor.sync.circle.group": "Group Name",
"dotdungeon.actor.sync.circle.sync": "Sync",
"dotdungeon.item.aspect.name": "Name", "dotdungeon.item.aspect.name": "Name",
"dotdungeon.item.aspect.duration": "Duration (seconds)", "dotdungeon.item.aspect.duration": "Duration (seconds)",
"dotdungeon.item.aspect.description": "Description", "dotdungeon.item.aspect.description": "Description",
"dotdungeon.item.aspect.send-to-chat": "Send Aspect to Chat", "dotdungeon.item.aspect.send-to-chat": "Send Aspect to Chat",
"dotdungeon.notification.error.invalid-integer": "You must enter a valid whole number.",
"dotdungeon.aria.skill.dropdown": "Your expertise level in the {skill} skill", "dotdungeon.aria.skill.dropdown": "Your expertise level in the {skill} skill",
"dotdungeon.aria.skill.button.roll": "Roll a {skill} check", "dotdungeon.aria.skill.button.roll": "Roll a {skill} check",
"dotdungeon.aria.aspect-description": "The information on how the aspect works" "dotdungeon.aria.aspect-description": "The information on how the aspect works"

View file

@ -1,6 +1,7 @@
// Data Models // Data Models
import { AspectItemData } from "./models/AspectItemData.mjs"; import { AspectItemData } from "./models/AspectItemData.mjs";
import { PlayerData } from "./models/PlayerData.mjs"; import { PlayerData } from "./models/PlayerData.mjs";
import { SyncData } from "./models/SyncData.mjs";
// Main Documents // Main Documents
import { PlayerActor } from "./documents/PlayerActor.mjs"; import { PlayerActor } from "./documents/PlayerActor.mjs";
@ -9,7 +10,7 @@ import { AspectItem } from "./documents/AspectItem.mjs";
// Character Sheets // Character Sheets
import { AspectSheet } from "./sheets/AspectSheet.mjs"; import { AspectSheet } from "./sheets/AspectSheet.mjs";
import { PlayerSheet } from "./sheets/PlayerSheet.mjs"; import { PlayerSheet } from "./sheets/PlayerSheet.mjs";
import { BasicSyncSheet } from "./sheets/SyncVariations/BasicSyncSheet.mjs";
// Utility imports // Utility imports
import * as hbs from "./handlebars.mjs"; import * as hbs from "./handlebars.mjs";
@ -17,7 +18,6 @@ import * as hbs from "./handlebars.mjs";
// Non-Setup hooks // Non-Setup hooks
import "./hooks/hotReload.mjs"; import "./hooks/hotReload.mjs";
// Misc Imports // Misc Imports
import loadSettings from "./settings/index.mjs"; import loadSettings from "./settings/index.mjs";
@ -32,12 +32,26 @@ Hooks.once(`init`, () => {
AspectItem, AspectItem,
}; };
CONFIG.Actor.dataModels.player = PlayerData; CONFIG.Actor.dataModels.player = PlayerData;
CONFIG.Actor.dataModels.sync = SyncData;
CONFIG.Item.dataModels.aspect = AspectItemData; CONFIG.Item.dataModels.aspect = AspectItemData;
Actors.unregisterSheet("core", ActorSheet); Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("dotdungeon.sheet", PlayerSheet, { makeDefault: true }); Actors.registerSheet("dotdungeon", PlayerSheet, {
makeDefault: true,
types: ["player"],
label: "dotdungeon.sheet.PlayerSheet"
});
Actors.registerSheet("dotdungeon", BasicSyncSheet, {
makeDefault: true,
types: ["sync"],
label: "dotdungeon.sheet.SyncSheet.basic"
});
Items.registerSheet("dotdungeon.sheet", AspectSheet, { makeDefault: true }); Items.registerSheet("dotdungeon", AspectSheet, {
makeDefault: true,
types: ["aspect"],
label: "dotdungeon.sheet.AspectSheet"
});
hbs.registerHandlebarsHelpers(); hbs.registerHandlebarsHelpers();
hbs.preloadHandlebarsTemplates(); hbs.preloadHandlebarsTemplates();

View file

@ -1,4 +1,3 @@
import { reloadWindows } from "../utils.mjs";
import * as hbs from "../handlebars.mjs"; import * as hbs from "../handlebars.mjs";
Hooks.on(`hotReload`, async (data) => { Hooks.on(`hotReload`, async (data) => {
@ -25,7 +24,9 @@ Hooks.on(`hotReload`, async (data) => {
_templateCache[templateName] = template; _templateCache[templateName] = template;
// Re-render open windows // Re-render open windows
reloadWindows(); for (const window of ui.windows) {
window.render(true);
};
return false; return false;
}); });

View file

@ -78,8 +78,18 @@ export class PlayerData extends foundry.abstract.DataModel {
cells: new fields.NumberField({ min: 0, max: 5, integer: true }), cells: new fields.NumberField({ min: 0, max: 5, integer: true }),
}), }),
}), }),
supplies: new fields.NumberField({ min: 0, max: 5, integer: true }), supplies: new fields.NumberField({
materials: new fields.NumberField({ min: 0, max: 5, integer: true }), initial: 0,
min: 0,
max: 5,
integer: true
}),
materials: new fields.NumberField({
initial: 0,
min: 0,
max: 5,
integer: true
}),
pet: new fields.SchemaField({ pet: new fields.SchemaField({
name: new fields.HTMLField(), name: new fields.HTMLField(),
info: new fields.HTMLField(), info: new fields.HTMLField(),
@ -102,7 +112,9 @@ export class PlayerData extends foundry.abstract.DataModel {
r3: new fields.BooleanField(), r3: new fields.BooleanField(),
}), }),
syncDelta: new fields.NumberField({ syncDelta: new fields.NumberField({
required: true,
integer: true, integer: true,
initial: 0,
}), }),
}; };
}; };

View file

@ -0,0 +1,12 @@
export class SyncData extends foundry.abstract.DataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
value: new fields.NumberField({
required: true,
integer: true,
initial: 100,
}),
};
};
};

View file

@ -1,7 +1,9 @@
import registerClientSettings from "./client_settings.mjs"; import registerClientSettings from "./client_settings.mjs";
import registerWorldSettings from "./world_settings.mjs";
import registerDevSettings from "./dev_settings.mjs"; import registerDevSettings from "./dev_settings.mjs";
export default function registerSettings() { export default function registerSettings() {
registerClientSettings(); registerClientSettings();
registerWorldSettings();
registerDevSettings(); registerDevSettings();
}; };

View file

@ -0,0 +1,25 @@
export default function() {
game.settings.register(`dotdungeon`, `playersCanChangeGroup`, {
name: `dotdungeon.settings.playersCanChangeGroup.name`,
hint: `dotdungeon.settings.playersCanChangeGroup.description`,
scope: `world`,
config: true,
type: Boolean,
default: false,
requiresReload: false,
});
game.settings.register(`dotdungeon`, `resourcesOrSupplies`, {
name: `dotdungeon.settings.resourcesOrSupplies.name`,
hint: `dotdungeon.settings.resourcesOrSupplies.description`,
scope: `world`,
config: true,
type: String,
choices: {
"supplies": "dotdungeon.settings.resourcesOrSupplies.option.supplies",
"resources": "dotdungeon.settings.resourcesOrSupplies.option.resources"
},
default: "resources",
requiresReload: false,
});
};

View file

@ -1,7 +1,8 @@
export class GenericSheet extends ActorSheet { export class GenericSheet extends ActorSheet {
#propogatedSettings = [ #propogatedSettings = [
`devMode`, `devMode`,
`showAvatarOnSheet` `showAvatarOnSheet`,
`playersCanChangeGroup`,
]; ];
getData() { getData() {

View file

@ -19,7 +19,35 @@ export class PlayerSheet extends GenericSheet {
if (!this.isEditable) return; if (!this.isEditable) return;
console.debug(`.dungeon | Adding event listeners for Actor: ${this.id}`); console.debug(`.dungeon | Adding event listeners for Actor: ${this.id}`);
// html.find(`input.sync__input`).on("blur", ($e) => {}); // html.find(`input.sync__input`).on("blur", ($e) => {
// console.debug(`.dungeon | input.sync__input blur event`);
// let value = parseInt($e.target.value);
// if (!value) {
// ui.notifications.error(
// `dotdungeon.notification.error.invalid-integer`,
// { localize: true }
// );
// return;
// };
// let delta = value - this.#syncValue();
// this.actor.system.syncDelta += delta;
// for (const actor of game.actors) {
// if (actor._sheet)
// }
// game.socket.emit(`system.dotdungeon`, {
// type: "reload",
// })
// });
};
#syncValue() {
let delta = 0;
for (const actor of game.actors) {
delta += actor.system.syncDelta ?? 0;
};
return 100 + delta;
}; };
getData() { getData() {
@ -30,7 +58,8 @@ export class PlayerSheet extends GenericSheet {
ctx.flags = actor.flags; ctx.flags = actor.flags;
ctx.computed = { ctx.computed = {
syncTotal: 0 syncTotal: this.#syncValue(),
canChangeGroup: ctx.settings.playersCanChangeGroup,
}; };
console.groupCollapsed(`PlayerSheet.getData`); console.groupCollapsed(`PlayerSheet.getData`);

View file

@ -0,0 +1,32 @@
import { GenericSheet } from "../GenericSheet.mjs";
export class AbstractSyncSheet extends GenericSheet {
static get defaultOptions() {
let opts = mergeObject(
super.defaultOptions,
{
width: 200,
height: 200,
}
);
opts.classes.push(
`dotdungeon`,
`dotdungeon--sync-sheet`
);
return opts;
};
getData() {
const ctx = super.getData();
const actor = this.actor.toObject(false);
ctx.system = actor.system;
ctx.flags = actor.flags;
console.groupCollapsed(`SyncSheet.getData`);
console.log(`ctx`, ctx);
console.log(`actor`, actor);
console.groupEnd();
return ctx;
};
};

View file

@ -0,0 +1,7 @@
import { AbstractSyncSheet } from "./AbstractSyncSheet.mjs";
export class BasicSyncSheet extends AbstractSyncSheet {
get template() {
return `systems/dotdungeon/templates/actors/sync/basic.hbs`;
};
};

View file

@ -1,11 +1,11 @@
export function reloadWindows(type = null) { export function reloadWindows(type = null) {
if (!type) { if (!type) {
for (const window of ui.windows) { for (const window of globalThis.ui.windows) {
window.render(true); window.render(true);
}; };
return; return;
}; };
for (const window of ui.windows) { for (const window of globalThis.ui.windows) {
if (window instanceof type) { if (window instanceof type) {
window.render(true); window.render(true);
}; };

58
styles/generic.scss Normal file
View file

@ -0,0 +1,58 @@
@use "./mixins/partials" as *;
@use "./mixins/foundry" as *;
@use "./vars.scss" as *;
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap');
// Reset the parts of Foundry's styling which gets in the way of what I want
.dotdungeon > .window-content {
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
}
h2, h3, h4, h5, h6 {
@include fvtt_reset;
font-family: $title-font;
margin: 0;
}
label {
cursor: pointer;
}
button, button:hover {
@include fvtt_reset;
font-family: inherit;
cursor: pointer;
}
input[type="text"],
input[type="number"],
textarea {
padding: 5px 7px;
@include input-generic;
}
select, select:hover {
cursor: pointer;
}
.debug-data {
opacity: 60%;
font-family: $body-font;
}
}
// Styling that doesn't belong to any particular part of my sheet
.dotdungeon {
container-type: size;
> .window-content {
padding: 0;
background: $background;
}
}

View file

@ -9,3 +9,9 @@
@content @content
}; };
}; };
@mixin bp-xs {
@container (max-width: 300px) {
@content
}
}

View file

@ -2,67 +2,12 @@
@use "./mixins/foundry" as *; @use "./mixins/foundry" as *;
@use "./vars.scss" as *; @use "./vars.scss" as *;
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap'); @use "./generic.scss";
// Reset the parts of Foundry's styling which gets in the way of what I want @use "./sheets/partials/stat.scss";
.dotdungeon > .window-content { @use "./sheets/partials/skill.scss";
@use "./sheets/partials/panel.scss";
::-webkit-scrollbar { @use "./sheets/actor/mvp.scss";
width: 10px; @use "./sheets/actor/sync/basic.scss";
} @use "./sheets/items/aspect.scss";
::-webkit-scrollbar-thumb {
border-radius: 5px;
}
h2, h3, h4, h5, h6 {
@include fvtt_reset;
display: block;
font-family: $title-font;
margin: 0;
}
label {
display: inline-block;
cursor: pointer;
}
button, button:hover {
@include fvtt_reset;
font-family: inherit;
cursor: pointer;
}
input[type="text"],
input[type="number"],
textarea {
@include fvtt_reset;
padding: 5px 7px;
@include input-generic;
}
select, select:hover {
cursor: pointer;
}
.debug-data {
opacity: 60%;
font-family: $body-font;
}
}
// Styling that doesn't belong to any particular part of my sheet
.dotdungeon {
container-type: size;
> .window-content {
padding: 0;
background: $background;
}
}
@import "./sheets/partials/stat.scss";
@import "./sheets/partials/skill.scss";
@import "./sheets/partials/panel.scss";
@import "./sheets/actor/mvp.scss";
@import "./sheets/items/aspect.scss";

View file

@ -76,6 +76,11 @@
flex-grow: 1; flex-grow: 1;
} }
} }
.sync__input {
width: 80px;
margin: 3px 5px;
}
} }
&--aspect { &--aspect {
grid-area: aspect; grid-area: aspect;

View file

@ -0,0 +1,49 @@
@use "../../../mixins/breakpoints" as *;
.dotdungeon {
.actor--circle-sync {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 4px;
label {
display: flex;
flex-direction: column;
align-items: center;
}
.sync-input {
width: 30%;
text-align: center;
}
.name-input {
width: 60%;
text-align: center;
}
}
&--sync-sheet {
header {
.configure-token {
display: none;
visibility: hidden;
}
}
}
}
@include bp-xs {
.dotdungeon {
&--sync-sheet {
header {
.configure-sheet {
display: none;
visibility: hidden;
}
}
}
}
}

View file

@ -11,7 +11,6 @@
&__header { &__header {
background: black; background: black;
color: white;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
@ -21,7 +20,7 @@
h2 { h2 {
@include fvtt_reset; @include fvtt_reset;
color: inherit; color: white;
flex-grow: 1; flex-grow: 1;
font-family: $title-font; font-family: $title-font;
font-size: 20px; font-size: 20px;

View file

@ -27,15 +27,20 @@
placeholder="{{localize "dotdungeon.actor.pc.profile.name.placeholder"}}" placeholder="{{localize "dotdungeon.actor.pc.profile.name.placeholder"}}"
> >
</label> </label>
<label> {{#if computed.canChangeGroup}}
{{localize "dotdungeon.actor.pc.profile.group.label"}} <label>
<input {{localize "dotdungeon.actor.pc.profile.group.label"}}
type="text" {{#unless settings.playersCanChangeGroup}}
name="system.group" <span>{{localize "dotdungeon.actor.pc.profile.group.gm-edit"}}</span>
value="{{system.group}}" {{/unless}}
placeholder="{{localize "dotdungeon.actor.pc.profile.group.placeholder"}}" <input
> type="text"
</label> name="system.group"
value="{{system.group}}"
placeholder="{{localize "dotdungeon.actor.pc.profile.group.placeholder"}}"
>
</label>
{{/if}}
{{/ dotdungeon.panel}} {{/ dotdungeon.panel}}
@ -64,23 +69,30 @@
{{#> dotdungeon.panel class="sync" title="dotdungeon.actor.pc.panel.sync"}} {{#> dotdungeon.panel class="sync" title="dotdungeon.actor.pc.panel.sync"}}
{{!--
NOTE: This would be neat to get working at some point, but isn't my highest
priority to do.
<div class="sync"> <div class="sync">
<h3 class="sync__header"> <h3 class="sync__header">
Sync {{localize "dotdungeon.actor.pc.sync.header"}}
{{#if settings.devMode}} {{#if settings.devMode}}
<span class="debug-data"> <span class="debug-data">
({{system.syncDelta}}) ({{system.syncDelta}})
</span> </span>
{{/if}} {{/if}}
</h3> </h3>
{{!-- <input <input
type="number" type="number"
class="sync__input" class="sync__input sync"
value="{{computed.syncTotal}}" value="{{computed.syncTotal}}"
> --}} >
</div> </div>
--}}
<div class="respawns"> <div class="respawns">
<h3 class="respawns__header">{{localize "dotdungeon.actor.pc.respawns.header"}}</h3> <h3 class="respawns__header">
{{localize "dotdungeon.actor.pc.respawns.header"}}
</h3>
{{#each system.respawns}} {{#each system.respawns}}
<input <input
type="checkbox" type="checkbox"

View file

@ -0,0 +1,20 @@
<form autocomplete="off" class="actor--circle-sync">
<label>
{{localize "dotdungeon.actor.sync.circle.group"}}
<input
type="text"
class="name-input"
name="name"
value="{{actor.name}}"
>
</label>
<label>
{{localize "dotdungeon.actor.sync.circle.sync"}}
<input
type="number"
class="sync-input"
name="system.value"
value="{{system.value}}"
>
</label>
</form>