forked from GitHub-Mirrors/foundry-sw5e
Merge pull request #113 from unrealkakeman89/Develop-VJ
Core Update 1.2.3 merged with recent dev changes
This commit is contained in:
commit
01dbc82a15
16 changed files with 143 additions and 118 deletions
|
@ -23,7 +23,7 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
.bungeeInline();
|
.engli-Besh();
|
||||||
color: @colorOlive;
|
color: @colorOlive;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #111;
|
color: #111;
|
||||||
|
|
|
@ -458,8 +458,8 @@ export default class Actor5e extends Actor {
|
||||||
return weight + (q * w);
|
return weight + (q * w);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
// [Optional] add Currency Weight
|
// [Optional] add Currency Weight (for non-transformed actors)
|
||||||
if ( game.settings.get("sw5e", "currencyWeight") ) {
|
if ( game.settings.get("sw5e", "currencyWeight") && actorData.data.currency ) {
|
||||||
const currency = actorData.data.currency;
|
const currency = actorData.data.currency;
|
||||||
const numCoins = Object.values(currency).reduce((val, denom) => val += Math.max(denom, 0), 0);
|
const numCoins = Object.values(currency).reduce((val, denom) => val += Math.max(denom, 0), 0);
|
||||||
weight += numCoins / CONFIG.SW5E.encumbrance.currencyPerWeight;
|
weight += numCoins / CONFIG.SW5E.encumbrance.currencyPerWeight;
|
||||||
|
@ -553,43 +553,56 @@ export default class Actor5e extends Actor {
|
||||||
const isNPC = this.data.type === 'npc';
|
const isNPC = this.data.type === 'npc';
|
||||||
let initial = {};
|
let initial = {};
|
||||||
switch ( itemData.type ) {
|
switch ( itemData.type ) {
|
||||||
|
|
||||||
case "weapon":
|
case "weapon":
|
||||||
initial["data.equipped"] = isNPC; // NPCs automatically equip weapons
|
if ( getProperty(itemData, "data.equipped") === undefined ) {
|
||||||
let hasWeaponProf = isNPC; // NPCs automatically have weapon proficiency
|
initial["data.equipped"] = isNPC; // NPCs automatically equip weapons
|
||||||
if ( !isNPC ) {
|
}
|
||||||
const weaponProf = {
|
if ( getProperty(itemData, "data.proficient") === undefined ) {
|
||||||
"natural": true,
|
if ( isNPC ) {
|
||||||
"simpleVW": "sim",
|
initial["data.proficient"] = true; // NPCs automatically have equipment proficiency
|
||||||
"simpleB": "sim",
|
} else {
|
||||||
"simpleLW": "sim",
|
const weaponProf = {
|
||||||
"martialVW": "mar",
|
"natural": true,
|
||||||
"martialB": "mar",
|
"simpleVW": "sim",
|
||||||
"martialLW": "mar"
|
"simpleB": "sim",
|
||||||
}[itemData.data?.weaponType];
|
"simpleLW": "sim",
|
||||||
const actorWeaponProfs = this.data.data.traits?.weaponProf?.value || [];
|
"martialVW": "mar",
|
||||||
hasWeaponProf = (weaponProf === true) || actorWeaponProfs.includes(weaponProf);
|
"martialB": "mar",
|
||||||
|
"martialLW": "mar"
|
||||||
|
}[itemData.data?.weaponType]; // Player characters check proficiency
|
||||||
|
const actorWeaponProfs = this.data.data.traits?.weaponProf?.value || [];
|
||||||
|
const hasWeaponProf = (weaponProf === true) || actorWeaponProfs.includes(weaponProf);
|
||||||
|
initial["data.proficient"] = hasWeaponProf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initial["data.proficient"] = hasWeaponProf;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "equipment":
|
case "equipment":
|
||||||
initial["data.equipped"] = isNPC; // NPCs automatically equip equipment
|
if ( getProperty(itemData, "data.equipped") === undefined ) {
|
||||||
let hasEquipmentProf = isNPC; // NPCs automatically have equipment proficiency
|
initial["data.equipped"] = isNPC; // NPCs automatically equip equipment
|
||||||
if ( !isNPC ) {
|
}
|
||||||
const armorProf = {
|
if ( getProperty(itemData, "data.proficient") === undefined ) {
|
||||||
"natural": true,
|
if ( isNPC ) {
|
||||||
"clothing": true,
|
initial["data.proficient"] = true; // NPCs automatically have equipment proficiency
|
||||||
"light": "lgt",
|
} else {
|
||||||
"medium": "med",
|
const armorProf = {
|
||||||
"heavy": "hvy",
|
"natural": true,
|
||||||
"shield": "shl"
|
"clothing": true,
|
||||||
}[itemData.data?.armor?.type];
|
"light": "lgt",
|
||||||
const actorArmorProfs = this.data.data.traits?.armorProf?.value || [];
|
"medium": "med",
|
||||||
hasEquipmentProf = (armorProf === true) || actorArmorProfs.includes(armorProf);
|
"heavy": "hvy",
|
||||||
|
"shield": "shl"
|
||||||
|
}[itemData.data?.armor?.type]; // Player characters check proficiency
|
||||||
|
const actorArmorProfs = this.data.data.traits?.armorProf?.value || [];
|
||||||
|
const hasEquipmentProf = (armorProf === true) || actorArmorProfs.includes(armorProf);
|
||||||
|
initial["data.proficient"] = hasEquipmentProf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initial["data.proficient"] = hasEquipmentProf;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "power":
|
case "power":
|
||||||
initial["data.prepared"] = true; // NPCs automatically prepare powers
|
initial["data.prepared"] = true; // automatically prepare powers for everyone
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mergeObject(itemData, initial);
|
mergeObject(itemData, initial);
|
||||||
|
@ -1103,7 +1116,7 @@ export default class Actor5e extends Actor {
|
||||||
|
|
||||||
// Recover power slots
|
// Recover power slots
|
||||||
for ( let [k, v] of Object.entries(data.powers) ) {
|
for ( let [k, v] of Object.entries(data.powers) ) {
|
||||||
updateData[`data.powers.${k}.value`] = !Number.isNaN(v.override) ? v.override : (v.max ?? 0);
|
updateData[`data.powers.${k}.value`] = Number.isNumeric(v.override) ? v.override : (v.max ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recover pact slots.
|
// Recover pact slots.
|
||||||
|
@ -1210,10 +1223,10 @@ export default class Actor5e extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the original Actor data and the new source data
|
// Get the original Actor data and the new source data
|
||||||
const o = this.toJSON();
|
const o = duplicate(this.toJSON());
|
||||||
o.flags.sw5e = o.flags.sw5e || {};
|
o.flags.sw5e = o.flags.sw5e || {};
|
||||||
o.flags.sw5e.transformOptions = {mergeSkills, mergeSaves};
|
o.flags.sw5e.transformOptions = {mergeSkills, mergeSaves};
|
||||||
const source = target.toJSON();
|
const source = duplicate(target.toJSON());
|
||||||
|
|
||||||
// Prepare new data to merge from the source
|
// Prepare new data to merge from the source
|
||||||
const d = {
|
const d = {
|
||||||
|
@ -1244,7 +1257,7 @@ export default class Actor5e extends Actor {
|
||||||
// Handle wildcard
|
// Handle wildcard
|
||||||
if ( source.token.randomImg ) {
|
if ( source.token.randomImg ) {
|
||||||
const images = await target.getTokenImages();
|
const images = await target.getTokenImages();
|
||||||
d.token.img = images[0];
|
d.token.img = images[Math.floor(Math.random() * images.length)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep Token configurations
|
// Keep Token configurations
|
||||||
|
@ -1328,7 +1341,7 @@ export default class Actor5e extends Actor {
|
||||||
newTokenData.actorId = newActor.id;
|
newTokenData.actorId = newActor.id;
|
||||||
return newTokenData;
|
return newTokenData;
|
||||||
});
|
});
|
||||||
return canvas.scene.updateEmbeddedEntity("Token", updates);
|
return canvas.scene?.updateEmbeddedEntity("Token", updates);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
|
@ -619,6 +619,11 @@ export default class ActorSheet5e extends ActorSheet {
|
||||||
itemData = scroll.data;
|
itemData = scroll.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore certain statuses
|
||||||
|
if ( itemData.data ) {
|
||||||
|
["attunement", "equipped", "proficient", "prepared"].forEach(k => delete itemData.data[k]);
|
||||||
|
}
|
||||||
|
|
||||||
// Create the owned item as normal
|
// Create the owned item as normal
|
||||||
return super._onDropItemCreate(itemData);
|
return super._onDropItemCreate(itemData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -619,6 +619,11 @@ export default class ActorSheet5e extends ActorSheet {
|
||||||
itemData = scroll.data;
|
itemData = scroll.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore certain statuses
|
||||||
|
if ( itemData.data ) {
|
||||||
|
["attunement", "equipped", "proficient", "prepared"].forEach(k => delete itemData.data[k]);
|
||||||
|
}
|
||||||
|
|
||||||
// Create the owned item as normal
|
// Create the owned item as normal
|
||||||
return super._onDropItemCreate(itemData);
|
return super._onDropItemCreate(itemData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,8 @@ export default class AbilityUseDialog extends Dialog {
|
||||||
type: item.data.consumableType,
|
type: item.data.consumableType,
|
||||||
value: uses.value,
|
value: uses.value,
|
||||||
quantity: item.data.quantity,
|
quantity: item.data.quantity,
|
||||||
|
max: uses.max,
|
||||||
|
per: CONFIG.SW5E.limitedUsePeriods[uses.per]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const displayChatActionButtons = function(message, html, data) {
|
||||||
export const addChatMessageContextOptions = function(html, options) {
|
export const addChatMessageContextOptions = function(html, options) {
|
||||||
let canApply = li => {
|
let canApply = li => {
|
||||||
const message = game.messages.get(li.data("messageId"));
|
const message = game.messages.get(li.data("messageId"));
|
||||||
return message.isRoll && message.isContentVisible && canvas.tokens.controlled.length;
|
return message?.isRoll && message?.isContentVisible && canvas?.tokens.controlled.length;
|
||||||
};
|
};
|
||||||
options.push(
|
options.push(
|
||||||
{
|
{
|
||||||
|
@ -103,15 +103,16 @@ export const addChatMessageContextOptions = function(html, options) {
|
||||||
* Apply rolled dice damage to the token or tokens which are currently controlled.
|
* Apply rolled dice damage to the token or tokens which are currently controlled.
|
||||||
* This allows for damage to be scaled by a multiplier to account for healing, critical hits, or resistance
|
* This allows for damage to be scaled by a multiplier to account for healing, critical hits, or resistance
|
||||||
*
|
*
|
||||||
* @param {HTMLElement} roll The chat entry which contains the roll data
|
* @param {HTMLElement} li The chat entry which contains the roll data
|
||||||
* @param {Number} multiplier A damage multiplier to apply to the rolled damage.
|
* @param {Number} multiplier A damage multiplier to apply to the rolled damage.
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
function applyChatCardDamage(roll, multiplier) {
|
function applyChatCardDamage(li, multiplier) {
|
||||||
const amount = roll.find('.dice-total').text();
|
const message = game.messages.get(li.data("messageId"));
|
||||||
|
const roll = message.roll;
|
||||||
return Promise.all(canvas.tokens.controlled.map(t => {
|
return Promise.all(canvas.tokens.controlled.map(t => {
|
||||||
const a = t.actor;
|
const a = t.actor;
|
||||||
return a.applyDamage(amount, multiplier);
|
return a.applyDamage(roll.total, multiplier);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const _getInitiativeFormula = function(combatant) {
|
||||||
|
|
||||||
let nd = 1;
|
let nd = 1;
|
||||||
let mods = "";
|
let mods = "";
|
||||||
|
|
||||||
if (actor.getFlag("sw5e", "halflingLucky")) mods += "r1=1";
|
if (actor.getFlag("sw5e", "halflingLucky")) mods += "r1=1";
|
||||||
if (actor.getFlag("sw5e", "initiativeAdv")) {
|
if (actor.getFlag("sw5e", "initiativeAdv")) {
|
||||||
nd = 2;
|
nd = 2;
|
||||||
|
@ -26,15 +26,3 @@ export const _getInitiativeFormula = function(combatant) {
|
||||||
if ( tiebreaker ) parts.push(actor.data.data.abilities.dex.value / 100);
|
if ( tiebreaker ) parts.push(actor.data.data.abilities.dex.value / 100);
|
||||||
return parts.filter(p => p !== null).join(" + ");
|
return parts.filter(p => p !== null).join(" + ");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* When the Combat encounter updates - re-render open Actor sheets for combatants in the encounter.
|
|
||||||
*/
|
|
||||||
Hooks.on("updateCombat", (combat, data, options, userId) => {
|
|
||||||
const updateTurn = ("turn" in data) || ("round" in data);
|
|
||||||
if ( !updateTurn ) return;
|
|
||||||
for ( let t of combat.turns ) {
|
|
||||||
const a = t.actor;
|
|
||||||
if ( t.actor ) t.actor.sheet.render(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ export function simplifyRollFormula(formula, data, {constantFirst = false} = {})
|
||||||
|
|
||||||
const parts = constantFirst ? // Order the rollable and constant terms, either constant first or second depending on the optional argumen
|
const parts = constantFirst ? // Order the rollable and constant terms, either constant first or second depending on the optional argumen
|
||||||
[constantPart, rollableFormula] : [rollableFormula, constantPart];
|
[constantPart, rollableFormula] : [rollableFormula, constantPart];
|
||||||
|
|
||||||
// Join the parts with a + sign, pass them to `Roll` once again to clean up the formula
|
// Join the parts with a + sign, pass them to `Roll` once again to clean up the formula
|
||||||
return new Roll(parts.filterJoin(" + ")).formula;
|
return new Roll(parts.filterJoin(" + ")).formula;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ export function simplifyRollFormula(formula, data, {constantFirst = false} = {})
|
||||||
/**
|
/**
|
||||||
* Only some terms are supported by simplifyRollFormula, this method returns true when the term is not supported.
|
* Only some terms are supported by simplifyRollFormula, this method returns true when the term is not supported.
|
||||||
* @param {*} term - A single Dice term to check support on
|
* @param {*} term - A single Dice term to check support on
|
||||||
* @return {Boolean} True when unsupported, false if supported
|
* @return {Boolean} True when unsupported, false if supported
|
||||||
*/
|
*/
|
||||||
function _isUnsupportedTerm(term) {
|
function _isUnsupportedTerm(term) {
|
||||||
const diceTerm = term instanceof DiceTerm;
|
const diceTerm = term instanceof DiceTerm;
|
||||||
|
@ -110,8 +110,8 @@ export async function d20Roll({parts=[], data={}, event={}, rollMode=null, templ
|
||||||
let adv = 0;
|
let adv = 0;
|
||||||
fastForward = fastForward ?? (event && (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey));
|
fastForward = fastForward ?? (event && (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey));
|
||||||
if (fastForward) {
|
if (fastForward) {
|
||||||
if ( advantage || event.altKey ) adv = 1;
|
if ( advantage ?? event.altKey ) adv = 1;
|
||||||
else if ( disadvantage || event.ctrlKey || event.metaKey ) adv = -1;
|
else if ( disadvantage ?? (event.ctrlKey || event.metaKey) ) adv = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the inner roll function
|
// Define the inner roll function
|
||||||
|
|
|
@ -251,12 +251,14 @@ export default class Item5e extends Item {
|
||||||
|
|
||||||
// Item Actions
|
// Item Actions
|
||||||
if ( data.hasOwnProperty("actionType") ) {
|
if ( data.hasOwnProperty("actionType") ) {
|
||||||
|
// if this item is owned, we populate the label and saving throw during actor init
|
||||||
|
if (!this.isOwned) {
|
||||||
|
// Saving throws
|
||||||
|
this.getSaveDC();
|
||||||
|
|
||||||
// Saving throws
|
// To Hit
|
||||||
this.getSaveDC();
|
this.getAttackToHit();
|
||||||
|
}
|
||||||
// To Hit
|
|
||||||
this.getAttackToHit();
|
|
||||||
|
|
||||||
// Damage
|
// Damage
|
||||||
let dam = data.damage || {};
|
let dam = data.damage || {};
|
||||||
|
@ -312,7 +314,7 @@ export default class Item5e extends Item {
|
||||||
* - item's actor's proficiency bonus if applicable
|
* - item's actor's proficiency bonus if applicable
|
||||||
* - item's actor's global bonuses to the given item type
|
* - item's actor's global bonuses to the given item type
|
||||||
* - item's ammunition if applicable
|
* - item's ammunition if applicable
|
||||||
*
|
*
|
||||||
* @returns {Object} returns `rollData` and `parts` to be used in the item's Attack roll
|
* @returns {Object} returns `rollData` and `parts` to be used in the item's Attack roll
|
||||||
*/
|
*/
|
||||||
getAttackToHit() {
|
getAttackToHit() {
|
||||||
|
@ -915,7 +917,8 @@ export default class Item5e extends Item {
|
||||||
if ( powerLevel ) rollData.item.level = powerLevel;
|
if ( powerLevel ) rollData.item.level = powerLevel;
|
||||||
|
|
||||||
// Configure the damage roll
|
// Configure the damage roll
|
||||||
const title = `${this.name} - ${game.i18n.localize("SW5E.DamageRoll")}`;
|
const actionFlavor = game.i18n.localize(itemData.actionType === "heal" ? "SW5E.Healing" : "SW5E.DamageRoll");
|
||||||
|
const title = `${this.name} - ${actionFlavor}`;
|
||||||
const rollConfig = {
|
const rollConfig = {
|
||||||
actor: this.actor,
|
actor: this.actor,
|
||||||
critical: critical ?? event?.altKey ?? false,
|
critical: critical ?? event?.altKey ?? false,
|
||||||
|
|
|
@ -14,11 +14,11 @@ export const preloadHandlebarsTemplates = async function() {
|
||||||
"systems/sw5e/templates/actors/oldActor/parts/actor-inventory.html",
|
"systems/sw5e/templates/actors/oldActor/parts/actor-inventory.html",
|
||||||
"systems/sw5e/templates/actors/oldActor/parts/actor-features.html",
|
"systems/sw5e/templates/actors/oldActor/parts/actor-features.html",
|
||||||
"systems/sw5e/templates/actors/oldActor/parts/actor-powerbook.html",
|
"systems/sw5e/templates/actors/oldActor/parts/actor-powerbook.html",
|
||||||
"systems/sw5e/templates/actors/oldActor/parts/actor-notes.html",
|
"systems/sw5e/templates/actors/oldActor/parts/actor-notes.html",
|
||||||
|
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-biography.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-biography.html",
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-core.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-core.html",
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html",
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-features.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-features.html",
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-inventory.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-inventory.html",
|
||||||
"systems/sw5e/templates/actors/newActor/parts/swalt-powerbook.html",
|
"systems/sw5e/templates/actors/newActor/parts/swalt-powerbook.html",
|
||||||
|
|
|
@ -10,12 +10,16 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: url('./fonts/RussoOne.ttf');
|
src: url('./fonts/RussoOne.ttf');
|
||||||
}
|
}
|
||||||
/* bungee-inline-regular - latin */
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Bungee Inline';
|
font-family: 'Engli-Besh';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: url('./fonts/BungeeInline.ttf');
|
src: url('./fonts/EngliBesh-KG3W.ttf');
|
||||||
|
}
|
||||||
|
.engli-Besh {
|
||||||
|
font-family: 'Engli-Besh';
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
/* open-sans-regular - latin */
|
/* open-sans-regular - latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
|
@ -54,11 +54,6 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: url('./fonts/EngliBesh-KG3W.ttf');
|
src: url('./fonts/EngliBesh-KG3W.ttf');
|
||||||
}
|
}
|
||||||
.engli-Besh {
|
|
||||||
font-family: 'Engli-Besh';
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
@ -768,7 +763,7 @@ input[type="reset"]:disabled {
|
||||||
grid-template-rows: 1fr 26px auto;
|
grid-template-rows: 1fr 26px auto;
|
||||||
grid-template-columns: 128px 1fr;
|
grid-template-columns: 128px 1fr;
|
||||||
column-gap: 8px;
|
column-gap: 8px;
|
||||||
row-gap: 8px;
|
grid-row-gap: 8px;
|
||||||
}
|
}
|
||||||
.sw5e.sheet.actor .swalt-sheet header img {
|
.sw5e.sheet.actor .swalt-sheet header img {
|
||||||
grid-column-start: 1;
|
grid-column-start: 1;
|
||||||
|
@ -1390,7 +1385,7 @@ input[type="reset"]:disabled {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-gap: 4px;
|
grid-gap: 4px;
|
||||||
row-gap: 4px;
|
grid-row-gap: 4px;
|
||||||
}
|
}
|
||||||
.sw5e.sheet.actor .swalt-sheet .tab.attributes .traits-resources section.traits ul.passives strong {
|
.sw5e.sheet.actor .swalt-sheet .tab.attributes .traits-resources section.traits ul.passives strong {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
@ -1601,7 +1596,7 @@ input[type="reset"]:disabled {
|
||||||
}
|
}
|
||||||
.sw5e.sheet.actor .swalt-sheet.limited {
|
.sw5e.sheet.actor .swalt-sheet.limited {
|
||||||
grid-template-rows: 144px auto;
|
grid-template-rows: 144px auto;
|
||||||
row-gap: 8px;
|
grid-row-gap: 8px;
|
||||||
}
|
}
|
||||||
.sw5e.sheet.actor .swalt-sheet.limited header {
|
.sw5e.sheet.actor .swalt-sheet.limited header {
|
||||||
grid-template-rows: 1fr;
|
grid-template-rows: 1fr;
|
||||||
|
|
69
sw5e.css
69
sw5e.css
|
@ -508,6 +508,41 @@
|
||||||
height: 24px;
|
height: 24px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* HUD
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
.placeable-hud .control-icon {
|
||||||
|
box-sizing: content-box;
|
||||||
|
width: 40px;
|
||||||
|
flex: 0 0 40px;
|
||||||
|
margin: 8px 0;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
color: #FBF4F4;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
box-shadow: 0 0 15px #000;
|
||||||
|
border: 1px solid #333;
|
||||||
|
border-radius: 8px;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
#token-hud .status-effects {
|
||||||
|
visibility: hidden;
|
||||||
|
position: absolute;
|
||||||
|
left: 50px;
|
||||||
|
top: 0;
|
||||||
|
display: grid;
|
||||||
|
padding: 3px;
|
||||||
|
box-sizing: content-box;
|
||||||
|
width: 100px;
|
||||||
|
color: #FBF4F4;
|
||||||
|
grid-template-columns: 25px 25px 25px 25px;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
box-shadow: 0 0 15px #000;
|
||||||
|
border: 1px solid #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
.sw5e.sheet.actor {
|
.sw5e.sheet.actor {
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
/* Sheet Header */
|
/* Sheet Header */
|
||||||
|
@ -1557,7 +1592,7 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
font-family: 'Bungee Inline';
|
font-family: 'Engli-Besh';
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #4b4a44;
|
color: #4b4a44;
|
||||||
|
@ -1837,35 +1872,3 @@
|
||||||
max-width: 40px;
|
max-width: 40px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.placeable-hud .control-icon {
|
|
||||||
box-sizing: content-box;
|
|
||||||
width: 40px;
|
|
||||||
flex: 0 0 40px;
|
|
||||||
margin: 8px 0;
|
|
||||||
font-size: 28px;
|
|
||||||
line-height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
color: #FBF4F4;
|
|
||||||
background: rgba(0, 0, 0, 0.6);
|
|
||||||
box-shadow: 0 0 15px #000;
|
|
||||||
border: 1px solid #333;
|
|
||||||
border-radius: 8px;
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
#token-hud .status-effects {
|
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
|
||||||
left: 50px;
|
|
||||||
top: 0;
|
|
||||||
display: grid;
|
|
||||||
padding: 3px;
|
|
||||||
box-sizing: content-box;
|
|
||||||
width: 100px;
|
|
||||||
color: #FBF4F4;
|
|
||||||
grid-template-columns: 25px 25px 25px 25px;
|
|
||||||
background: rgba(0, 0, 0, 0.6);
|
|
||||||
box-shadow: 0 0 15px #000;
|
|
||||||
border: 1px solid #333;
|
|
||||||
border-radius: 4px;
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
|
|
11
sw5e.js
11
sw5e.js
|
@ -26,6 +26,7 @@ import ActorSheet5eCharacter from "./module/actor/sheets/oldSheets/character.js"
|
||||||
import ActorSheet5eNPC from "./module/actor/sheets/oldSheets/npc.js";
|
import ActorSheet5eNPC from "./module/actor/sheets/oldSheets/npc.js";
|
||||||
import ActorSheet5eVehicle from "./module/actor/sheets/oldSheets/vehicle.js";
|
import ActorSheet5eVehicle from "./module/actor/sheets/oldSheets/vehicle.js";
|
||||||
import ActorSheet5eCharacterNew from "./module/actor/sheets/newSheet/character.js";
|
import ActorSheet5eCharacterNew from "./module/actor/sheets/newSheet/character.js";
|
||||||
|
import ActorSheet5eNPCNew from "./module/actor/sheets/newSheet/npc.js";
|
||||||
import ItemSheet5e from "./module/item/sheet.js";
|
import ItemSheet5e from "./module/item/sheet.js";
|
||||||
import ShortRestDialog from "./module/apps/short-rest.js";
|
import ShortRestDialog from "./module/apps/short-rest.js";
|
||||||
import TraitSelector from "./module/apps/trait-selector.js";
|
import TraitSelector from "./module/apps/trait-selector.js";
|
||||||
|
@ -53,6 +54,7 @@ Hooks.once("init", function() {
|
||||||
ActorSheet5eCharacter,
|
ActorSheet5eCharacter,
|
||||||
ActorSheet5eCharacterNew,
|
ActorSheet5eCharacterNew,
|
||||||
ActorSheet5eNPC,
|
ActorSheet5eNPC,
|
||||||
|
ActorSheet5eNPCNew,
|
||||||
ActorSheet5eVehicle,
|
ActorSheet5eVehicle,
|
||||||
ItemSheet5e,
|
ItemSheet5e,
|
||||||
ShortRestDialog,
|
ShortRestDialog,
|
||||||
|
@ -86,7 +88,7 @@ Hooks.once("init", function() {
|
||||||
|
|
||||||
// 5e cone RAW should be 53.13 degrees
|
// 5e cone RAW should be 53.13 degrees
|
||||||
CONFIG.MeasuredTemplate.defaults.angle = 53.13;
|
CONFIG.MeasuredTemplate.defaults.angle = 53.13;
|
||||||
|
|
||||||
// Add DND5e namespace for module compatability
|
// Add DND5e namespace for module compatability
|
||||||
game.dnd5e = game.sw5e;
|
game.dnd5e = game.sw5e;
|
||||||
CONFIG.DND5E = CONFIG.SW5E;
|
CONFIG.DND5E = CONFIG.SW5E;
|
||||||
|
@ -110,11 +112,16 @@ Hooks.once("init", function() {
|
||||||
makeDefault: false,
|
makeDefault: false,
|
||||||
label: "SW5E.SheetClassCharacterOld"
|
label: "SW5E.SheetClassCharacterOld"
|
||||||
});
|
});
|
||||||
Actors.registerSheet("sw5e", ActorSheet5eNPC, {
|
Actors.registerSheet("sw5e", ActorSheet5eNPCNew, {
|
||||||
types: ["npc"],
|
types: ["npc"],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
label: "SW5E.SheetClassNPC"
|
label: "SW5E.SheetClassNPC"
|
||||||
});
|
});
|
||||||
|
Actors.registerSheet("sw5e", ActorSheet5eNPC, {
|
||||||
|
types: ["npc"],
|
||||||
|
makeDefault: false,
|
||||||
|
label: "SW5E.SheetClassNPCOld"
|
||||||
|
});
|
||||||
Actors.registerSheet('sw5e', ActorSheet5eVehicle, {
|
Actors.registerSheet('sw5e', ActorSheet5eVehicle, {
|
||||||
types: ['vehicle'],
|
types: ['vehicle'],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "sw5e",
|
"name": "sw5e",
|
||||||
"title": "SW 5th Edition",
|
"title": "SW 5th Edition",
|
||||||
"description": "A comprehensive game system for running games of SW 5th Edition in the Foundry VTT environment.",
|
"description": "A comprehensive game system for running games of SW 5th Edition in the Foundry VTT environment.",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"author": "Dev Team",
|
"author": "Dev Team",
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"esmodules": ["sw5e.js"],
|
"esmodules": ["sw5e.js"],
|
||||||
|
|
|
@ -115,7 +115,6 @@
|
||||||
<button class="item" data-tab="powerbook">{{ localize "SW5E.Powerbook" }}</button>
|
<button class="item" data-tab="powerbook">{{ localize "SW5E.Powerbook" }}</button>
|
||||||
<button class="item" data-tab="effects">{{ localize "SW5E.Effects" }}</button>
|
<button class="item" data-tab="effects">{{ localize "SW5E.Effects" }}</button>
|
||||||
<button class="item" data-tab="biography">{{ localize "SW5E.Biography" }}</button>
|
<button class="item" data-tab="biography">{{ localize "SW5E.Biography" }}</button>
|
||||||
<!-- <button class="item" data-tab="notes">{{ localize "SW5E.Notes" }}</button> -->
|
|
||||||
</nav>
|
</nav>
|
||||||
{{!-- PC Sheet Body --}}
|
{{!-- PC Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
@ -143,4 +142,4 @@
|
||||||
<section class="tab biography" data-group="primary" data-tab="biography">
|
<section class="tab biography" data-group="primary" data-tab="biography">
|
||||||
{{> "systems/sw5e/templates/actors/newActor/parts/swalt-biography.html"}}
|
{{> "systems/sw5e/templates/actors/newActor/parts/swalt-biography.html"}}
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
Loading…
Add table
Add a link
Reference in a new issue