Many fixes

This commit is contained in:
LeRatierBretonnien 2023-01-21 17:56:14 +01:00
parent 5cb20f108e
commit 9a2dc3be6f
8 changed files with 128 additions and 33 deletions

View File

@ -29,5 +29,12 @@
"WH.conf.beltpouch3": "Beltpouch 3",
"WH.ui.level": "Level",
"WH.ui.notes": "Notes"
"WH.ui.notes": "Notes",
"WH.ui.hpprog": "HP Progression",
"WH.ui.lan": "Languages",
"WH.ui.attrbonus": "Attribute (+4/Lvl4, +2/Lvl8)",
"WH.ui.weapons": "Weapons",
"WH.ui.armors": "Armors",
"WH.ui.shields": "Shields"
}

View File

@ -37,6 +37,12 @@ export const WARHERO_CONFIG = {
beltpouch1: {nbslots: 4, label: "WH.conf.beltpouch1"},
beltpouch2: {nbslots: 4, label: "WH.conf.beltpouch2"},
beltpouch3: {nbslots: 4, label: "WH.conf.beltpouch3"},
},
progressionList: {
"high": "High (+6HP/Lvl)",
"medium": "Medium (+4HP/Lvl)",
"low": "Low (+2 HP/Lvl)"
}
}

View File

@ -69,9 +69,15 @@ export class WarheroItemSheet extends ItemSheet {
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
abilities: duplicate(game.model.Actor.character.abilities),
isGM: game.user.isGM
}
if ( this.object.type == "power") {
formData.level1 = await TextEditor.enrichHTML(this.object.system.level1, {async: true})
formData.level2 = await TextEditor.enrichHTML(this.object.system.level2, {async: true})
formData.level3 = await TextEditor.enrichHTML(this.object.system.level3, {async: true})
formData.level4 = await TextEditor.enrichHTML(this.object.system.level4, {async: true})
}
this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;

View File

@ -87,10 +87,10 @@ Hooks.once("ready", function () {
// User warning
if (!game.user.isGM && game.user.character == undefined) {
ui.notifications.info("Warning ! No character linked to your user !");
ChatMessage.create({
/*ChatMessage.create({
content: "<b>WARNING</b> The player " + game.user.name + " is not linked to a character !",
user: game.user._id
});
});*/
}
// CSS patch for v9

View File

@ -1265,32 +1265,6 @@
{
color: #CCC
}
#pause > img {
content: url(../images/ui/crucible_pause_logo.jpg);
height: 160px;
width: 160px;
top: -80px;
left: calc(50% - 132px);
}
#logo {
content : url(../images/ui/crucible_game_logo.png);
width: 100px;
height: 60px;
}
.dice-cell {
padding-left: 12px;
padding-right: 12px;
width: 60px;
text-align: center;
}
.dice-formula,
.dice-total {
height: 54px;
position:relative;
}
/* =================== 1. ACTOR SHEET FONT STYLES =========== *//*
Agility AGI: #02a41d Also Used for Ranged Damage
@ -1445,6 +1419,11 @@
max-width: 24rem;
min-width: 24rem;
}
.item-name-label-header-long3 {
flex-grow:2;
max-width: 30rem;
min-width: 30rem;
}
.item-name-label {
flex-grow:2;
max-width: 10rem;
@ -1500,7 +1479,7 @@
}
.alternate-list {
margin-top: 4px;
flex-wrap: nowrap;
fong2ex-wrap: nowrap;
}
.item-filler {
flex-grow: 6;

View File

@ -127,7 +127,13 @@
"description": ""
},
"race": {
"description": ""
"description": "",
"hpprogresion": "hp2",
"languages": "",
"attributebonus": "",
"weapons": "",
"shields": "",
"armors": ""
},
"skill": {
"description": ""
@ -137,6 +143,7 @@
"damage": "1d6",
"cost": 0,
"equipped": false,
"quantity": 1,
"slotused": 1,
"slotlocation": "weapon1",
"description": ""
@ -146,6 +153,7 @@
"equipped": false,
"damagereduction": 1,
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "armor",
"description":""
@ -155,6 +163,7 @@
"parrybonus": 1,
"equipped": false,
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "shield",
"description":""
@ -162,7 +171,7 @@
"equipment": {
"equiptype": "",
"cost": 0,
"quantity": 0,
"quantity": 1,
"equipped": false,
"slotused": 1,
"slotlocation": "backpack",

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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab details" data-group="primary" data-tab="description">
<label class="generic-label">Description</label>
<div class="medium-editor item-text-long-line">
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
</div>
<div class="tab details" data-group="primary" data-tab="details">
<ul>
{{#each system.weapons as |weaponflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.weapons"}} {{key}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.weapons.{{key}}" {{checked weaponflag}}/>
</li>
{{/each}}
{{#each system.armors as |armorflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.armors"}} {{key}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.armors.{{key}}" {{checked armorflag}}/>
</li>
{{/each}}
{{#each system.shields as |shieldflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.shields"}} {{key}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.shields.{{key}}" {{checked shieldflag}}/>
</li>
{{/each}}
</ul>
</div>
</section>
</form>

View File

@ -20,6 +20,40 @@
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.hpprog"}}</label>
<select class="item-field-label-long " type="text" name="system.hpprogresion" value="{{system.hpprogresion}}" data-dtype="String">
{{#select system.hpprogresion}}
{{#each config.progressionList as |prog key|}}
<option value="{{key}}">{{localize prog}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.lan"}}</label>
<input type="text" class="item-field-label-long" name="system.languages" value="{{system.languages}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.attrbonus"}}</label>
<select class="item-field-label-long " type="text" name="system.attributebonus" value="{{system.attributebonus}}" data-dtype="String">
{{#select system.attributebonus}}
{{#each abilities as |ability key|}}
<option value="{{key}}">{{ability.label}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.weapons"}}</label>
<input type="text" class="item-field-label-long3 " name="system.weapons" value="{{system.weapons}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.armors"}}</label>
<input type="text" class="item-field-label-long3 " name="system.armors" value="{{system.armors}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.shields"}}</label>
<input type="text" class="item-field-label-long3 " name="system.shields" value="{{system.shields}}" data-dtype="String"/>
</li>
</ul>
</div>