mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-23 19:09:55 +02:00
feat: add resources to weapons
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
This commit is contained in:
parent
8c6a470d84
commit
cdc507c5f7
7 changed files with 38 additions and 9 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"js/ts.preferGoToSourceDefinition": true
|
"js/ts.preferGoToSourceDefinition": true,
|
||||||
|
"codeQL.githubDatabase.download": "never"
|
||||||
}
|
}
|
||||||
18
README.md
18
README.md
|
|
@ -2,11 +2,17 @@
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [Overview](#overview)
|
- [Foundryborne Daggerheart](#foundryborne-daggerheart)
|
||||||
- [User Install Guide](#user-install)
|
- [Table of Contents](#table-of-contents)
|
||||||
- [Documentation](#documentation)
|
- [Overview](#overview)
|
||||||
- [Developer Setup](#development-setup)
|
- [User Install](#user-install)
|
||||||
- [Contribution Info](#contributing)
|
- [Documentation](#documentation)
|
||||||
|
- [Development Setup](#development-setup)
|
||||||
|
- [Available Scripts](#available-scripts)
|
||||||
|
- [Notes](#notes)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [AI Policy](#ai-policy)
|
||||||
|
- [Disclaimer](#disclaimer)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|
@ -72,7 +78,7 @@ Looking to contribute to the project? Look no further, check out our [contributi
|
||||||
|
|
||||||
The Foundryborne Daggerheart system does not make use of AI (generative or otherwise) for any area of its implementation. We expect all contributors to follow this same policy when contributing with a pull request; contributions made using AI will be rejected outright.
|
The Foundryborne Daggerheart system does not make use of AI (generative or otherwise) for any area of its implementation. We expect all contributors to follow this same policy when contributing with a pull request; contributions made using AI will be rejected outright.
|
||||||
|
|
||||||
## Disclaimer:
|
## Disclaimer
|
||||||
|
|
||||||
**Daggerheart System**
|
**Daggerheart System**
|
||||||
Daggerheart is a trademark of Darrington Press LLC. All original content, mechanics, and intellectual property related to the Daggerheart roleplaying game are © Darrington Press LLC.
|
Daggerheart is a trademark of Darrington Press LLC. All original content, mechanics, and intellectual property related to the Daggerheart roleplaying game are © Darrington Press LLC.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ export default class DHWeapon extends AttachableItem {
|
||||||
type: 'weapon',
|
type: 'weapon',
|
||||||
hasDescription: true,
|
hasDescription: true,
|
||||||
isInventoryItem: true,
|
isInventoryItem: true,
|
||||||
hasActions: true
|
hasActions: true,
|
||||||
|
hasResource: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,13 @@
|
||||||
/ 40px 1fr min-content;
|
/ 40px 1fr min-content;
|
||||||
column-gap: 8px;
|
column-gap: 8px;
|
||||||
|
|
||||||
|
&:has(> .item-resource, > .item-resources) {
|
||||||
|
grid-template:
|
||||||
|
'img name resource controls' auto
|
||||||
|
'img labels labels labels' 1fr
|
||||||
|
/ 40px 1fr min-content min-content;
|
||||||
|
}
|
||||||
|
|
||||||
> .img-portait {
|
> .img-portait {
|
||||||
grid-area: img;
|
grid-area: img;
|
||||||
}
|
}
|
||||||
|
|
@ -251,6 +258,15 @@
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
> .item-resource,
|
||||||
|
> .item-resources {
|
||||||
|
grid-area: resource;
|
||||||
|
align-self: center;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
> .controls {
|
> .controls {
|
||||||
grid-area: controls;
|
grid-area: controls;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
collection=@root.inventory.weapons
|
collection=@root.inventory.weapons
|
||||||
isGlassy=true
|
isGlassy=true
|
||||||
canCreate=@root.editable
|
canCreate=@root.editable
|
||||||
hideResources=true
|
|
||||||
}}
|
}}
|
||||||
{{> 'daggerheart.inventory-items'
|
{{> 'daggerheart.inventory-items'
|
||||||
title='TYPES.Item.armor'
|
title='TYPES.Item.armor'
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
{{!-- Item Name --}}
|
{{!-- Item Name --}}
|
||||||
<span class="item-name">{{localize item.name}}</span>
|
<span class="item-name">{{localize item.name}}</span>
|
||||||
|
|
||||||
|
{{!-- Resource --}}
|
||||||
|
{{#if (and (eq type 'weapon') item.system.resource)}}
|
||||||
|
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{!-- Tags Start --}}
|
{{!-- Tags Start --}}
|
||||||
{{#with item}}
|
{{#with item}}
|
||||||
<div class="item-labels">
|
<div class="item-labels">
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,5 @@
|
||||||
<span>{{localize "TYPES.Item.feature"}}</span>
|
<span>{{localize "TYPES.Item.feature"}}</span>
|
||||||
<input type="text" class="features-input" value="{{features}}" />
|
<input type="text" class="features-input" value="{{features}}" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
{{> "systems/daggerheart/templates/sheets/global/partials/resource-section/resource-section.hbs" }}
|
||||||
</section>
|
</section>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue