Added effects panel to both pc and npc.

This commit is contained in:
Bragma
2023-04-05 12:10:39 +00:00
committed by Vlyan
parent 20d2137a15
commit 04bfe38136
9 changed files with 8826 additions and 27 deletions

8771
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ export const PreloadTemplates = async function () {
`${tpl}actors/character/inventory.html`,
`${tpl}actors/character/narrative.html`,
`${tpl}actors/character/rings.html`,
`${tpl}actors/character/effects.html`,
`${tpl}actors/character/skill.html`,
`${tpl}actors/character/social.html`,
`${tpl}actors/character/stance.html`,
@@ -25,6 +26,7 @@ export const PreloadTemplates = async function () {
`${tpl}actors/npc/inventory.html`,
`${tpl}actors/npc/narrative.html`,
`${tpl}actors/npc/rings.html`,
`${tpl}actors/npc/effects.html`,
`${tpl}actors/npc/social.html`,
`${tpl}actors/npc/skill.html`,
`${tpl}actors/npc/techniques.html`,

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@
width: 100%;
line-height: 2rem;
font-size: 0.75rem;
margin: 0 0 0.5rem;
margin: 0.5rem 0;
text-align: center;
li {
flex: 1;

View File

@@ -53,6 +53,37 @@
.sheet-body {
flex: 0 0 100%;
align-items: flex-start;
.effects {
clear: both;
display: flex;
flex-wrap: wrap;
gap: 2px 4px;
.effect-container {
border: 1px solid #5a6e5a;
border-radius: 4px;
background-color: rgba(0, 0, 0, 0.4);
padding: 3px;
}
.effect-icon {
width: 16px;
height: 16px;
background-repeat: no-repeat;
background-size: contain;
float: left;
}
.effect-name {
vertical-align: top;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: $white;
float: right;
margin-left: 4px;
font-size: 14px;
line-height: 16px;
max-width: 140px;
}
}
}
section,
article {
@@ -904,7 +935,6 @@
margin: 0.5rem 0 0.5rem 1.5rem;
padding: 0;
}
}
}
// Lang Adjust.

View File

@@ -1,28 +1,33 @@
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
{{!-- L5R Button bar --}}
<div class="l5r-buttons-bar">
{{#each l5rHeaderButtons}}
{{#each l5rHeaderButtons}}
<a class="l5r-header-button {{this.class}}"><i class="{{this.icon}}"></i>{{localize this.label}}</a>
{{/each}}
{{/each}}
</div>
{{!-- Sheet Header --}}
<header class="sheet-header">
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if data.editable_not_soft_locked}}data-edit="img"{{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true" title="{{data.name}}"/>
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if
data.editable_not_soft_locked}}data-edit="img"{{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true"
title="{{data.name}}"/>
<div class="header-fields identity-wrapper">
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if data.editable_not_soft_locked}}disabled{{/if}}/></h1>
<h1 class="charname">
<input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if
data.editable_not_soft_locked}}disabled{{/if}}/>
</h1>
{{> 'systems/l5r5e/templates/actors/character/identity.html'}}
</div>
<div class="header-fields">
<h2>{{localize 'l5r5e.social.title'}}</h2>
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
{{> 'systems/l5r5e/templates/actors/character/social.html'}}
{{> 'systems/l5r5e/templates/actors/character/rings.html'}}
{{> 'systems/l5r5e/templates/actors/character/attributes.html'}}
{{> 'systems/l5r5e/templates/actors/character/social.html'}} {{>
'systems/l5r5e/templates/actors/character/rings.html'}} {{>
'systems/l5r5e/templates/actors/character/attributes.html'}}
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Sheet Tab Navigation --}}
{{> 'systems/l5r5e/templates/actors/character/effects.html'}} {{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="skills">{{localize 'l5r5e.skills.title'}}</a>
<a class="item" data-tab="narrative">{{localize 'l5r5e.sheets.narrative'}}</a>
@@ -34,8 +39,8 @@
{{!-- Skills Tab --}}
<article class="tab skills" data-group="primary" data-tab="skills">
<ul class="skills-wrapper">
{{#each data.system.skills as |category id|}}
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
{{#each data.system.skills as |category id|}} {{>
'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
{{/each}}
</ul>
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}}
@@ -61,4 +66,4 @@
{{> 'systems/l5r5e/templates/actors/character/experience.html'}}
</article>
</section>
</form>
</form>

View File

@@ -0,0 +1,8 @@
<ul class="effects">
{{#each actor.effects as |effect|}}
<li class="effect-container" title="{{label}}">
<div class="effect-icon" style="background-image: url({{effect.icon}})"></div>
<div class="effect-name"><label>{{label}}</label></div>
</li>
{{/each}}
</ul>

View File

@@ -22,6 +22,7 @@
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> 'systems/l5r5e/templates/actors/npc/effects.html'}}
{{!-- Skills No Tab --}}
{{> 'systems/l5r5e/templates/actors/npc/skill.html'}}

View File

@@ -0,0 +1,8 @@
<ul class="effects">
{{#each actor.effects as |effect|}}
<li class="effect-container" title="{{label}}">
<div class="effect-icon" style="background-image: url({{effect.icon}})"></div>
<div class="effect-name"><label>{{label}}</label></div>
</li>
{{/each}}
</ul>