from totem to vermine - v0.0.12

This commit is contained in:
François-Xavier Guillois
2023-06-06 11:06:04 +02:00
parent d388c3ba4b
commit 2b5e639e9e
110 changed files with 369 additions and 9675 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
* Extend the base Actor document by defining a custom roll data structure which is ideal for the Simple system.
* @extends {Actor}
*/
export class TotemActor extends Actor {
export class VermineActor extends Actor {
/** @override */
prepareData() {
@@ -31,7 +31,7 @@ export class TotemActor extends Actor {
prepareDerivedData() {
const actorData = this;
const systemData = actorData.system;
const flags = actorData.flags.totem || {};
const flags = actorData.flags.vermine2047 || {};
// Make separate methods for each Actor type (character, npc, etc.) to keep
// things organized.
+1 -1
View File
@@ -2,7 +2,7 @@
* Extend the basic Item with some very simple modifications.
* @extends {Item}
*/
export class TotemItem extends Item {
export class VermineItem extends Item {
/**
* Augment the basic Item data model with additional dynamic data.
*/
+6 -6
View File
@@ -4,13 +4,13 @@ import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/eff
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
export class TotemActorSheet extends ActorSheet {
export class VermineActorSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["totem", "sheet", "actor"],
template: "systems/totem/templates/actor/actor-sheet.html",
classes: ["vermine2047", "sheet", "actor"],
template: "systems/vermine2047/templates/actor/actor-sheet.html",
height: 820,
width: 690,
resizable: false,
@@ -20,7 +20,7 @@ export class TotemActorSheet extends ActorSheet {
/** @override */
get template() {
return `systems/totem/templates/actor/actor-${this.actor.type}-sheet.html`;
return `systems/vermine2047/templates/actor/actor-${this.actor.type}-sheet.html`;
}
/* -------------------------------------------- */
@@ -39,7 +39,7 @@ 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;
context.config = CONFIG.VERMINE;
// Prepare character data and items.
if (actorData.type == 'character') {
@@ -176,7 +176,7 @@ export class TotemActorSheet extends ActorSheet {
context.traumas = traumas;
context.backgrounds = backgrounds;
context.rumors = rumors;
console.log("context", context);
// console.log("context", context);
}
+8 -8
View File
@@ -1,18 +1,18 @@
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
import { TotemActorSheet } from "./actor-sheet.mjs";
import { VermineActorSheet } from "./actor-sheet.mjs";
import { getRollBox } from "../system/dialogs.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {TotemActorSheet}
* @extends {VermineActorSheet}
*/
export class TotemCharacterSheet extends TotemActorSheet {
export class VermineCharacterSheet extends VermineActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["totem", "sheet", "actor"],
template: "systems/totem/templates/actor/actor-sheet.html",
classes: ["vermine2047", "sheet", "actor"],
template: "systems/vermine2047/templates/actor/actor-sheet.html",
width: 600,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
@@ -21,7 +21,7 @@ export class TotemCharacterSheet extends TotemActorSheet {
/** @override */
get template() {
return `systems/totem/templates/actor/actor-character-sheet.html`;
return `systems/vermine2047/templates/actor/actor-character-sheet.html`;
}
/* -------------------------------------------- */
@@ -40,7 +40,7 @@ export class TotemCharacterSheet extends TotemActorSheet {
// 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;
context.config = CONFIG.VERMINE;
// Prepare character data and items.
if (actorData.type == 'character') {
@@ -221,7 +221,7 @@ export class TotemCharacterSheet extends TotemActorSheet {
/*const label = game.i18n.localize(dataset.label) ? `[ability] ${game.i18n.localize(dataset.label)}` : '';
console.log($(element).attr('for'));
const NoD = this.actor.system.skills[$(element).attr('for').split('.')[2]]?.value || 0
return game.totem.TotemRoll.roll(this.actor.id, label, NoD, 0, {});*/
return game.vermine2047.VermineRoll.roll(this.actor.id, label, NoD, 0, {});*/
let data = {
actorId: this.actor.id,
label: game.i18n.localize(dataset.label)
+6 -6
View File
@@ -1,17 +1,17 @@
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
import { TotemActorSheet } from "./actor-sheet.mjs";
import { VermineActorSheet } from "./actor-sheet.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
export class TotemCreatureSheet extends ActorSheet {
export class VermineCreatureSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["totem", "sheet", "actor"],
template: "systems/totem/templates/actor/actor-sheet.html",
classes: ["vermine2047", "sheet", "actor"],
template: "systems/vermine2047/templates/actor/actor-sheet.html",
width: 600,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
@@ -20,7 +20,7 @@ export class TotemCreatureSheet extends ActorSheet {
/** @override */
get template() {
return `systems/totem/templates/actor/actor-${this.actor.type}-sheet.html`;
return `systems/vermine2047/templates/actor/actor-${this.actor.type}-sheet.html`;
}
/* -------------------------------------------- */
@@ -39,7 +39,7 @@ export class TotemCreatureSheet 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;
context.config = CONFIG.VERMINE;
// Prepare character data and items.
if (actorData.type == 'character') {
+3 -3
View File
@@ -2,12 +2,12 @@
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class TotemItemSheet extends ItemSheet {
export class VermineItemSheet extends ItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["totem", "sheet", "item"],
classes: ["vermine2047", "sheet", "item"],
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
@@ -16,7 +16,7 @@ export class TotemItemSheet extends ItemSheet {
/** @override */
get template() {
const path = "systems/totem/templates/item";
const path = "systems/vermine2047/templates/item";
// Return a single sheet for all item types.
// return `${path}/item-sheet.html`;
+7 -7
View File
@@ -1,17 +1,17 @@
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
import { TotemActorSheet } from "./actor-sheet.mjs";
import { VermineActorSheet } from "./actor-sheet.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {TotemActorSheet}
* @extends {VermineActorSheet}
*/
export class TotemNpcSheet extends TotemActorSheet {
export class VermineNpcSheet extends VermineActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["totem", "sheet", "actor"],
template: "systems/totem/templates/actor/actor-sheet.html",
classes: ["vermine2047", "sheet", "actor"],
template: "systems/vermine2047/templates/actor/actor-sheet.html",
width: 600,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
@@ -20,7 +20,7 @@ export class TotemNpcSheet extends TotemActorSheet {
/** @override */
get template() {
return `systems/totem/templates/actor/actor-${this.actor.type}-sheet.html`;
return `systems/vermine2047/templates/actor/actor-${this.actor.type}-sheet.html`;
}
/* -------------------------------------------- */
@@ -39,7 +39,7 @@ export class TotemNpcSheet extends TotemActorSheet {
// 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;
context.config = CONFIG.VERMINE;
// Prepare character data and items.
if (actorData.type == 'character') {
+24 -24
View File
@@ -1,4 +1,4 @@
export const TOTEM = {};
export const VERMINE = {};
/**
* The set of Ability Scores used within the sytem.
@@ -6,16 +6,16 @@ export const TOTEM = {};
*/
TOTEM.SkillLevels = {
1:{ "label":"TOTEM.skill_level.beginner", "dicePool":1, "reroll":0},
2:{ "label":"TOTEM.skill_level.proficient", "dicePool":1, "reroll":1},
3:{ "label":"TOTEM.skill_level.expert", "dicePool":2, "reroll":1},
4:{ "label":"TOTEM.skill_level.master", "dicePool":2, "reroll":2},
5:{ "label":"TOTEM.skill_level.archmaster", "dicePool":3, "reroll":2},
5:{ "label":"TOTEM.skill_level.legend", "dicePool":3, "reroll":3},
VERMINE.SkillLevels = {
1:{ "label":"VERMINE.skill_level.beginner", "dicePool":1, "reroll":0},
2:{ "label":"VERMINE.skill_level.proficient", "dicePool":1, "reroll":1},
3:{ "label":"VERMINE.skill_level.expert", "dicePool":2, "reroll":1},
4:{ "label":"VERMINE.skill_level.master", "dicePool":2, "reroll":2},
5:{ "label":"VERMINE.skill_level.archmaster", "dicePool":3, "reroll":2},
5:{ "label":"VERMINE.skill_level.legend", "dicePool":3, "reroll":3},
}
TOTEM.Instincts = {
VERMINE.Instincts = {
1:{ "key":"architect"},
2:{ "key":"sword"},
3:{ "key":"flail"},
@@ -29,45 +29,45 @@ TOTEM.Instincts = {
}
TOTEM.abilityCategories = {
VERMINE.abilityCategories = {
"physical": {
"label":"TOTEM.ability_category.physical"
"label":"VERMINE.ability_category.physical"
},
"manual": {
"label":"TOTEM.ability_category.manual"
"label":"VERMINE.ability_category.manual"
},
"mental": {
"label":"TOTEM.ability_category.mental"
"label":"VERMINE.ability_category.mental"
},
"social": {
"label":"TOTEM.ability_category.social"
"label":"VERMINE.ability_category.social"
}
}
TOTEM.skillCategories = {
VERMINE.skillCategories = {
"man": {
"label":"TOTEM.skill_category.man"
"label":"VERMINE.skill_category.man"
},
"animal": {
"label":"TOTEM.skill_category.animal"
"label":"VERMINE.skill_category.animal"
},
"tool": {
"label":"TOTEM.skill_category.tool"
"label":"VERMINE.skill_category.tool"
},
"weapon": {
"label":"TOTEM.skill_category.weapon"
"label":"VERMINE.skill_category.weapon"
},
"survival": {
"label":"TOTEM.skill_category.survival"
"label":"VERMINE.skill_category.survival"
},
"world": {
"label":"TOTEM.skill_category.world"
"label":"VERMINE.skill_category.world"
}
}
TOTEM.sexes = {"male": "TOTEM.sexes.male", "female": "TOTEM.sexes.female"};
VERMINE.sexes = {"male": "VERMINE.sexes.male", "female": "VERMINE.sexes.female"};
TOTEM.totems = {"human":"TOTEMS.human.name",
VERMINE.totems = {"human":"TOTEMS.human.name",
"predator": "TOTEMS.predator.name" ,
"scavenger": "TOTEMS.scavenger.name" ,
"symbiote": "TOTEMS.symbiote.name" ,
@@ -78,7 +78,7 @@ TOTEM.totems = {"human":"TOTEMS.human.name",
"loner": "TOTEMS.loner.name",
"adapted": "TOTEMS.adapted.name" }
TOTEM.origins = {"aon":"Aon",
VERMINE.origins = {"aon":"Aon",
"avhorae": "Avhorae" ,
"babel": "Babel",
"soleil_noir": "Empire du Soleil Noir",
+4 -4
View File
@@ -36,13 +36,13 @@
}
export const getRollBox = async function(data) {
let html = await renderTemplate('systems/totem/templates/roll.hbs', data);
let html = await renderTemplate('systems/vermine2047/templates/roll.hbs', data);
let ui = new Dialog({
title: game.i18n.localize("TOTEM.roll_tool"),
title: game.i18n.localize("VERMINE.roll_tool"),
content: html,
buttons: {
roll: {
label: game.i18n.localize('TOTEM.roll_dice'),
label: game.i18n.localize('VERMINE.roll_dice'),
callback: (html) => {
let form = html.find('#dice-pool-form');
if (!form[0].checkValidity()) {
@@ -88,7 +88,7 @@
if (formData.helped !== undefined && formData.helped == 1){
NoD += 1;
}
return game.totem.TotemRoll.roll(data.actorId, data.label, NoD, Reroll, data);
return game.vermine2047.VermineRoll.roll(data.actorId, data.label, NoD, Reroll, data);
}
},
close: {
+28 -28
View File
@@ -1,8 +1,8 @@
import { TOTEM } from "./config.mjs";
import { VERMINE } from "./config.mjs";
import { getActorSkillScore,updateActorSkillScore } from "./functions.mjs";
import { CombatResultDialog } from "./dialogs.mjs";
export class TotemFight {
export class VermineFight {
async performTest(enemyAchievement, enemyConservation, skillKey, skill, params, actor) {
const dicePool = (params.spleen != undefined || params.purpose != undefined) ? '5' : '4';
@@ -32,7 +32,7 @@ export class TotemFight {
bonusText += bonus;
let targetText = game.i18n.format('TOTEM.Selected') + ' : ' + game.i18n.format(skillKey) + " " + skill + bonusText;
let targetText = game.i18n.format('VERMINE.Selected') + ' : ' + game.i18n.format(skillKey) + " " + skill + bonusText;
if (params.specialization != undefined){
targetText += " (S)";
}
@@ -41,10 +41,10 @@ export class TotemFight {
if (params.purpose != undefined){
discardedRoll = r.terms[0].results.shift();
dicePoolHint = ' - ' + game.i18n.format('TOTEM.PurposeTrait');
dicePoolHint = ' - ' + game.i18n.format('VERMINE.PurposeTrait');
} else if (params.spleen != undefined){
discardedRoll = r.terms[0].results.pop();
dicePoolHint = ' - ' + game.i18n.format('TOTEM.SpleenTrait');
dicePoolHint = ' - ' + game.i18n.format('VERMINE.SpleenTrait');
}
const discardedRollText = (discardedRoll.result != undefined) ? '<div class="discarded-roll">' + discardedRoll.result + '</div>' : "";
@@ -53,11 +53,11 @@ export class TotemFight {
diceString += '<li class="roll die d6 die-'+ i +'">' + result + '</li>';
}
let hintText = game.i18n.format('TOTEM.ConfrontationHint');
let hintText = game.i18n.format('VERMINE.ConfrontationHint');
// Build a dynamic html using the variables from above.
const html = `
<div class="totem roll confrontation">
<div class="vermine2047 roll confrontation">
<div class="dice-roll">
<div class="dice-result">
<div class="dice-formula">
@@ -76,8 +76,8 @@ export class TotemFight {
</div>` +
`<p class="step1-text" id="step1">` + hintText + `</p>
<div class="row">
<a class="inline-block button add-to-achievement">` + game.i18n.format('TOTEM.Achievement') + `</a>
<a class="inline-block button add-to-conservation">` + game.i18n.format('TOTEM.Conservation') + `</a>
<a class="inline-block button add-to-achievement">` + game.i18n.format('VERMINE.Achievement') + `</a>
<a class="inline-block button add-to-conservation">` + game.i18n.format('VERMINE.Conservation') + `</a>
<a class="inline-block button reset"><i class="fa-solid fa-rotate-right"></i></a>
<a class="inline-block button resolve"><i class="fa-solid fa-check"></i></a>
</div>
@@ -119,24 +119,24 @@ export class TotemFight {
static instance = null;
static get() {
if (!TotemFight.instance)
TotemFight.instance = new TotemFight();
return TotemFight.instance;
if (!VermineFight.instance)
VermineFight.instance = new VermineFight();
return VermineFight.instance;
}
// data injected to char data
static previousValues = {
dicePool: 4,
skills: TOTEM.skillsList,
cskills: TOTEM.cskills,
skills: VERMINE.skillsList,
cskills: VERMINE.cskills,
cephalic: false,
achievementReroll: TOTEM.achievementReroll,
conservationReroll: TOTEM.conservationReroll
achievementReroll: VERMINE.achievementReroll,
conservationReroll: VERMINE.conservationReroll
};
static rollerTemplate = 'systems/totem/templates/fight.html';
static CombatResultTemplate = 'systems/totem/templates/fight-result.html';
static rollerTemplate = 'systems/vermine2047/templates/fight.html';
static CombatResultTemplate = 'systems/vermine2047/templates/fight-result.html';
static async chatMessageHandler(message, html, data) {
// console.log("accès au fin du fin", message._id);
@@ -225,15 +225,15 @@ export class TotemFight {
if (actor == null && externalData.speakerId != undefined && externalData.speakerId != null){
// on récupère le speakerId, et de là l'objet actor
actor = game.actors.get(externalData.speakerId);
TotemFight.previousValues['speakerName'] = actor.name;
TotemFight.previousValues['speakerImg'] = actor.img;
VermineFight.previousValues['speakerName'] = actor.name;
VermineFight.previousValues['speakerImg'] = actor.img;
} else {
TotemFight.previousValues['speakerName'] = "Anonyme";
VermineFight.previousValues['speakerName'] = "Anonyme";
}
// get the data
let charData = (externalData) => {
let o = Object.assign({ _template: TotemFight.rollerTemplate }, {...TotemFight.previousValues, ...externalData});
let o = Object.assign({ _template: VermineFight.rollerTemplate }, {...VermineFight.previousValues, ...externalData});
return o;
};
let data = charData(externalData);
@@ -243,11 +243,11 @@ export class TotemFight {
let html = await renderTemplate(data._template, data);
let ui = new Dialog({
title: game.i18n.localize("TOTEM.FightTool"),
title: game.i18n.localize("VERMINE.FightTool"),
content: html,
buttons: {
roll: {
label: game.i18n.localize('TOTEM.Roll4Fight'),
label: game.i18n.localize('VERMINE.Roll4Fight'),
callback: (html) => {
let form = html.find('#dice-pool-form');
if (!form[0].checkValidity()) {
@@ -298,7 +298,7 @@ export class TotemFight {
updateActorSkillScore(actor, skillKey, 'spent', newSpentScore);
}
return TotemFight.get().performTest(enemyAchievement + enemySkill, enemyConservation + enemySkill, skillKey, skill, params, actor);
return VermineFight.get().performTest(enemyAchievement + enemySkill, enemyConservation + enemySkill, skillKey, skill, params, actor);
}
},
cancel: {
@@ -321,7 +321,7 @@ export class TotemFight {
}
}
export class TotemCombat extends Combat {
export class VermineCombat extends Combat {
_encounterCheck(){
console.log('encounter combat object', this);
}
@@ -365,7 +365,7 @@ export class TotemCombat extends Combat {
});
if (combatant.type != 'character'){
let warningDialogHTML = await renderTemplate('systems/totem/templates/dialogs/warning.html', {
let warningDialogHTML = await renderTemplate('systems/vermine2047/templates/dialogs/warning.html', {
warningText: "Seuls les PJs peuvent initier des confrontations. Relancer l'opération au tour du PJ actif."
});
Dialog.prompt({
@@ -379,7 +379,7 @@ export class TotemCombat extends Combat {
} else {
// étape 2 : on envoie les infos
let fightingActor = game.actors.get(combatant.actorId);
TotemFight.ui({
VermineFight.ui({
speakerId: combatant.actorId,
speakerWeapons: fightingActor.items.filter(item => item.type == 'weapon'),
speakerExperience:fightingActor.system.attributes.experience.value,
+8 -8
View File
@@ -1,7 +1,7 @@
import { TOTEM } from './config.mjs'
import { VERMINE } from './config.mjs'
/**
* renvoie le score d'une compétence d'un actor existant
* @param {TotemActor}
* @param {VermineActor}
* @return {number||null} Data for rendering or null
*/
export function getActorSkillScore(actor, skillLabel, property = "value") {
@@ -27,15 +27,15 @@ export function getActorSkillScore(actor, skillLabel, property = "value") {
/**
* renvoie le type d'une compétence
* @param {TotemActor}
* @param {VermineActor}
* @return {string||null} Data for rendering or null
*/
export function getSkillTypeFromLabel(skillLabel) {
let returnedValue = null;
for(let i in TOTEM.skills){
for(let j in TOTEM.skills[i].data){
if (TOTEM.skills[i].data[j].label == skillLabel){
for(let i in VERMINE.skills){
for(let j in VERMINE.skills[i].data){
if (VERMINE.skills[i].data[j].label == skillLabel){
returnedValue = j;
}
}
@@ -46,7 +46,7 @@ export function getSkillTypeFromLabel(skillLabel) {
/**
* met à jour le score d'une compétence d'un actor existant
* @param {TotemActor}
* @param {VermineActor}
* @return {boolean} bool
*/
export function updateActorSkillScore(selectedActor, skillLabel, property = "value", updatedValue) {
@@ -84,7 +84,7 @@ export function updateActorSkillScore(selectedActor, skillLabel, property = "val
/**
* réinitialise toutes les dépenses d'usure
* @param {TotemActor}
* @param {VermineActor}
* @return {boolean} bool
*/
export function resetActorSkillUsure(selectedActor) {
+13 -13
View File
@@ -8,21 +8,21 @@
// Actor partials.
"systems/totem/templates/actor/parts/actor-spells.html",
"systems/totem/templates/actor/parts/actor-features.html",
"systems/totem/templates/actor/parts/actor-spells.html",
"systems/totem/templates/actor/parts/actor-id.hbs",
"systems/totem/templates/actor/parts/actor-totem.hbs",
"systems/totem/templates/actor/parts/character-features.hbs",
"systems/totem/templates/actor/parts/character-header.hbs",
"systems/totem/templates/actor/parts/actor-items.html",
"systems/totem/templates/actor/parts/actor-weapons.hbs",
"systems/totem/templates/actor/parts/actor-defenses.hbs",
"systems/totem/templates/actor/parts/actor-stories.hbs",
"systems/totem/templates/actor/parts/actor-effects.html",
"systems/vermine2047/templates/actor/parts/actor-spells.html",
"systems/vermine2047/templates/actor/parts/actor-features.html",
"systems/vermine2047/templates/actor/parts/actor-spells.html",
"systems/vermine2047/templates/actor/parts/actor-id.hbs",
"systems/vermine2047/templates/actor/parts/actor-totem.hbs",
"systems/vermine2047/templates/actor/parts/character-features.hbs",
"systems/vermine2047/templates/actor/parts/character-header.hbs",
"systems/vermine2047/templates/actor/parts/actor-items.html",
"systems/vermine2047/templates/actor/parts/actor-weapons.hbs",
"systems/vermine2047/templates/actor/parts/actor-defenses.hbs",
"systems/vermine2047/templates/actor/parts/actor-stories.hbs",
"systems/vermine2047/templates/actor/parts/actor-effects.html",
// additional templates
"systems/totem/templates/roll.hbs",
"systems/vermine2047/templates/roll.hbs",
]);
};
+11 -11
View File
@@ -5,19 +5,19 @@ export const registerHooks = function () {
*/
Hooks.once("ready", async () => {
console.info("Totem | System Initialized.");
console.info("Vermine 2047 | System Initialized.");
});
// changement de la pause
/*Hooks.on("renderPause", async function () {
if ($("#pause").attr("class") !== "paused") return;
$(".paused img").attr("src", 'systems/totem/assets/images/ui/vermine_pause.webp');
$(".paused img").attr("src", 'systems/vermine2047/assets/images/ui/vermine_pause.webp');
$(".paused img").css({ "opacity": 1});
$("#pause.paused figcaption").text("Communauté endormie...");
});*/
// 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) => VermineFight.chatListeners(html));
// Hooks.on('renderChatMessage', (message, html, data) => VermineFight.chatMessageHandler(message, html, data));
/**
* Create a macro when dropping an entity on the hotbar
@@ -35,11 +35,11 @@ export const registerHooks = function () {
Hooks.on('getSceneControlButtons', (controls) => {
/*controls.find((c) => c.name === 'token').tools.push({
name: 'Dice Roller',
title: game.i18n.localize("TOTEM.RollTool"),
title: game.i18n.localize("VERMINE.RollTool"),
icon: 'fas fa-dice-d6',
button: true,
onClick() {
TotemRoll.ui();
VermineRoll.ui();
}
});*/
});
@@ -51,15 +51,15 @@ export const registerHooks = function () {
Hooks.on("preCreateActor", function (actor) {
// console.log('pre create actor', actor);
if (actor.img == "icons/svg/mystery-man.svg") {
// actor.updateSource({"img": `systems/totem/icons/actors/${actor.type}.webp`});
// item.updateSource({"img": `systems/totem/icons/competence.webp`});
// actor.updateSource({"img": `systems/vermine2047/icons/actors/${actor.type}.webp`});
// item.updateSource({"img": `systems/vermine2047/icons/competence.webp`});
}
});
Hooks.on("preCreateItem", function (item) {
if (item.img == "icons/svg/item-bag.svg") {
item.updateSource({"img": `systems/totem/icons/items/${item.type}.webp`});
// item.updateSource({"img": `systems/totem/icons/competence.webp`});
item.updateSource({"img": `systems/vermine2047/icons/items/${item.type}.webp`});
// item.updateSource({"img": `systems/vermine2047/icons/competence.webp`});
}
});
@@ -98,7 +98,7 @@ export const registerHooks = function () {
},
shouldDisplayToChat: false,
iconClass: "fa-dice-d6",
description: "Roll Totem check"
description: "Roll Vermine 2047 check"
}));
});*/
+1 -1
View File
@@ -1,4 +1,4 @@
export class TotemRoll {
export class VermineRoll {
static roll(actorId, label, NoD, Reroll = 0, params = {}){
const actor = game.actors.get(actorId);
+3 -3
View File
@@ -1,7 +1,7 @@
export const registerSettings = function () {
game.settings.register("totem", "game-mode", {
name: game.i18n.localize("TOTEM.WorldSettings.GameMode.Name"),
hint: game.i18n.localize("TOTEM.WorldSettings.GameMode.Hint"),
game.settings.register("vermine2047", "game-mode", {
name: game.i18n.localize("VERMINE.WorldSettings.GameMode.Name"),
hint: game.i18n.localize("VERMINE.WorldSettings.GameMode.Hint"),
scope: "system",
config: true,
type: String,
+21 -21
View File
@@ -2,21 +2,21 @@ import { registerHooks } from "./system/hooks.mjs";
import { registerSettings } from "./system/settings.mjs";
// Import document classes.
import { TotemActor } from "./documents/actor.mjs";
import { VermineActor } from "./documents/actor.mjs";
import { TotemCharacterSheet } from "./sheets/character-sheet.mjs";
import { TotemNpcSheet } from "./sheets/npc-sheet.mjs";
import { TotemCreatureSheet } from "./sheets/creature-sheet.mjs";
import { VermineCharacterSheet } from "./sheets/character-sheet.mjs";
import { VermineNpcSheet } from "./sheets/npc-sheet.mjs";
import { VermineCreatureSheet } from "./sheets/creature-sheet.mjs";
import { TotemItem } from "./documents/item.mjs";
import { TotemItemSheet } from "./sheets/item-sheet.mjs";
import { VermineItem } from "./documents/item.mjs";
import { VermineItemSheet } from "./sheets/item-sheet.mjs";
import { TotemRoll } from "./system/roll.mjs";
import { TotemCombat } from "./system/fight.mjs";
import { VermineRoll } from "./system/roll.mjs";
import { VermineCombat } from "./system/fight.mjs";
// Import helper/utility classes and constants.
import { preloadHandlebarsTemplates, registerHandlebarsHelpers } from "./system/handlebars-manager.mjs";
import { TOTEM } from "./system/config.mjs";
import { VERMINE } from "./system/config.mjs";
/* -------------------------------------------- */
/* Init Hook */
@@ -26,15 +26,15 @@ Hooks.once('init', async function() {
// Add utility classes to the global game object so that they're more easily
// accessible in global contexts.
game.totem = {
TotemActor,
TotemItem,
TotemRoll,
TotemCombat
game.vermine2047 = {
VermineActor,
VermineItem,
VermineRoll,
VermineCombat
};
// Add custom constants for configuration.
CONFIG.TOTEM = TOTEM;
CONFIG.VERMINE = VERMINE;
/**
* Set an initiative formula for the system
@@ -46,27 +46,27 @@ Hooks.once('init', async function() {
};
// Define custom Document classes
CONFIG.Actor.documentClass = TotemActor;
CONFIG.Item.documentClass = TotemItem;
CONFIG.Actor.documentClass = VermineActor;
CONFIG.Item.documentClass = VermineItem;
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet('totem', TotemCharacterSheet, {
Actors.registerSheet('vermine2047', VermineCharacterSheet, {
types: ['character'],
makeDefault: true,
});
Actors.registerSheet('totem', TotemNpcSheet, {
Actors.registerSheet('vermine2047', VermineNpcSheet, {
types: ['npc'],
makeDefault: true,
});
Actors.registerSheet('totem', TotemCreatureSheet, {
Actors.registerSheet('vermine2047', VermineCreatureSheet, {
types: ['creature'],
makeDefault: true,
}); // Register vehicle Sheet
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("totem", TotemItemSheet, { makeDefault: true });
Items.registerSheet("vermine2047", VermineItemSheet, { makeDefault: true });
registerHandlebarsHelpers(); // Register Handlebars helpers
registerHooks(); // register Hooks