first page
This commit is contained in:
@@ -38,7 +38,8 @@ export class TotemActorSheet extends ActorSheet {
|
||||
// Add the actor's data to context.data for easier access, as well as flags.
|
||||
context.system = actorData.system;
|
||||
context.flags = actorData.flags;
|
||||
|
||||
context.config = CONFIG.TOTEM;
|
||||
|
||||
// Prepare character data and items.
|
||||
if (actorData.type == 'character') {
|
||||
this._prepareItems(context);
|
||||
@@ -69,7 +70,7 @@ export class TotemActorSheet extends ActorSheet {
|
||||
_prepareCharacterData(context) {
|
||||
// Handle ability scores.
|
||||
for (let [k, v] of Object.entries(context.system.abilities)) {
|
||||
v.label = game.i18n.localize(CONFIG.TOTEM.abilities[k]) ?? k;
|
||||
v.label = game.i18n.localize(context.system.abilities[k].label) ?? k;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+50
-52
@@ -4,63 +4,61 @@ export const TOTEM = {};
|
||||
* The set of Ability Scores used within the sytem.
|
||||
* @type {Object}
|
||||
*/
|
||||
/*
|
||||
|
||||
|
||||
TOTEM.SkillLevels = {
|
||||
1:{ "label":"TOTEM.SkillLevel.beginner", "dicePool":1, "reroll":0},
|
||||
2:{ "label":"TOTEM.SkillLevel.proficient", "dicePool":1, "reroll":1},
|
||||
3:{ "label":"TOTEM.SkillLevel.expert", "dicePool":2, "reroll":1},
|
||||
4:{ "label":"TOTEM.SkillLevel.master", "dicePool":2, "reroll":2},
|
||||
5:{ "label":"TOTEM.SkillLevel.legend", "dicePool":3, "reroll":2},
|
||||
}
|
||||
|
||||
TOTEM.nations = {
|
||||
"istanie1":{
|
||||
"label": "Istanie (îles du couchant)",
|
||||
"cities": ["tanger", "argan", "ar'kobah", "ishandra"]
|
||||
TOTEM.TotemNumbers = {
|
||||
1:{ "label":"TOTEM.totems.human", "key":"human"},
|
||||
2:{ "label":"TOTEM.totems.scavenger", "key":"scavenger"},
|
||||
3:{ "label":"TOTEM.totems.symbiote", "key":"symbiote"},
|
||||
4:{ "label":"TOTEM.totems.parasite", "key":"parasite"},
|
||||
5:{ "label":"TOTEM.totems.builder", "key":"builder"},
|
||||
6:{ "label":"TOTEM.totems.horde", "key":"horde"},
|
||||
7:{ "label":"TOTEM.totems.hive", "key":"hive"},
|
||||
8:{ "label":"TOTEM.totems.solitary", "key":"solitary"},
|
||||
9:{ "label":"TOTEM.totems.adapted", "key":"adapted"}
|
||||
}
|
||||
|
||||
|
||||
TOTEM.abilityCategories = {
|
||||
"physical": {
|
||||
"label":"TOTEM.abilityCategory.physical"
|
||||
},
|
||||
"istanie2":{
|
||||
"label": "Istanie (monts dinariques)",
|
||||
"cities": ["montenegro", "ishandra"]
|
||||
"manual": {
|
||||
"label":"TOTEM.abilityCategory.manual"
|
||||
},
|
||||
"istanie3":{
|
||||
"label": "Istanie (anatolie)",
|
||||
"cities": ["ismyr", "istanbul", "ankara"]
|
||||
"mental": {
|
||||
"label":"TOTEM.abilityCategory.mental"
|
||||
},
|
||||
"pentapolie":{
|
||||
"label": "Pentapolie",
|
||||
"cities": ["serone", "éole", "relais de l'affrevie", "relais de bragee", "géode", "théorie", "démos", "négoce", "lucé"]
|
||||
},
|
||||
"venice":{
|
||||
"label": "Venice",
|
||||
"cities": ["venice"]
|
||||
},
|
||||
"rhodesiennes":{
|
||||
"label": "Provinces rhodesiennes",
|
||||
"cities": ["alsyde", "spicule", "urbs", "les syénites"]
|
||||
},
|
||||
"methalune":{
|
||||
"label": "Méthalune",
|
||||
"cities": ["méthalune", "ferraille"]
|
||||
},
|
||||
"gloriana":{
|
||||
"label": "Gloriana",
|
||||
"cities": ["enclosure", "londres", "camelot", "hivernee"]
|
||||
},
|
||||
"antipolie":{
|
||||
"label": "Antipolie",
|
||||
"cities": ["paris", "ithar","candbury","abaya", "relais d'elphiel", "entrelace", "prague", "vienne"]
|
||||
},
|
||||
"olmune":{
|
||||
"label": "Principautés d'Olmune",
|
||||
"cities": ["entrepont", "olmune","arssens","braysine"]
|
||||
},
|
||||
"lansk":{
|
||||
"label": "Lansk",
|
||||
"cities": ["saint-petersbourg", "hypogée","sancre","moscou", "kiev","kryo"]
|
||||
},
|
||||
"nordanie":{
|
||||
"label": "Nordanie",
|
||||
"cities": ["souspente", "gottenborg","solth", "nacre", "dorvik", "mystille"]
|
||||
},
|
||||
"terraincognita":{
|
||||
"label": "Terra Incognita",
|
||||
"cities": ["chantier de transécryme"]
|
||||
"social": {
|
||||
"label":"TOTEM.abilityCategory.social"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
TOTEM.skillCategories = {
|
||||
"man": {
|
||||
"label":"TOTEM.skillCategory.man"
|
||||
},
|
||||
"animal": {
|
||||
"label":"TOTEM.skillCategory.animal"
|
||||
},
|
||||
"machine": {
|
||||
"label":"TOTEM.skillCategory.machine"
|
||||
},
|
||||
"weapon": {
|
||||
"label":"TOTEM.skillCategory.weapon"
|
||||
},
|
||||
"survival": {
|
||||
"label":"TOTEM.skillCategory.survival"
|
||||
},
|
||||
"earth": {
|
||||
"label":"TOTEM.skillCategory.earth"
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,14 @@
|
||||
export class WarningDialog extends Dialog {
|
||||
|
||||
constructor(dialogData) {
|
||||
let options = { classes: ["warning"] };
|
||||
let conf = {
|
||||
title: "Avertissement",
|
||||
content: dialogData.content
|
||||
};
|
||||
super(conf, options);
|
||||
this.dialogData = dialogData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
activateListeners(html) {
|
||||
/*super.activateListeners(html);
|
||||
this.html = html;
|
||||
this.setEphemere(this.dialogData.signe.system.ephemere);
|
||||
html.find(".signe-aleatoire").click(event => this.setSigneAleatoire());
|
||||
html.find("[name='signe.system.ephemere']").change((event) => this.setEphemere(event.currentTarget.checked));
|
||||
html.find(".signe-xp-sort").change((event) => this.onValeurXpSort(event));
|
||||
html.find("input.select-actor").change((event) => this.onSelectActor(event));
|
||||
html.find("input.select-tmr").change((event) => this.onSelectTmr(event));*/
|
||||
}
|
||||
|
||||
|
||||
async onSelectActor(event) {
|
||||
/*const actorId = this.html.find(event.currentTarget)?.data("actor-id");
|
||||
const actor = this.dialogData.actors.find(it => it.id == actorId);
|
||||
if (actor) {
|
||||
actor.selected = event.currentTarget.checked;
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class CombatResultDialog extends Dialog {
|
||||
|
||||
constructor(dialogData, options) {
|
||||
let options = { classes: ["combat", "result"], ...options };
|
||||
/*let options = { classes: ["combat", "result"], ...options };
|
||||
let conf = {
|
||||
title: "Résultat de la confrontation",
|
||||
content: dialogData.content
|
||||
};
|
||||
super(conf, options);
|
||||
this.dialogData = dialogData;
|
||||
this.dialogData = dialogData;*/
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
+3
-13
@@ -14,21 +14,11 @@ export const registerHooks = function () {
|
||||
if ($("#pause").attr("class") !== "paused") return;
|
||||
$(".paused img").attr("src", 'systems/totem/images/pause.webp');
|
||||
$(".paused img").css({ "opacity": 1});
|
||||
$("#pause.paused").css({ "display": "flex", "justify-content": "center" });
|
||||
$("#pause.paused figcaption").css({ "width": `256px`, "height": `256px` });
|
||||
$("#pause.paused figcaption").text(game.i18n.localize("TOTEM.PausedText"));
|
||||
$("#pause.paused figcaption").text("En cours de destruction...");
|
||||
});
|
||||
|
||||
/*Hooks.on("renderPause", ((_app, html) => {
|
||||
html.find("img").attr("src", "systems/bol/ui/pause2.webp")
|
||||
}))
|
||||
|
||||
Hooks.on('renderChatLog', (log, html, data) => BoLUtility.chatListeners(html))
|
||||
Hooks.on('renderChatMessage', (message, html, data) => BoLUtility.chatMessageHandler(message, html, data))
|
||||
*/
|
||||
console.log("rendering hooks");
|
||||
Hooks.on('renderChatLog', (log, html, data) => TotemFight.chatListeners(html));
|
||||
Hooks.on('renderChatMessage', (message, html, data) => TotemFight.chatMessageHandler(message, html, data));
|
||||
// Hooks.on('renderChatLog', (log, html, data) => TotemFight.chatListeners(html));
|
||||
// Hooks.on('renderChatMessage', (message, html, data) => TotemFight.chatMessageHandler(message, html, data));
|
||||
|
||||
/**
|
||||
* Create a macro when dropping an entity on the hotbar
|
||||
|
||||
+9
-1
@@ -1,3 +1,7 @@
|
||||
import { registerHandlebarsHelpers } from "./system/helpers.mjs";
|
||||
import { registerHooks } from "./system/hooks.mjs";
|
||||
import { registerSettings } from "./system/settings.mjs";
|
||||
|
||||
// Import document classes.
|
||||
import { TotemActor } from "./documents/actor.mjs";
|
||||
import { TotemItem } from "./documents/item.mjs";
|
||||
@@ -6,7 +10,7 @@ import { TotemActorSheet } from "./sheets/actor-sheet.mjs";
|
||||
import { TotemItemSheet } from "./sheets/item-sheet.mjs";
|
||||
// Import helper/utility classes and constants.
|
||||
import { preloadHandlebarsTemplates } from "./helpers/templates.mjs";
|
||||
import { TOTEM } from "./helpers/config.mjs";
|
||||
import { TOTEM } from "./system/config.mjs";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Init Hook */
|
||||
@@ -44,6 +48,10 @@ Hooks.once('init', async function() {
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("totem", TotemItemSheet, { makeDefault: true });
|
||||
|
||||
registerHandlebarsHelpers(); // Register Handlebars helpers
|
||||
registerHooks(); // register Hooks
|
||||
registerSettings(); // register Engrenages Settings
|
||||
|
||||
// Preload Handlebars templates.
|
||||
return preloadHandlebarsTemplates();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user