Compare commits
2 Commits
fvtt-warhe
...
fvtt-warhe
| Author | SHA1 | Date | |
|---|---|---|---|
| bfad3d1e5f | |||
| 7827e07e1c |
@@ -15,7 +15,6 @@
|
||||
"TypeLanguage": "Language",
|
||||
"TypeCondition": "Condition",
|
||||
"TypeClass": "Class",
|
||||
"TypeGenericitem": "Class",
|
||||
"TypeMoney": "Money",
|
||||
"TypePotion": "Potion",
|
||||
"TypePoison": "Poison",
|
||||
@@ -55,6 +54,12 @@
|
||||
"WH.conf.beltpouch2": "Beltpouch 2",
|
||||
"WH.conf.beltpouch3": "Beltpouch 3",
|
||||
|
||||
"WH.conf.unknown": "Unknown",
|
||||
"WH.conf.yes": "Yes",
|
||||
"WH.conf.no": "No",
|
||||
"WH.conf.notapplicable": "Not applicable",
|
||||
"WH.conf.undefined": "Not applicable",
|
||||
|
||||
"WH.ui.level": "Level",
|
||||
"WH.ui.notes": "Notes",
|
||||
|
||||
@@ -185,6 +190,7 @@
|
||||
"WH.ui.diseaseduration": "Disease duration",
|
||||
"WH.ui.ignoreeffect": "Ignore effect",
|
||||
"WH.ui.raceSkills": "Race skills",
|
||||
"WH.ui.identified": "Identified",
|
||||
|
||||
"WH.chat.save": "Save",
|
||||
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
||||
|
||||
@@ -57,7 +57,7 @@ export class WarheroActorSheet extends ActorSheet {
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
competency: this.actor.getCompetency(),
|
||||
race: duplicate(race),
|
||||
class: duplicate(this.actor.getClass()),
|
||||
classes: duplicate(this.actor.getClasses()),
|
||||
totalMoney: this.actor.computeTotalMoney(),
|
||||
//moneys: duplicate(this.actor.getMoneys()),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
|
||||
@@ -162,6 +162,11 @@ export class WarheroActor extends Actor {
|
||||
let classWH = this.items.filter(item => item.type == 'class')
|
||||
return classWH[0] ?? [];
|
||||
}
|
||||
getClasses() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == "class") || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
checkAndPrepareEquipment(item) {
|
||||
}
|
||||
@@ -254,7 +259,7 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getNormalSkills() {
|
||||
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill)
|
||||
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill && !it.system.raceskill)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp
|
||||
}
|
||||
|
||||
@@ -81,6 +81,13 @@ export const WARHERO_CONFIG = {
|
||||
untilendcombat: "WH.ui.untilendcombat",
|
||||
beginturn: "WH.ui.beginturn",
|
||||
endturn: "WH.ui.endturn"
|
||||
},
|
||||
|
||||
identifiedState: {
|
||||
unknown: "WH.conf.unknown",
|
||||
yes:"WH.conf.yes",
|
||||
no:"WH.conf.no",
|
||||
notapplicable:"WH.conf.notapplicable"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,7 +56,6 @@ Hooks.once("init", async function () {
|
||||
CONFIG.Combat.documentClass = WarheroCombat
|
||||
CONFIG.Actor.documentClass = WarheroActor
|
||||
CONFIG.Item.documentClass = WarheroItem
|
||||
//CONFIG.Token.objectClass = WarheroToken
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
@@ -79,28 +78,15 @@ 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({
|
||||
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()
|
||||
//WarheroHotbar.initDropbar()
|
||||
|
||||
})
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
/*Hooks.on("chatMessage", (html, content, msg) => {
|
||||
if (content[0] == '/') {
|
||||
let regExp = /(\S+)/g;
|
||||
let commands = content.match(regExp);
|
||||
@@ -109,5 +95,5 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});*/
|
||||
|
||||
|
||||
@@ -1491,11 +1491,22 @@ li {
|
||||
max-width: 22rem;
|
||||
min-width: 22rem;
|
||||
}
|
||||
.item-name-label-long3 {
|
||||
flex-grow: 2;
|
||||
max-width: 32rem;
|
||||
min-width: 32rem;
|
||||
}
|
||||
.item-name-label-level2 {
|
||||
flex-grow: 2;
|
||||
max-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 {
|
||||
flex-grow: 1;
|
||||
margin-top: 4px;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"styles": [
|
||||
"styles/simple.css"
|
||||
],
|
||||
"version": "10.0.35",
|
||||
"version": "10.0.37",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
@@ -115,7 +115,7 @@
|
||||
},
|
||||
"title": "Warhero RPG",
|
||||
"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.37.zip",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||
"background": "images/ui/warhero_welcome_page.webp",
|
||||
"id": "fvtt-warhero"
|
||||
|
||||
@@ -243,7 +243,6 @@
|
||||
"language",
|
||||
"condition",
|
||||
"class",
|
||||
"genericitem",
|
||||
"money",
|
||||
"potion",
|
||||
"poison",
|
||||
@@ -280,7 +279,8 @@
|
||||
"cost": 0,
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "armor",
|
||||
"slotlocation": "backpack",
|
||||
"isidentified": "unknown",
|
||||
"alchemycost": "",
|
||||
"preparetime": "",
|
||||
"durationround": 0,
|
||||
@@ -290,7 +290,8 @@
|
||||
"cost": 0,
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "armor",
|
||||
"slotlocation": "backpack",
|
||||
"isidentified": "unknown",
|
||||
"application": "",
|
||||
"preparecost": "",
|
||||
"preparetime": "",
|
||||
@@ -304,7 +305,8 @@
|
||||
"cost": 0,
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "armor",
|
||||
"slotlocation": "backpack",
|
||||
"isidentified": "unknown",
|
||||
"dcfind": 0,
|
||||
"dcdisable": 0,
|
||||
"throwtohit": 0,
|
||||
@@ -315,7 +317,8 @@
|
||||
"cost": 0,
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "armor",
|
||||
"slotlocation": "backpack",
|
||||
"isidentified": "unknown",
|
||||
"class": "",
|
||||
"mandatoryfor": "",
|
||||
"description": ""
|
||||
@@ -325,9 +328,6 @@
|
||||
"slotlocation": "backpack",
|
||||
"description": ""
|
||||
},
|
||||
"genericitem": {
|
||||
"description": ""
|
||||
},
|
||||
"condition": {
|
||||
"conditiontype": "",
|
||||
"duration": "",
|
||||
@@ -382,6 +382,7 @@
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "weapon1",
|
||||
"isidentified": "unknown",
|
||||
"description": ""
|
||||
},
|
||||
"armor": {
|
||||
@@ -392,6 +393,7 @@
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "armor",
|
||||
"isidentified": "unknown",
|
||||
"description": ""
|
||||
},
|
||||
"shield": {
|
||||
@@ -402,6 +404,7 @@
|
||||
"quantity": 1,
|
||||
"slotused": 1,
|
||||
"slotlocation": "shield",
|
||||
"isidentified": "unknown",
|
||||
"description": ""
|
||||
},
|
||||
"equipment": {
|
||||
@@ -412,6 +415,7 @@
|
||||
"slotused": 1,
|
||||
"slotlocation": "backpack",
|
||||
"providedslot": 0,
|
||||
"isidentified": "unknown",
|
||||
"description": ""
|
||||
},
|
||||
"power": {
|
||||
|
||||
@@ -27,14 +27,16 @@
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-item-id="{{class._id}}">
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
|
||||
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
|
||||
<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 classes as |class idx|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{class._id}}">
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
|
||||
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
|
||||
<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}}
|
||||
<li class="item flexrow list-item" >
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.religion"}}</label>
|
||||
<input type="text" class="item-field-label-medium" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" />
|
||||
@@ -458,10 +460,10 @@
|
||||
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{power.img}}" /></a>
|
||||
<span class="item-name-label">
|
||||
<span class="item-name-label-long3">
|
||||
<a class="power-roll"><i class="fa-solid fa-dice-d20"></i>{{power.name}}</a>
|
||||
</span>
|
||||
<span class="item-name-label">
|
||||
<span class="item-name-label-medium">
|
||||
<a class="power-roll">{{power.system.level}}</a>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
@@ -523,6 +525,10 @@
|
||||
</label>
|
||||
</span>
|
||||
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize (concat "WH.conf." item.system.isidentified)}}</label>
|
||||
</span>
|
||||
|
||||
<div class="item-filler"> </div>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
{{/if}}
|
||||
{{#if hasuse}}
|
||||
<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"> / </label>
|
||||
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -10,7 +10,18 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
</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.isidentified" value="{{system.isidentified}}" data-dtype="String">
|
||||
{{#select system.isidentified}}
|
||||
{{#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"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label>
|
||||
|
||||
Reference in New Issue
Block a user