Merge remote-tracking branch 'origin/master' into 024-not-possible-to-manage-active-effects-on-owned-items
This commit is contained in:
commit
2a03ed273f
12 changed files with 126 additions and 50 deletions
|
@ -4,7 +4,7 @@
|
||||||
"DS4.HeadingDescription": "Description",
|
"DS4.HeadingDescription": "Description",
|
||||||
"DS4.HeadingDetails": "Details",
|
"DS4.HeadingDetails": "Details",
|
||||||
"DS4.HeadingEffects": "Effects",
|
"DS4.HeadingEffects": "Effects",
|
||||||
"DS4.HeadingItems": "Items",
|
"DS4.HeadingInventory": "Inventory",
|
||||||
"DS4.HeadingProfile": "Profile",
|
"DS4.HeadingProfile": "Profile",
|
||||||
"DS4.HeadingTalents": "Talents & Abilities",
|
"DS4.HeadingTalents": "Talents & Abilities",
|
||||||
"DS4.AttackType": "Attack Type",
|
"DS4.AttackType": "Attack Type",
|
||||||
|
@ -31,11 +31,19 @@
|
||||||
"DS4.ItemAvailabilityNowhere": "Nowhere",
|
"DS4.ItemAvailabilityNowhere": "Nowhere",
|
||||||
"DS4.ItemName": "Name",
|
"DS4.ItemName": "Name",
|
||||||
"DS4.ItemTypeWeapon": "Weapon",
|
"DS4.ItemTypeWeapon": "Weapon",
|
||||||
|
"DS4.ItemTypeWeaponPlural": "Weapons",
|
||||||
"DS4.ItemTypeArmor": "Armor",
|
"DS4.ItemTypeArmor": "Armor",
|
||||||
|
"DS4.ItemTypeArmorPlural": "Armor",
|
||||||
"DS4.ItemTypeShield": "Shield",
|
"DS4.ItemTypeShield": "Shield",
|
||||||
|
"DS4.ItemTypeShieldPlural": "Shields",
|
||||||
"DS4.ItemTypeTrinket": "Trinket",
|
"DS4.ItemTypeTrinket": "Trinket",
|
||||||
|
"DS4.ItemTypeTrinketPlural": "Trinkets",
|
||||||
"DS4.ItemTypeEquipment": "Equipment",
|
"DS4.ItemTypeEquipment": "Equipment",
|
||||||
|
"DS4.ItemTypeEquipmentPlural": "Equipment",
|
||||||
"DS4.ItemTypeTalent": "Talent",
|
"DS4.ItemTypeTalent": "Talent",
|
||||||
|
"DS4.ItemTypeTalentPlural": "Talents",
|
||||||
|
"DS4.ItemTypeRacialAbility": "Racial Ability",
|
||||||
|
"DS4.ItemTypeRacialAbilityPlural": "Racial Abilities",
|
||||||
"DS4.ArmorType": "Armor Type",
|
"DS4.ArmorType": "Armor Type",
|
||||||
"DS4.ArmorTypeAbbr": "AT",
|
"DS4.ArmorTypeAbbr": "AT",
|
||||||
"DS4.ArmorMaterialType": "Material Type",
|
"DS4.ArmorMaterialType": "Material Type",
|
||||||
|
|
|
@ -25,8 +25,9 @@ interface UsableResource<T> {
|
||||||
used: T;
|
used: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface CurrentData<T> extends ModifiableData<T> {
|
interface ResourceData<T> extends ModifiableData<T> {
|
||||||
current: T;
|
value: T;
|
||||||
|
max?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blueprint in case we need more detailed differentiation
|
// Blueprint in case we need more detailed differentiation
|
||||||
|
@ -42,7 +43,7 @@ interface DS4ActorDataTraits {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DS4ActorDataCombatValues {
|
interface DS4ActorDataCombatValues {
|
||||||
hitPoints: CurrentData<number>;
|
hitPoints: ResourceData<number>;
|
||||||
defense: ModifiableData<number>;
|
defense: ModifiableData<number>;
|
||||||
initiative: ModifiableData<number>;
|
initiative: ModifiableData<number>;
|
||||||
movement: ModifiableData<number>;
|
movement: ModifiableData<number>;
|
||||||
|
|
|
@ -18,5 +18,7 @@ export class DS4Actor extends Actor<DS4ActorDataType, DS4ItemDataType, DS4Item>
|
||||||
Object.values(combatValues).forEach(
|
Object.values(combatValues).forEach(
|
||||||
(combatValue: ModifiableData<number>) => (combatValue.total = combatValue.base + combatValue.mod),
|
(combatValue: ModifiableData<number>) => (combatValue.total = combatValue.base + combatValue.mod),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
combatValues.hitPoints.max = combatValues.hitPoints.total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ export const DS4 = {
|
||||||
trinket: "DS4.ItemTypeTrinket",
|
trinket: "DS4.ItemTypeTrinket",
|
||||||
equipment: "DS4.ItemTypeEquipment",
|
equipment: "DS4.ItemTypeEquipment",
|
||||||
talent: "DS4.ItemTypeTalent",
|
talent: "DS4.ItemTypeTalent",
|
||||||
|
racialAbility: "DS4.ItemTypeRacialAbility",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
import { ModifiableData } from "../actor/actor-data";
|
import { ModifiableData } from "../actor/actor-data";
|
||||||
|
|
||||||
export type DS4ItemDataType = DS4Weapon | DS4Armor | DS4Shield | DS4Trinket | DS4Equipment | DS4Talent;
|
export type DS4ItemDataType =
|
||||||
|
| DS4Weapon
|
||||||
|
| DS4Armor
|
||||||
|
| DS4Shield
|
||||||
|
| DS4Trinket
|
||||||
|
| DS4Equipment
|
||||||
|
| DS4Talent
|
||||||
|
| DS4RacialAbility;
|
||||||
|
|
||||||
// types
|
// types
|
||||||
|
|
||||||
|
@ -26,6 +33,7 @@ interface DS4TalentRank extends ModifiableData<number> {
|
||||||
interface DS4Shield extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4ItemProtective {}
|
interface DS4Shield extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4ItemProtective {}
|
||||||
interface DS4Trinket extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable {}
|
interface DS4Trinket extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable {}
|
||||||
interface DS4Equipment extends DS4ItemBase, DS4ItemPhysical {}
|
interface DS4Equipment extends DS4ItemBase, DS4ItemPhysical {}
|
||||||
|
type DS4RacialAbility = DS4ItemBase;
|
||||||
|
|
||||||
// templates
|
// templates
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ header.sheet-header {
|
||||||
display: block;
|
display: block;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
flex: 0 0 0;
|
flex: 0 0 auto;
|
||||||
color: $c-light-grey;
|
color: $c-light-grey;
|
||||||
border: none;
|
border: none;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
],
|
],
|
||||||
"gridDistance": 1,
|
"gridDistance": 1,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
"primaryTokenAttribute": "combatValues.hitPoints.current",
|
"primaryTokenAttribute": "combatValues.hitPoints",
|
||||||
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
||||||
"manifest": "https://git.f3l.de/dungeonslayers/ds4/-/raw/master/src/system.json?inline=false",
|
"manifest": "https://git.f3l.de/dungeonslayers/ds4/-/raw/master/src/system.json?inline=false",
|
||||||
"download": "https://git.f3l.de/dungeonslayers/ds4/-/jobs/artifacts/0.1.0/download?job=build",
|
"download": "https://git.f3l.de/dungeonslayers/ds4/-/jobs/artifacts/0.1.0/download?job=build",
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
"hitPoints": {
|
"hitPoints": {
|
||||||
"base": 0,
|
"base": 0,
|
||||||
"mod": 0,
|
"mod": 0,
|
||||||
"current": 0
|
"value": 0
|
||||||
},
|
},
|
||||||
"defense": {
|
"defense": {
|
||||||
"base": 0,
|
"base": 0,
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["weapon", "armor", "shield", "trinket", "equipment", "talent"],
|
"types": ["weapon", "armor", "shield", "trinket", "equipment", "talent", "racialAbility"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"base": {
|
"base": {
|
||||||
"description": ""
|
"description": ""
|
||||||
|
@ -161,6 +161,9 @@
|
||||||
"max": 0,
|
"max": 0,
|
||||||
"mod": 0
|
"mod": 0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"racialAbility": {
|
||||||
|
"templates": ["base"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||||
<a class="item" data-tab="talents">{{localize 'DS4.HeadingTalents'}}</a>
|
<a class="item" data-tab="talents">{{localize 'DS4.HeadingTalents'}}</a>
|
||||||
<a class="item" data-tab="profile">{{localize "DS4.HeadingProfile"}}</a>
|
<a class="item" data-tab="profile">{{localize "DS4.HeadingProfile"}}</a>
|
||||||
<a class="item" data-tab="items">{{localize 'DS4.HeadingItems'}}</a>
|
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
|
|
|
@ -79,10 +79,10 @@
|
||||||
{{!-- ======================================================================== --}}
|
{{!-- ======================================================================== --}}
|
||||||
|
|
||||||
|
|
||||||
<div class="tab items" data-group="primary" data-tab="items">
|
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||||
|
|
||||||
{{!-- WEAPONS --}}
|
{{!-- WEAPONS --}}
|
||||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeapon'}}</h4>
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
{{#> itemListHeader dataType='weapon'}}
|
{{#> itemListHeader dataType='weapon'}}
|
||||||
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{{!-- ARMOR --}}
|
{{!-- ARMOR --}}
|
||||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmor'}}</h4>
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
{{#> itemListHeader dataType='armor'}}
|
{{#> itemListHeader dataType='armor'}}
|
||||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
|
|
||||||
{{!-- SHIELD --}}
|
{{!-- SHIELD --}}
|
||||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShield'}}</h4> {{!-- SPECIFIC --}}
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4> {{!-- SPECIFIC --}}
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
{{#> itemListHeader dataType='shield' }}
|
{{#> itemListHeader dataType='shield' }}
|
||||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{{!-- TRINKET --}}
|
{{!-- TRINKET --}}
|
||||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinket'}}</h4>
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinketPlural'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
{{#> itemListHeader dataType='trinket'}}
|
{{#> itemListHeader dataType='trinket'}}
|
||||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{{!-- EQUIPMENT --}}
|
{{!-- EQUIPMENT --}}
|
||||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipment'}}</h4>
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
{{#> itemListHeader dataType='equipment'}}
|
{{#> itemListHeader dataType='equipment'}}
|
||||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||||
|
|
|
@ -13,11 +13,9 @@
|
||||||
!-- meant to be set to "disabled" to disable the input element
|
!-- meant to be set to "disabled" to disable the input element
|
||||||
--}}
|
--}}
|
||||||
{{#*inline "talentRankValue"}}
|
{{#*inline "talentRankValue"}}
|
||||||
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1"
|
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1" {{#if (eq property 'base' )
|
||||||
{{#if (eq property 'base') }}max="{{item.data.data.rank.max}}"{{/if}}
|
}}max="{{item.data.data.rank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
||||||
{{disabled}}
|
value="{{lookup item.data.data.rank property}}" title="{{localize localizeString}}" />
|
||||||
data-property="data.rank.{{property}}" value="{{lookup item.data.data.rank property}}"
|
|
||||||
title="{{localize localizeString}}" />
|
|
||||||
{{/inline}}
|
{{/inline}}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +28,7 @@
|
||||||
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||||
--}}
|
--}}
|
||||||
{{#*inline "talentListEntry"}}
|
{{#*inline "talentListEntry"}}
|
||||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||||
{{!-- image --}}
|
{{!-- image --}}
|
||||||
<div class="flex05 item-image">
|
<div class="flex05 item-image">
|
||||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||||
|
@ -55,14 +53,39 @@
|
||||||
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
||||||
{{!-- control buttons --}}
|
{{!-- control buttons --}}
|
||||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||||
</li>
|
</li>
|
||||||
{{/inline}}
|
{{/inline}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!--
|
||||||
|
!-- Render a racial ability list row from a given item.
|
||||||
|
!-- It is a flexbox with a child for each item value of interest.
|
||||||
|
!-- The partial assumes a variable item to be given in the context.
|
||||||
|
!--
|
||||||
|
!-- @param item: hand over the item to the partial as hash parameter
|
||||||
|
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||||
|
--}}
|
||||||
|
{{#*inline "racialAbilityListEntry"}}
|
||||||
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||||
|
{{!-- image --}}
|
||||||
|
<div class="flex05 item-image">
|
||||||
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||||
|
</div>
|
||||||
|
{{!-- name --}}
|
||||||
|
<input class="flex1 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||||
|
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
||||||
|
{{!-- description --}}
|
||||||
|
<div class="flex3 item-description">{{{item.data.data.description}}}</div>
|
||||||
|
{{!-- control buttons --}}
|
||||||
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||||
|
</li>
|
||||||
|
{{/inline}}
|
||||||
|
|
||||||
{{!-- ======================================================================== --}}
|
{{!-- ======================================================================== --}}
|
||||||
|
|
||||||
|
|
||||||
<div class="tab items" data-group="primary" data-tab="talents">
|
<div class="tab items" data-group="primary" data-tab="talents">
|
||||||
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTalentPlural'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
<li class="item flexrow item-header">
|
<li class="item flexrow item-header">
|
||||||
{{!-- image --}}
|
{{!-- image --}}
|
||||||
|
@ -80,4 +103,21 @@
|
||||||
{{> talentListEntry item=item}}
|
{{> talentListEntry item=item}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeRacialAbilityPlural'}}</h4>
|
||||||
|
<ol class="items-list">
|
||||||
|
<li class="item flexrow item-header">
|
||||||
|
{{!-- image --}}
|
||||||
|
<div class="flex05 item-image"></div>
|
||||||
|
{{!-- name --}}
|
||||||
|
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||||
|
{{!-- description --}}
|
||||||
|
<div class="flex3">{{localize 'DS4.HeadingDescription'}}</div>
|
||||||
|
{{!-- add button --}}
|
||||||
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='racialAbility' }}
|
||||||
|
</li>
|
||||||
|
{{#each itemsByType.racialAbility as |item id|}}
|
||||||
|
{{> racialAbilityListEntry item=item}}
|
||||||
|
{{/each}}
|
||||||
|
</ol>
|
||||||
</div>
|
</div>
|
13
src/templates/item/racialAbility-sheet.hbs
Normal file
13
src/templates/item/racialAbility-sheet.hbs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||||
|
<div class="header-fields flexrow">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
|
||||||
|
<h2 class="item-type">{{localize (lookup config.itemTypes item.type)}}</h2>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{!-- Common Item body --}}
|
||||||
|
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||||
|
|
||||||
|
</form>
|
Loading…
Reference in a new issue