feat: Add NPC compendium with 49 PNJs from the rulebook
- 9 esprits-animaux nommés (James Kam, Karen Sen, Susan Chow, Hyun Ci, Michelle Chun, Scott Zang, Pui Gan, Bui Hok, Sonia Tsui) - 8 fantômes (Phil Mok, Tony Meng + 4 archétypes génériques) - 13 démons (Je Maan, Good Boy, Charlie Fei, Zoeng, Ban Daan + 8 archétypes génériques) - 4 jiugwaai (Juk Lyun + archétypes gaaujan, gwat jyun) - 2 divinités (Ruby Jin Jin / tinneoi, Jing Tin) - 3 mortels initiés nommés (Laureen Zoeng, Julian Po, John Wa) - 8 PNJ du scénario L'Année du Lion (Alexander Weng, Maximilian Pang, Ginny Ching, Ken Luan, Jeffrey Chiu, Paul Fei, Leonie Fei, Carrie Suet) - 3 archétypes mortels génériques (Fat si sorcier, Intermédiaire, Consultant ésotérique) - Suppression du fichier modèle npc_Modele_Creature.json - Recompilation du pack cde-npcs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -11,5 +11,26 @@
|
||||
* @license CC BY-NC-SA 4.0 – https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
*/
|
||||
|
||||
/** Default icons per item type. */
|
||||
const DEFAULT_ICONS = {
|
||||
kungfu: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-kungfu.svg",
|
||||
spell: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-spell.svg",
|
||||
supernatural: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-supernatural.svg",
|
||||
weapon: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-weapon.svg",
|
||||
armor: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-armor.svg",
|
||||
sanhei: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-sanhei.svg",
|
||||
ingredient: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-ingredient.svg",
|
||||
item: "systems/fvtt-chroniques-de-l-etrange/images/icons/icon-item.svg",
|
||||
};
|
||||
|
||||
export class CDEItem extends Item {
|
||||
|
||||
/** @override */
|
||||
async _preCreate(data, options, userId) {
|
||||
await super._preCreate(data, options, userId);
|
||||
const defaultIcon = DEFAULT_ICONS[this.type];
|
||||
if (defaultIcon && (!data.img || data.img === Item.DEFAULT_ICON)) {
|
||||
this.updateSource({ img: defaultIcon });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user