Item sheets, WIP

This commit is contained in:
sladecraven 2022-11-03 15:40:16 +01:00
parent 1b04f6ce69
commit f039600065
47 changed files with 22 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/icons/boots1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/icons/boots2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/icons/chest1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/icons/chest2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/icons/cloak1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/icons/cloak2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/icons/focus1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/icons/focus2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/icons/gloves1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/icons/gloves2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/icons/helmet1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/icons/helmet2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/icons/legs1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/icons/legs2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/icons/ring1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/icons/ring2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/icons/shield1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/icons/shield2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/icons/weapon1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/icons/weapon2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -8,10 +8,10 @@ export class Avd12Commands {
static init() {
if (!game.system.avd12.commands) {
const crucibleCommands = new CrucibleCommands();
const avd12Commands = new Avd12Commands();
//crucibleCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => crucibleCommands.createChar(msg), descr: "Create a new character" });
//crucibleCommands.registerCommand({ path: ["/pool"], func: (content, msg, params) => crucibleCommands.poolRoll(msg), descr: "Generic Roll Window" });
game.system.avd12.commands = crucibleCommands;
game.system.avd12.commands = avd12Commands;
}
}
constructor() {

View File

@ -11,7 +11,7 @@ export class Avd12ItemSheet extends ItemSheet {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-avd12", "sheet", "item"],
template: "systems/fvtt-avd12/templates/item-sheet.html",
template: "systems/fvtt-avd12/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
height: 550,
@ -150,7 +150,7 @@ export class Avd12ItemSheet extends ItemSheet {
/* -------------------------------------------- */
get template() {
let type = this.item.type;
return `systems/avd12/templates/items/item-${type}-sheet.html`
return `systems/fvtt-avd12/templates/items/item-${type}-sheet.hbs`
}
/* -------------------------------------------- */

View File

@ -1,18 +1,18 @@
import { Avd12Utility } from "./avd12-utility.js";
export const defaultItemImg = {
skill: "systems/fvtt-crucible-rpg/images/icons/icon_skill.webp",
armor: "systems/fvtt-crucible-rpg/images/icons/icon_armour.webp",
weapon: "systems/fvtt-crucible-rpg/images/icons/icon_weapon.webp",
equipment: "systems/fvtt-crucible-rpg/images/icons/icon_equipment.webp",
money: "systems/fvtt-crucible-rpg/images/icons/icon_money.webp",
skill: "systems/fvtt-avd12/images/icons/icon_skill.webp",
armor: "systems/fvtt-avd12/images/icons/icon_armour.webp",
weapon: "systems/fvtt-avd12/images/icons/icon_weapon.webp",
equipment: "systems/fvtt-avd12/images/icons/icon_equipment.webp",
money: "systems/fvtt-avd12/images/icons/icon_money.webp",
}
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class CrucibleItem extends Item {
export class Avd12Item extends Item {
constructor(data, context) {
if (!data.img) {

View File

@ -6,7 +6,7 @@
import { Avd12Utility } from "./avd12-utility.js";
/* -------------------------------------------- */
export class CrucibleNPCSheet extends ActorSheet {
export class Avd12NPCSheet extends ActorSheet {
/** @override */
static get defaultOptions() {

View File

@ -17,7 +17,7 @@ export class Avd12Utility {
this.rollDataStore = {}
this.defenderStore = {}
CrucibleCommands.init();
Avd12Commands.init();
Handlebars.registerHelper('count', function (list) {
return list.length;
@ -98,7 +98,7 @@ export class Avd12Utility {
static async chatListeners(html) {
html.on("click", '.view-item-from-chat', event => {
game.system.crucible.creator.openItemView(event)
game.system.avd12.creator.openItemView(event)
})
html.on("click", '.roll-defense-melee', event => {
let rollId = $(event.currentTarget).data("roll-id")
@ -127,7 +127,9 @@ export class Avd12Utility {
'systems/fvtt-avd12/templates/actors/editor-notes-gm.hbs',
'systems/fvtt-avd12/templates/items/partial-item-nav.hbs',
'systems/fvtt-avd12/templates/items/partial-item-description.hbs',
'systems/fvtt-avd12/templates/items/partial-options-weapons-types.hbs'
'systems/fvtt-avd12/templates/items/partial-options-weapon-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-weapon-categories.hbs',
'systems/fvtt-avd12/templates/items/partial-common-item-fields.hbs'
]
return loadTemplates(templatePaths);
}
@ -200,7 +202,7 @@ export class Avd12Utility {
}
/* -------------------------------------------- */
static saveRollData(rollData) {
game.socket.emit("system.crucible-rpg", {
game.socket.emit("system.fvtt-avd12", {
name: "msg_update_roll", data: rollData
}); // Notify all other clients of the roll
this.updateRollData(rollData)
@ -426,7 +428,7 @@ export class Avd12Utility {
}
/* -------------------------------------------- */
static async rollCrucible(rollData) {
static async rollAvd12(rollData) {
let actor = game.actors.get(rollData.actorId)

View File

@ -6,12 +6,6 @@
"gridDistance": 5,
"gridUnits": "m",
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json",
"flags": {}
}
],
"authors": [
{
@ -23,7 +17,7 @@
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12/raw/branch/master/system.json",
"compatibility": {
"minimum": "10",
"verified": "10.288",
"verified": "10",
"maximum": "10"
},
"id": "fvtt-avd12",
@ -36,7 +30,7 @@
"styles/simple.css"
],
"title": "AnyVenture D12 RPG",
"url": "https://www.uberwald.me/data/files/fvtt-avd12",
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12",
"version": "10.0.0",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12/archive/fvtt-avd12-v10.0.0.zip",
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"

View File

@ -21,7 +21,7 @@
<li class="flexrow"><label class="item-field-label-long">Weapon type</label>
<select class="competence-base flexrow" type="text" name="system.weapontype" value="{{system.weapontype}}" data-dtype="String">
{{#select system.weapontype}}
{{> systems/fvtt-avd12/templates/items/partial-weapon-types.hbs}}
{{> systems/fvtt-avd12/templates/items/partial-options-weapon-types.hbs}}
{{/select}}
</select>
</li>
@ -29,7 +29,7 @@
<li class="flexrow"><label class="item-field-label-long">Weapon category</label>
<select class="competence-base flexrow" type="text" name="system.category" value="{{system.category}}" data-dtype="String">
{{#select system.category}}
{{> systems/fvtt-avd12/templates/items/partial-weapon-categories.hbs}}
{{> systems/fvtt-avd12/templates/items/partial-options-weapon-categories.hbs}}
{{/select}}
</select>
</li>