Merge branch '10-implement-money' into 'master'
Resolve "Separate field for money" Closes #10 See merge request dungeonslayers/ds4!47
This commit is contained in:
commit
af19d7c971
12 changed files with 206 additions and 152 deletions
|
@ -13,7 +13,7 @@ To install and use the Dungeonslayers 4 system for Foundry Virtual Tabletop,
|
|||
simply paste the following URL into the **Install System** dialog on the Setup
|
||||
menu of the application.
|
||||
|
||||
https://git.f3l.de/dungeonslayers/ds4/-/raw/master/src/system.json?inline=false
|
||||
https://git.f3l.de/dungeonslayers/ds4/-/raw/latest/src/system.json?inline=false
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
@ -145,10 +145,14 @@
|
|||
"DS4.CharacterProfileBirthplace": "Geburtsort",
|
||||
"DS4.CharacterProfileAge": "Alter",
|
||||
"DS4.CharacterProfileHeight": "Größe",
|
||||
"DS4.ProfileHairColor": "Haarfarbe",
|
||||
"DS4.CharacterProfileHairColor": "Haarfarbe",
|
||||
"DS4.CharacterProfileWeight": "Gewicht",
|
||||
"DS4.CharacterProfileEyeColor": "Augenfarbe",
|
||||
"DS4.CharacterProfileSpecialCharacteristics": "Besondere Eigenschaften",
|
||||
"DS4.CharacterCurrencyGold": "Gold",
|
||||
"DS4.CharacterCurrencySilver": "Silber",
|
||||
"DS4.CharacterCurrencyCopper": "Kupfer",
|
||||
"DS4.CharacterCurrency": "Währung",
|
||||
"DS4.CreatureTypeAnimal": "Tier",
|
||||
"DS4.CreatureTypeConstruct": "Konstrukt",
|
||||
"DS4.CreatureTypeHumanoid": "Humanoid",
|
||||
|
|
|
@ -145,10 +145,14 @@
|
|||
"DS4.CharacterProfileBirthplace": "Birthplace",
|
||||
"DS4.CharacterProfileAge": "Age",
|
||||
"DS4.CharacterProfileHeight": "Height",
|
||||
"DS4.ProfileHairColor": "Hair Color",
|
||||
"DS4.CharacterProfileHairColor": "Hair Color",
|
||||
"DS4.CharacterProfileWeight": "Weight",
|
||||
"DS4.CharacterProfileEyeColor": "Eye Color",
|
||||
"DS4.CharacterProfileSpecialCharacteristics": "Special Characteristics",
|
||||
"DS4.CharacterCurrencyGold": "Gold",
|
||||
"DS4.CharacterCurrencySilver": "Silver",
|
||||
"DS4.CharacterCurrencyCopper": "Copper",
|
||||
"DS4.CharacterCurrency": "Currency",
|
||||
"DS4.CreatureTypeAnimal": "Animal",
|
||||
"DS4.CreatureTypeConstruct": "Construct",
|
||||
"DS4.CreatureTypeHumanoid": "Humanoid",
|
||||
|
|
|
@ -39,6 +39,7 @@ interface DS4ActorDataCharacter extends DS4ActorDataBase {
|
|||
progression: DS4ActorDataCharacterProgression;
|
||||
language: DS4ActorDataCharacterLanguage;
|
||||
profile: DS4ActorDataCharacterProfile;
|
||||
currency: DS4ActorDataCharacterCurrency;
|
||||
}
|
||||
|
||||
interface DS4ActorDataCharacterBaseInfo {
|
||||
|
@ -73,6 +74,12 @@ interface DS4ActorDataCharacterProfile {
|
|||
specialCharacteristics: string;
|
||||
}
|
||||
|
||||
interface DS4ActorDataCharacterCurrency {
|
||||
gold: number;
|
||||
silver: number;
|
||||
copper: number;
|
||||
}
|
||||
|
||||
interface DS4ActorDataCreature extends DS4ActorDataBase {
|
||||
baseInfo: DS4ActorDataCreatureBaseInfo;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ export const DS4 = {
|
|||
birthplace: "DS4.CharacterProfileBirthplace",
|
||||
age: "DS4.CharacterProfileAge",
|
||||
height: "DS4.CharacterProfileHeight",
|
||||
hairColor: "DS4.ProfileHairColor",
|
||||
hairColor: "DS4.CharacterProfileHairColor",
|
||||
weight: "DS4.CharacterProfileWeight",
|
||||
eyeColor: "DS4.CharacterProfileEyeColor",
|
||||
specialCharacteristics: "DS4.CharacterProfileSpecialCharacteristics",
|
||||
|
@ -226,6 +226,15 @@ export const DS4 = {
|
|||
specialCharacteristics: "String",
|
||||
},
|
||||
|
||||
/**
|
||||
* Define currency elements of a character
|
||||
*/
|
||||
characterCurrency: {
|
||||
gold: "DS4.CharacterCurrencyGold",
|
||||
silver: "DS4.CharacterCurrencySilver",
|
||||
copper: "DS4.CharacterCurrencyCopper",
|
||||
},
|
||||
|
||||
/**
|
||||
* Define the different creature types a creature can be
|
||||
*/
|
||||
|
|
|
@ -64,6 +64,8 @@ async function registerHandlebarsPartials() {
|
|||
"systems/ds4/templates/actor/partials/profile.hbs",
|
||||
"systems/ds4/templates/actor/partials/character-progression.hbs",
|
||||
"systems/ds4/templates/actor/partials/special-creature-abilites-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/character-inventory.hbs",
|
||||
"systems/ds4/templates/actor/partials/creature-inventory.hbs",
|
||||
];
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
@ -95,6 +97,7 @@ Hooks.once("setup", function () {
|
|||
"characterProgression",
|
||||
"characterLanguage",
|
||||
"characterProfile",
|
||||
"characterCurrency",
|
||||
"creatureTypes",
|
||||
"creatureSizeCategories",
|
||||
"creatureBaseInfo",
|
||||
|
|
|
@ -122,6 +122,11 @@
|
|||
"weight": 0,
|
||||
"eyeColor": "",
|
||||
"specialCharacteristics": ""
|
||||
},
|
||||
"currency": {
|
||||
"gold": 0,
|
||||
"silver": 0,
|
||||
"copper": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/character-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/creature-inventory.hbs}}
|
||||
|
||||
{{!-- Special Creature Abilities Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/special-creature-abilites-overview.hbs}}
|
||||
|
|
21
src/templates/actor/partials/character-inventory.hbs
Normal file
21
src/templates/actor/partials/character-inventory.hbs
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{!-- Money--}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.CharacterCurrency'}}</h4>
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<label for="data.currency.gold" class="flex05">{{config.characterCurrency.gold}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.gold"
|
||||
id="data.currency.gold" value="{{data.currency.gold}}" data-dtype="Number" />
|
||||
<label for="data.currency.silver" class="flex05">{{config.characterCurrency.silver}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.silver"
|
||||
id="data.currency.silver" value="{{data.currency.silver}}" data-dtype="Number" />
|
||||
<label for="data.currency.copper" class="flex05">{{config.characterCurrency.copper}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.copper"
|
||||
id="data.currency.copper" value="{{data.currency.copper}}" data-dtype="Number" />
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
</div>
|
5
src/templates/actor/partials/creature-inventory.hbs
Normal file
5
src/templates/actor/partials/creature-inventory.hbs
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
</div>
|
|
@ -76,8 +76,8 @@
|
|||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}" data-dtype="Number"
|
||||
data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}"
|
||||
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{!-- name --}}
|
||||
<input class="flex3 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
||||
|
@ -93,9 +93,6 @@
|
|||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
||||
{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}}
|
||||
|
@ -199,4 +196,3 @@
|
|||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
</div>
|
Loading…
Reference in a new issue