Minot fixes

This commit is contained in:
LeRatierBretonnien 2023-03-04 17:34:18 +01:00
parent 3a8ad674bd
commit 7827e07e1c
8 changed files with 50 additions and 30 deletions

View File

@ -15,7 +15,6 @@
"TypeLanguage": "Language", "TypeLanguage": "Language",
"TypeCondition": "Condition", "TypeCondition": "Condition",
"TypeClass": "Class", "TypeClass": "Class",
"TypeGenericitem": "Class",
"TypeMoney": "Money", "TypeMoney": "Money",
"TypePotion": "Potion", "TypePotion": "Potion",
"TypePoison": "Poison", "TypePoison": "Poison",
@ -55,6 +54,11 @@
"WH.conf.beltpouch2": "Beltpouch 2", "WH.conf.beltpouch2": "Beltpouch 2",
"WH.conf.beltpouch3": "Beltpouch 3", "WH.conf.beltpouch3": "Beltpouch 3",
"WH.conf.unknown": "Unknown",
"WH.conf.yes": "Yes",
"WH.conf.no": "No",
"WH.conf.notapplicable": "Not applicable",
"WH.ui.level": "Level", "WH.ui.level": "Level",
"WH.ui.notes": "Notes", "WH.ui.notes": "Notes",
@ -185,7 +189,8 @@
"WH.ui.diseaseduration": "Disease duration", "WH.ui.diseaseduration": "Disease duration",
"WH.ui.ignoreeffect": "Ignore effect", "WH.ui.ignoreeffect": "Ignore effect",
"WH.ui.raceSkills": "Race skills", "WH.ui.raceSkills": "Race skills",
"WH.ui.identified": "Identified",
"WH.chat.save": "Save", "WH.chat.save": "Save",
"WH.chat.mweaponmalus": "Multiple weapons malus ", "WH.chat.mweaponmalus": "Multiple weapons malus ",
"WH.chat.diceresult": "Dice result", "WH.chat.diceresult": "Dice result",

View File

@ -81,6 +81,13 @@ export const WARHERO_CONFIG = {
untilendcombat: "WH.ui.untilendcombat", untilendcombat: "WH.ui.untilendcombat",
beginturn: "WH.ui.beginturn", beginturn: "WH.ui.beginturn",
endturn: "WH.ui.endturn" endturn: "WH.ui.endturn"
},
identifiedState: {
unknown: "WH.conf.unknown",
yes:"WH.conf.yes",
no:"WH.conf.no",
notapplicable:"WH.conf.notapplicable"
} }
} }

View File

