Fixes perks

This commit is contained in:
LeRatierBretonnien 2022-12-28 00:25:00 +01:00
parent 55a2d3f4d4
commit 5f36a58805
7 changed files with 65 additions and 29 deletions

View File

@ -30,6 +30,11 @@ export const DARKSTARS_CONFIG = {
"slug": "Slug throwers",
"energy": "Energy"
},
perktypes: {
"normal": "Normal",
"advanced": "Advanced",
"role": "Role"
},
range: {
"1": "Close",
"2": "Short",

View File

@ -50,22 +50,6 @@ export class DarkStarsUtility {
/*-------------------------------------------- */
static gameSettings() {
/*game.settings.register("fvtt-dark-stars", "dice-color-skill", {
name: "Dice color for skills",
hint: "Set the dice color for skills",
scope: "world",
config: true,
requiresReload: true ,
default: "#101010",
type: String
})
Hooks.on('renderSettingsConfig', (event) => {
const element = event.element[0].querySelector(`[name='fvtt-dark-stars.dice-color-skill']`)
if (!element) return
// Replace placeholder element
console.log("Element Found !!!!")
}) */
}
/*-------------------------------------------- */

0
packs/perks.db Normal file
View File

View File

@ -83,6 +83,15 @@
"system": "fvtt-dark-stars",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Perks",
"name": "perks",
"path": "packs/perks.db",
"system": "fvtt-dark-stars",
"private": false,
"flags": {}
}
],
"primaryTokenAttribute": "secondary.hp",
@ -91,7 +100,7 @@
"styles": [
"styles/simple.css"
],
"version": "10.0.6",
"version": "10.0.8",
"compatibility": {
"minimum": "10",
"verified": "10",
@ -99,7 +108,7 @@
},
"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-v10.0.6.zip",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars/archive/fvtt-dark-stars-v10.0.8.zip",
"url": "https://www.uberwald.me/gitea/uberwald/",
"background": "images/ui/dark_stars_welcome_page.webp",
"id": "fvtt-dark-stars"

View File

@ -269,6 +269,10 @@
"description": ""
},
"perk": {
"perktype": "",
"role": "",
"requirements": "",
"xpcost": 0,
"cost": 0,
"description": ""
},
@ -350,7 +354,8 @@
"weapon": {
"weapontype": "",
"associatedskill": "",
"penetration": "",
"penetrationmin": "",
"penetrationmax": "",
"damage": "",
"bulk": 0,
"br": 0,

View File

@ -15,10 +15,39 @@
<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">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>

View File

@ -38,29 +38,33 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-long">Penetration</label>
<input type="text" class="right item-field-label-long" name="system.penetration" value="{{system.penetration}}" data-dtype="String"/>
<li class="flexrow"><label class="item-field-label-long">Penetration min.</label>
<input type="text" class="right item-field-label-long" name="system.penetrationmin" value="{{system.penetrationmin}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Penetration max.</label>
<input type="text" class="right item-field-label-long" name="system.penetrationmax" value="{{system.penetrationmax}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Damage</label>
<input type="text" class="right item-field-label-long" name="system.damage" value="{{system.damage}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Bulk</label>
<input type="text" class="input-numeric-short padd-right" name="system.bulk" value="{{data.bulk}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.bulk" value="{{system.bulk}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long">BR</label>
<input type="text" class="input-numeric-short padd-right" name="system.br" value="{{data.br}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.br" value="{{system.br}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long">RoF</label>
<input type="text" class="input-numeric-short padd-right" name="system.rof" value="{{data.rof}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.rof" value="{{system.rof}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Ammo</label>
<input type="text" class="input-numeric-short padd-right" name="system.ammo" value="{{data.ammo}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.ammo" value="{{system.ammo}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Effective Range</label>
@ -84,19 +88,19 @@
</li>
<li class="flexrow"><label class="item-field-label-long">SP</label>
<input type="text" class="input-numeric-short padd-right" name="system.sp" value="{{data.sp}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.sp" value="{{system.sp}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-vlong">Size (-1 for non applicable)</label>
<input type="text" class="input-numeric-short padd-right" name="system.size" value="{{data.size}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.size" value="{{system.size}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked data.equipped}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
</li>
<li class="flexrow"><label class="item-field-label-long">Cost</label>
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
</li>
</ul>