forked from public/foundryvtt-reve-de-dragon
small items cleanup
Préparation pour retravailler les armes afin de gérer les attaques dans la nouvelle fenêtre de jets
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
import { HtmlUtility } from "./html-utility.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemArme } from "./item/arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDBonus } from "./rdd-bonus.js";
|
||||
import { Misc } from "./misc.js";
|
||||
|
@@ -36,7 +36,7 @@ import { ITEM_TYPES } from "./constants.js";
|
||||
import { RdDBaseActorSang } from "./actor/base-actor-sang.js";
|
||||
import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
||||
import { DialogChoixXpCarac } from "./dialog-choix-xp-carac.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemArme } from "./item/arme.js";
|
||||
import { RdDCombatManager } from "./rdd-combat.js";
|
||||
import { RdDItemTete } from "./item/tete.js";
|
||||
import { DialogSelect } from "./dialog-select.js";
|
||||
|
@@ -10,7 +10,7 @@ import { RdDBaseActor } from "./base-actor.js";
|
||||
import { ITEM_TYPES } from "../constants.js";
|
||||
import { RdDItemCompetence } from "../item-competence.js";
|
||||
import { RdDItemCompetenceCreature } from "../item-competencecreature.js";
|
||||
import { RdDItemArme } from "../item-arme.js";
|
||||
import { RdDItemArme } from "../item/arme.js";
|
||||
import { StatusEffects } from "../settings/status-effects.js";
|
||||
import { Targets } from "../targets.js";
|
||||
import { RdDConfirm } from "../rdd-confirm.js";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Grammar } from "../../grammar.js"
|
||||
import { RdDItemArme } from "../../item-arme.js"
|
||||
import { RdDItemArme } from "../../item/arme.js"
|
||||
import { RdDItemCompetence } from "../../item-competence.js"
|
||||
import { RdDItemSort } from "../../item-sort.js"
|
||||
import { ITEM_TYPES } from "../../constants.js"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
import { BASE_CORPS_A_CORPS } from "./item/base-items.js";
|
||||
import { RdDCombatManager } from "./rdd-combat.js";
|
||||
import { Grammar } from "../grammar.js";
|
||||
import { RdDItemCompetenceCreature } from "../item-competencecreature.js"
|
||||
import { ITEM_TYPES } from "../constants.js";
|
||||
import { BASE_CORPS_A_CORPS } from "./base-items.js";
|
||||
import { RdDCombatManager } from "../rdd-combat.js";
|
||||
|
||||
const nomCategorieParade = {
|
||||
"sans-armes": "Sans arme",
|
||||
@@ -21,11 +21,26 @@ const nomCategorieParade = {
|
||||
/* -------------------------------------------- */
|
||||
export class RdDItemArme extends Item {
|
||||
|
||||
static get ITEM_TYPE() { return ITEM_TYPES.arme }
|
||||
|
||||
static get defaultIcon() {
|
||||
return "systems/foundryvtt-reve-de-dragon/icons/armes_armure/epee_sord.webp";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
||||
|
||||
|
||||
static isArme(item) {
|
||||
return item.type == ITEM_TYPES.arme || RdDItemCompetenceCreature.getCategorieAttaque(item);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getArme(arme) {
|
||||
switch (arme ? arme.type : '') {
|
||||
case ITEM_TYPES.arme: return arme;
|
@@ -5,7 +5,7 @@ import { RdDRaretes } from "./raretes.js";
|
||||
|
||||
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
||||
|
||||
export class RdDItemInventaireSheet extends RdDItemSheetV1 {
|
||||
export class RdDInventaireItemSheet extends RdDItemSheetV1 {
|
||||
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(RdDItemSheetV1.defaultOptions, {
|
||||
|
@@ -2,9 +2,9 @@ import { RdDBaseActorSheet } from "../actor/base-actor-sheet.js";
|
||||
import { ITEM_TYPES } from "../constants.js";
|
||||
import { RdDSheetUtility } from "../rdd-sheet-utility.js";
|
||||
import { RdDUtility } from "../rdd-utility.js";
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDConteneurItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return ITEM_TYPES.conteneur };
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDFauneItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDFauneItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return "faune" };
|
||||
|
||||
|
@@ -2,9 +2,9 @@ import { ITEM_TYPES } from "../constants.js";
|
||||
import { DialogEnchanter } from "../enchantement/dialog-enchanter.js";
|
||||
import { RdDTimestamp } from "../time/rdd-timestamp.js";
|
||||
import { RdDItemGemme } from "./gemme.js";
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDGemmeItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDGemmeItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return ITEM_TYPES.gemme };
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDHerbeItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDHerbeItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return "herbe" };
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDIngredientItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDIngredientItemSheet extends RdDInventaireItemSheet {
|
||||
static get ITEM_TYPE() { return "ingredient" };
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
export class RdDPlanteItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDPlanteItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return "plante" };
|
||||
|
||||
|
@@ -2,10 +2,10 @@ import { ITEM_TYPES } from "../constants.js";
|
||||
import { DialogEnchanter } from "../enchantement/dialog-enchanter.js";
|
||||
import { RdDTimestamp } from "../time/rdd-timestamp.js";
|
||||
import { RdDItemPotion } from "./potion.js";
|
||||
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||
import { RdDInventaireItemSheet } from "./sheet-base-inventaire.js";
|
||||
|
||||
|
||||
export class RdDPotionItemSheet extends RdDItemInventaireSheet {
|
||||
export class RdDPotionItemSheet extends RdDInventaireItemSheet {
|
||||
|
||||
static get ITEM_TYPE() { return ITEM_TYPES.potion };
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
import { ENTITE_BLURETTE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemArme } from "./item/arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { Misc } from "./misc.js";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemArme } from "./item/arme.js";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID, RDD_CONFIG } from "./constants.js"
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID, RDD_CONFIG, ITEM_TYPES } from "./constants.js"
|
||||
import { Migrations } from './migrations.js'
|
||||
|
||||
import { RdDUtility } from "./rdd-utility.js"
|
||||
@@ -39,31 +39,35 @@ import { RdDActorEntiteSheet } from "./actor/entite-sheet.js"
|
||||
import { RdDActorVehiculeSheet } from "./actor/vehicule-sheet.js"
|
||||
|
||||
import { RdDItem } from "./item.js"
|
||||
import { RdDItemArme } from "./item/arme.js"
|
||||
import { RdDItemArmure } from "./item/armure.js"
|
||||
import { RdDItemBlessure } from "./item/blessure.js"
|
||||
import { RdDItemService } from "./item/service.js"
|
||||
import { RdDItemGemme } from "./item/gemme.js"
|
||||
import { RdDItemMaladie } from "./item/maladie.js"
|
||||
import { RdDItemPoison } from "./item/poison.js"
|
||||
import { RdDItemSigneDraconique } from "./item/signedraconique.js"
|
||||
import { RdDItemQueue } from "./item/queue.js"
|
||||
import { RdDItemOmbre } from "./item/ombre.js"
|
||||
import { RdDItemSort } from "./item-sort.js"
|
||||
import { RdDItemTete } from "./item/tete.js"
|
||||
import { RdDItemPoison } from "./item/poison.js"
|
||||
import { RdDItemPotion } from "./item/potion.js"
|
||||
import { RdDItemQueue } from "./item/queue.js"
|
||||
import { RdDItemService } from "./item/service.js"
|
||||
import { RdDItemRace } from "./item/race.js"
|
||||
import { RdDItemSigneDraconique } from "./item/signedraconique.js"
|
||||
import { RdDItemSort } from "./item-sort.js"
|
||||
import { RdDItemSouffle } from "./item/souffle.js"
|
||||
|
||||
import { RdDItemTete } from "./item/tete.js"
|
||||
import { RdDRencontre } from "./item/rencontre.js"
|
||||
|
||||
import { RdDItemSheetV1 } from "./item-sheet.js"
|
||||
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
|
||||
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
||||
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
||||
import { RdDHerbeItemSheet } from "./item/sheet-herbe.js"
|
||||
import { RdDPlanteItemSheet } from "./item/sheet-plante.js"
|
||||
import { RdDIngredientItemSheet } from "./item/sheet-ingredient.js"
|
||||
import { RdDFauneItemSheet } from "./item/sheet-faune.js"
|
||||
import { RdDConteneurItemSheet } from "./item/sheet-conteneur.js"
|
||||
import { RdDItemInventaireSheet } from "./item/sheet-base-inventaire.js"
|
||||
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
||||
import { RdDHerbeItemSheet } from "./item/sheet-herbe.js"
|
||||
import { RdDFauneItemSheet } from "./item/sheet-faune.js"
|
||||
import { RdDIngredientItemSheet } from "./item/sheet-ingredient.js"
|
||||
import { RdDInventaireItemSheet } from "./item/sheet-base-inventaire.js"
|
||||
import { RdDPlanteItemSheet } from "./item/sheet-plante.js"
|
||||
import { RdDPotionItemSheet } from "./item/sheet-potion.js"
|
||||
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
||||
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
||||
import { RdDSigneDraconiqueItemSheet } from "./item/sheet-signedraconique.js"
|
||||
|
||||
import { AppAstrologie } from "./sommeil/app-astrologie.js"
|
||||
@@ -75,10 +79,6 @@ import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.
|
||||
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js"
|
||||
import { RdDStatBlockParser } from "./apps/rdd-import-stats.js"
|
||||
import { RdDJournalSheet } from "./journal/journal-sheet.js"
|
||||
import { RdDPotionItemSheet } from "./item/sheet-potion.js"
|
||||
import { RdDItemPotion } from "./item/potion.js"
|
||||
import { RdDItemGemme } from "./item/gemme.js"
|
||||
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
||||
|
||||
import * as models from "./models/_module.mjs"
|
||||
import * as items from "./documents/_module.mjs"
|
||||
@@ -106,7 +106,7 @@ export class SystemReveDeDragon {
|
||||
this.itemClasses = {
|
||||
monnaie: items.RdDItemMonnaie,
|
||||
munition: items.RdDItemMunition,
|
||||
tarot: items.RdDModelTarot,
|
||||
arme: RdDItemArme,
|
||||
armure: RdDItemArmure,
|
||||
blessure: RdDItemBlessure,
|
||||
gemme: RdDItemGemme,
|
||||
@@ -120,6 +120,7 @@ export class SystemReveDeDragon {
|
||||
service: RdDItemService,
|
||||
signedraconique: RdDItemSigneDraconique,
|
||||
souffle: RdDItemSouffle,
|
||||
tarot: items.RdDModelTarot,
|
||||
tete: RdDItemTete,
|
||||
}
|
||||
this.actorClasses = {
|
||||
@@ -206,11 +207,16 @@ export class SystemReveDeDragon {
|
||||
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorVehiculeSheet, { types: ["vehicule"], makeDefault: true })
|
||||
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorEntiteSheet, { types: ["entite"], makeDefault: true })
|
||||
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet)
|
||||
|
||||
RdDActorExportSheet.init()
|
||||
|
||||
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
||||
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, RdDInventaireItemSheet, {
|
||||
types: [
|
||||
"objet", "arme", "armure", "livre", "nourritureboisson",
|
||||
ITEM_TYPES.objet,
|
||||
ITEM_TYPES.arme,
|
||||
ITEM_TYPES.armure,
|
||||
ITEM_TYPES.livre,
|
||||
ITEM_TYPES.nourritureboisson,
|
||||
],
|
||||
makeDefault: true
|
||||
})
|
||||
@@ -223,12 +229,31 @@ export class SystemReveDeDragon {
|
||||
|
||||
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, RdDItemSheetV1, {
|
||||
types: [
|
||||
"competence", "competencecreature",
|
||||
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
|
||||
"recettecuisine", "oeuvre", "meditation",
|
||||
"queue", "ombre", "souffle", "tete", "casetmr", "sort", "sortreserve",
|
||||
"nombreastral", "tache", "maladie", "poison", "possession",
|
||||
"extraitpoetique", "empoignade"
|
||||
ITEM_TYPES.competence,
|
||||
ITEM_TYPES.competencecreature,
|
||||
ITEM_TYPES.recettealchimique,
|
||||
ITEM_TYPES.musique,
|
||||
ITEM_TYPES.chant,
|
||||
ITEM_TYPES.danse,
|
||||
ITEM_TYPES.jeu,
|
||||
ITEM_TYPES.race,
|
||||
ITEM_TYPES.recettecuisine,
|
||||
ITEM_TYPES.oeuvre,
|
||||
ITEM_TYPES.meditation,
|
||||
ITEM_TYPES.queue,
|
||||
ITEM_TYPES.ombre,
|
||||
ITEM_TYPES.souffle,
|
||||
ITEM_TYPES.tete,
|
||||
ITEM_TYPES.casetmr,
|
||||
ITEM_TYPES.sort,
|
||||
ITEM_TYPES.sortreserve,
|
||||
ITEM_TYPES.nombreastral,
|
||||
ITEM_TYPES.tache,
|
||||
ITEM_TYPES.maladie,
|
||||
ITEM_TYPES.poison,
|
||||
ITEM_TYPES.possession,
|
||||
ITEM_TYPES.extraitpoetique,
|
||||
ITEM_TYPES.empoignade
|
||||
],
|
||||
makeDefault: true
|
||||
})
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemArme } from "./item/arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDItemMeditation } from "./item-meditation.js";
|
||||
import { RdDItemSort } from "./item-sort.js";
|
||||
|
Reference in New Issue
Block a user