Skip to content

Commit

Permalink
6.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Plushtoast committed Nov 6, 2024
1 parent 4e88456 commit 632bc46
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 28 deletions.
6 changes: 3 additions & 3 deletions bundle/modules/dsa5.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/system/equipment-damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export default class EquipmentDamage {
static breakingTest(item) {
if (!item)
return ui.notifications.warn(
game.i18n.format('DSAError.notfound', {
game.i18n.format('DSAError.notFound', {
category: '',
name: game.i18n.localize('equipment'),
name: game.i18n.localize('TYPES.Item.equipment'),
}),
);
if (item.system.structure.max <= 0) return ui.notifications.warn(game.i18n.format('DSAError.noBreakingStructure', { name: item.name }));
Expand Down
26 changes: 14 additions & 12 deletions modules/system/hotbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ export default class DSA5Hotbar extends Hotbar {
case 'weapon':
case 'spell':
item = this.token.actor?.items.get(data.id);
const itemData = await item.sheet.getData()
const itemData = await item.sheet.getData();

if(!game.user.isGM && itemData.item.system.obfuscation?.details) {
description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', itemData)
if (!game.user.isGM && itemData.item.system.obfuscation?.details) {
description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', itemData);
} else {
description = $(
await renderTemplate(`systems/dsa5/templates/items/browse/${item.type}.html`, {
Expand All @@ -172,20 +172,22 @@ export default class DSA5Hotbar extends Hotbar {
skipHeader: true,
hint: true,
}),
).find('.groupbox').html();
)
.find('.groupbox')
.html();
}
break;
case 'enchantment':
const ids = data.id.split('_');
item = this.token.actor?.items.get(ids[0]);
if(item.system.obfuscation?.enchantment) {
description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', item)
data.name = `${game.i18n.localize('enchantment')} (${item.name})`
if (item.system.obfuscation?.enchantment) {
description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', item);
data.name = `${game.i18n.localize('enchantment')} (${item.name})`;
} else {
const enchantment = item.getFlag('dsa5', 'enchantments').find((x) => x.id == ids[1]);
data.name = `${enchantment.name} (${item.name})`;
description = await renderTemplate('systems/dsa5/templates/items/enchantment-preview.html', { enchantment, document: item });
}
}
break;
default:
return;
Expand Down Expand Up @@ -245,9 +247,9 @@ export default class DSA5Hotbar extends Hotbar {
} else {
sections.removeClass('longLayout');
}
let btns = html.find('.primary');
btns.removeClass('dsahidden');
btns
html
.find('.primary')
.removeClass('dsahidden')
.filter(function () {
const find = this.dataset?.name?.toLowerCase().trim();
if (find) return find.indexOf(search) == -1;
Expand Down Expand Up @@ -379,7 +381,7 @@ export default class DSA5Hotbar extends Hotbar {
const fallbackNames = {
gm: 'gmMenu',
skillgm: 'TYPES.Item.skill',
enchantment: 'enchantment'
enchantment: 'enchantment',
};

for (let key of Object.keys(groups.skills)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/system/initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default class DSA5Initializer extends foundry.applications.api.DialogV2 {
if (parent) {
updates.push({
_id: this.folders[folder].id,
parent: this.folders[parent].id,
folder: this.folders[parent].id,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/system/opposed-dsa5.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export default class OpposedDsa5 {
armor = Math.max(Math.round(armor * armorMultiplier), 0);
armor += spellArmor + liturgyArmor;
const armorDamaged = EquipmentDamage.armorGetsDamage(damage, attackerTest);
const ids = wornArmor.map((x) => x.uuid);
const ids = wornArmor.map((x) => actor.items.get(x._id).uuid);

return {
damage,
Expand Down
2 changes: 1 addition & 1 deletion styles/css/dsa5.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion styles/css/dsa5.css.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions styles/scss/dsa5.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "sass:meta";
@use "sass:meta";

:root {
--border-color:#736953a6;
Expand Down Expand Up @@ -3274,15 +3274,15 @@
}

.fa-dsa5-lighthelper:before{
background-image: url('../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp');
background-image: url('../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp');
}

.fa-dsa5-foodsearch:before{
background-image: url('../../icons/talents/Lebensmittelbearbeitung.webp');
}

.fa-dsa5-adci:before{
background-image: url('../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp');
background-image: url('../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp');
}

.fa-dsa5-plantHelper:before{
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "dsa5",
"title": "Das Schwarze Auge/The Dark Eye (5th Edition)",
"description": "The \"Das Schwarze Auge\" system for Foundry VTT. Includes all relevant mechanisms to play in the wonderous world of Aventuria and Das Schwarze Auge/The Dark Eye.",
"version": "6.1.5",
"download": "https://github.com/Plushtoast/dsa5-foundryVTT/releases/download/6.1.5/dsa5-foundryVTT-6.1.5.zip",
"version": "6.1.6",
"download": "https://github.com/Plushtoast/dsa5-foundryVTT/releases/download/6.1.6/dsa5-foundryVTT-6.1.6.zip",
"authors": [
{
"name": "Plushtoast"
Expand Down
6 changes: 4 additions & 2 deletions templates/chat/roll/test-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@
<div class="card-content">
<b>{{localize "effect"}}</b>: {{{testData.parsedEffect}}}
</div>
{{/if}} {{#if showDamageToGear}}
{{/if}}
{{#if showDamageToGear}}
<div class="card-content center selfButton" style="margin-top:10px">
<button class="gearDamaged" data-uuid="{{showDamageToGear}}">{{localize 'WEAR.checkShort'}}</button>
</div>
{{/if}} {{#each testData.other as |string index|}}
{{/if}}
{{#each testData.other as |string index|}}
<div>
{{{string}}}
</div>
Expand Down

0 comments on commit 632bc46

Please sign in to comment.