This commit is contained in:
LeRatierBretonnien 2023-11-25 09:20:54 +01:00
parent ce3359b2f0
commit 14c7e54b3d
5 changed files with 101 additions and 3 deletions

View File

@ -254,6 +254,12 @@ export class DarkStarsActor extends Actor {
DarkStarsUtility.sortArrayObjectsByName(comp)
return comp
}
/* -------------------------------------------- */
getJobs() {
let comp = duplicate(this.items.filter(item => item.type == 'job') || [])
DarkStarsUtility.sortArrayObjectsByName(comp)
return comp
}
/* -------------------------------------------- */
async equipItem(itemId) {

View File

@ -118,14 +118,14 @@
"styles": [
"styles/simple.css"
],
"version": "11.0.14",
"version": "11.0.15",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"title": "Dark Stars RPG",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars/raw/branch/main/system.json",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars/archive/fvtt-dark-stars-v11.0.14.zip",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars/archive/fvtt-dark-stars-v11.0.15.zip",
"url": "https://www.uberwald.me/gitea/uberwald/",
"background": "images/ui/dark_stars_welcome_page.webp",
"id": "fvtt-dark-stars"

View File

@ -288,7 +288,8 @@
"cyber",
"ammo",
"psychic",
"spell"
"spell",
"job"
],
"spell": {
"magictype": "lemurian",
@ -328,6 +329,14 @@
"cost": 0,
"description": ""
},
"job": {
"perktype": "normal",
"role": "",
"requirements": "",
"xpcost": 0,
"cost": 0,
"description": ""
},
"ability": {
"description": ""
},

View File

@ -169,6 +169,35 @@
{{/each}}
</ul>
<ul class="alternate-list item-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">
<h3><label class="items-title-text">Jobs</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<div class="item-filler">&nbsp;</div>
<span class="item-field-label-medium">
<label class="short-label">&nbsp;</label>
</span>
</li>
{{#each jobs as |job key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{job._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{job.img}}" />
</a>
<span class="item-field-label-vlong2">{{job.name}}</span>
<span class="item-field-label-medium margin-left-4"><label>{{job.system.type}}</label></span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="alternate-list item-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">

View File

@ -0,0 +1,54 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-dark-stars/templates/partials/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-dark-stars/templates/partials/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<li class="flexrow"><label class="item-field-label-long">Perk Type</label>
<select class="item-field-label-vlong" type="text" name="system.perktype" value="{{system.perktype}}" data-dtype="String">
{{#select system.perktype}}
{{#each config.perktypes as |type key|}}
<option value="{{key}}">{{type}}</option>
{{/each}}
{{/select}}
</select>
</li>
{{#if (eq system.perktype "normal")}}
<li class="flexrow">
<label class="item-field-label-long">Starting Skill Cost</label>
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
</li>
{{else}}
{{#if (eq system.perktype "role")}}
<li class="flexrow">
<label class="item-field-label-long">Role</label>
<input type="text" class="item-field-label-vlong" name="system.role" value="{{system.role}}" data-dtype="String"/>
</li>
{{/if}}
<li class="flexrow">
<label class="item-field-label-long">Requirements</label>
<input type="text" class="item-field-label-vlong" name="system.requirements" value="{{system.requirements}}" data-dtype="String"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">XP Cost</label>
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.xpcost" value="{{system.xpcost}}" data-dtype="Number"/>
</li>
{{/if}}
</div>
</section>
</form>