@ -56,7 +56,6 @@ Hooks.once("init", async function () {
CONFIG.Combat.documentClass = WarheroCombat CONFIG.Combat.documentClass = WarheroCombat
CONFIG.Actor.documentClass = WarheroActor CONFIG.Actor.documentClass = WarheroActor
CONFIG.Item.documentClass = WarheroItem CONFIG.Item.documentClass = WarheroItem
//CONFIG.Token.objectClass = WarheroToken
/* -------------------------------------------- */ /* -------------------------------------------- */
// Register sheet application classes // Register sheet application classes
@ -79,28 +78,15 @@ Hooks.once("ready", function () {
// User warning // User warning
if (!game.user.isGM && game.user.character == undefined) { if (!game.user.isGM && game.user.character == undefined) {
ui.notifications.info("Warning ! No character linked to your user !"); ui.notifications.info("Warning ! No character linked to your user !");
/*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
/*if (game.version) {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}*/
//welcomeMessage();
WarheroUtility.ready() WarheroUtility.ready()
//WarheroHotbar.initDropbar()
}) })
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
/* -------------------------------------------- */ /* -------------------------------------------- */
Hooks.on("chatMessage", (html, content, msg) => { /*Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') { if (content[0] == '/') {
let regExp = /(\S+)/g; let regExp = /(\S+)/g;
let commands = content.match(regExp); let commands = content.match(regExp);
@ -109,5 +95,5 @@ Hooks.on("chatMessage", (html, content, msg) => {
} }
} }
return true; return true;
}); });*/

View File

@ -1496,6 +1496,12 @@ li {
max-width: 9rem; max-width: 9rem;
min-width: 9rem; min-width: 9rem;
} }
.item-field-label-2rem {
flex-grow: 1;
margin-top: 4px;
max-width: 1.2rem;
min-width: 1.2rem;
}
.item-field-label-short { .item-field-label-short {
flex-grow: 1; flex-grow: 1;
margin-top: 4px; margin-top: 4px;

View File

@ -107,7 +107,7 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"version": "10.0.35", "version": "10.0.36",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10", "verified": "10",
@ -115,7 +115,7 @@
}, },
"title": "Warhero RPG", "title": "Warhero RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.35.zip", "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.36.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero", "url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
"background": "images/ui/warhero_welcome_page.webp", "background": "images/ui/warhero_welcome_page.webp",
"id": "fvtt-warhero" "id": "fvtt-warhero"

View File

@ -243,7 +243,6 @@
"language", "language",
"condition", "condition",
"class", "class",
"genericitem",
"money", "money",
"potion", "potion",
"poison", "poison",
@ -280,7 +279,8 @@
"cost": 0, "cost": 0,
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "armor", "slotlocation": "backpack",
"isidentified": "unknown",
"alchemycost": "", "alchemycost": "",
"preparetime": "", "preparetime": "",
"durationround": 0, "durationround": 0,
@ -290,7 +290,8 @@
"cost": 0, "cost": 0,
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "armor", "slotlocation": "backpack",
"isidentified": "unknown",
"application": "", "application": "",
"preparecost": "", "preparecost": "",
"preparetime": "", "preparetime": "",
@ -304,7 +305,8 @@
"cost": 0, "cost": 0,
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "armor", "slotlocation": "backpack",
"isidentified": "unknown",
"dcfind": 0, "dcfind": 0,
"dcdisable": 0, "dcdisable": 0,
"throwtohit": 0, "throwtohit": 0,
@ -315,7 +317,8 @@
"cost": 0, "cost": 0,
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "armor", "slotlocation": "backpack",
"isidentified": "unknown",
"class": "", "class": "",
"mandatoryfor": "", "mandatoryfor": "",
"description": "" "description": ""
@ -325,9 +328,6 @@
"slotlocation": "backpack", "slotlocation": "backpack",
"description": "" "description": ""
}, },
"genericitem": {
"description": ""
},
"condition": { "condition": {
"conditiontype": "", "conditiontype": "",
"duration": "", "duration": "",
@ -382,6 +382,7 @@
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "weapon1", "slotlocation": "weapon1",
"isidentified": "unknown",
"description": "" "description": ""
}, },
"armor": { "armor": {
@ -392,6 +393,7 @@
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "armor", "slotlocation": "armor",
"isidentified": "unknown",
"description": "" "description": ""
}, },
"shield": { "shield": {
@ -402,6 +404,7 @@
"quantity": 1, "quantity": 1,
"slotused": 1, "slotused": 1,
"slotlocation": "shield", "slotlocation": "shield",
"isidentified": "unknown",
"description": "" "description": ""
}, },
"equipment": { "equipment": {
@ -412,6 +415,7 @@
"slotused": 1, "slotused": 1,
"slotlocation": "backpack", "slotlocation": "backpack",
"providedslot": 0, "providedslot": 0,
"isidentified": "unknown",
"description": "" "description": ""
}, },
"power": { "power": {

View File

@ -31,8 +31,9 @@
{{#if hasmax}} {{#if hasmax}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.max" value="{{stat.max}}" data-dtype="Number"/> <input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.max" value="{{stat.max}}" data-dtype="Number"/>
{{/if}} {{/if}}
{{#if hasuse}} {{#if hasuse}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/> <input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/>
<label class="item-field-label-2rem">&nbsp;/&nbsp;</label>
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/> <input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
{{/if}} {{/if}}

View File

@ -10,7 +10,18 @@
{{/select}} {{/select}}
</select> </select>
</li> </li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.quantity"}}</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.identified"}}</label>
<select class="item-field-label-long " type="text" name="system.identified" value="{{system.identified}}" data-dtype="String">
{{#select system.identified}}
{{#each config.identifiedState as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.quantity"}}</label>
<input type="text" class="item-field-label-medium " name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/> <input type="text" class="item-field-label-medium " name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
</li> </li>
<li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label> <li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label>