First character sheet, wip
This commit is contained in:
@ -21,21 +21,11 @@ import { Imperium5Item } from "./imperium5-item.js";
|
||||
|
||||
/************************************************************************************/
|
||||
Hooks.once("init", async function () {
|
||||
console.log(`Initializing Pegasus RPG`);
|
||||
console.log(`Initializing Imperium5 RPG`);
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// preload handlebars templates
|
||||
PegasusUtility.preloadHandlebarsTemplates();
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("fvtt-pegasus-rpg", "dice-max-level", {
|
||||
name: "Maximum level value for dices lists",
|
||||
hint: "Se the maximum level value for dices lists",
|
||||
scope: "world",
|
||||
config: true,
|
||||
default: 20,
|
||||
type: Number
|
||||
});
|
||||
Imperium5Utility.preloadHandlebarsTemplates();
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
@ -45,30 +35,28 @@ Hooks.once("init", async function () {
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.socket.on("system.fvtt-pegasus-rpg", data => {
|
||||
PegasusUtility.onSocketMesssage(data)
|
||||
game.socket.on("system.fvtt-imperium5", data => {
|
||||
Imperium5Utility.onSocketMesssage(data)
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Define custom Entity classes
|
||||
CONFIG.Combat.documentClass = PegasusCombat
|
||||
CONFIG.Actor.documentClass = PegasusActor
|
||||
CONFIG.Item.documentClass = PegasusItem
|
||||
//CONFIG.Token.objectClass = PegasusToken
|
||||
game.system.pegasus = { };
|
||||
CONFIG.Combat.documentClass = Imperium5Combat
|
||||
CONFIG.Actor.documentClass = Imperium5Actor
|
||||
CONFIG.Item.documentClass = Imperium5Item
|
||||
game.system.imperium5 = { }
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true });
|
||||
Actors.registerSheet("fvtt-pegasus", PegasusNPCSheet, { types: ["npc"], makeDefault: false });
|
||||
Actors.unregisterSheet("core", ActorSheet)
|
||||
Actors.registerSheet("fvtt-imperium5", Imperium5ActorSheet, { types: ["character"], makeDefault: true })
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-pegasus", PegasusItemSheet, { makeDefault: true });
|
||||
Items.unregisterSheet("core", ItemSheet)
|
||||
Items.registerSheet("fvtt-imperium5", Imperium5ItemSheet, { makeDefault: true } )
|
||||
|
||||
PegasusUtility.init();
|
||||
Imperium5Utility.init()
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
/* -------------------------------------------- */
|
||||
function welcomeMessage() {
|
||||
@ -76,15 +64,7 @@ function welcomeMessage() {
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-pegasus"><span class="rdd-roll-part">
|
||||
<strong>Welcome to the Pegasus Engine CORE RPG.</strong>
|
||||
<br>Created by GMD Online
|
||||
<p>The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price.</p>
|
||||
<p>This project has been made possible thanks to all the Official GMD Members and Patreon Members that have supported me and as a result made it possible to supply this interface for free.</p>
|
||||
<p>In return I have made available a fully detailed Compendium for FREE for all members, which can be obtained from the Members page on my website.</p>
|
||||
<P>You too can become a supporter for future projects and enjoy amazing rewards.
|
||||
<BR>Sign up Here : https://www.gmdonline.co.uk/gmdmemberspage/</p>
|
||||
<p>GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved.</p>
|
||||
<p>Enjoy and become the hero you were born to be!</p>
|
||||
<strong>Bienvenue dans Imperium5 !</strong>
|
||||
` });
|
||||
}
|
||||
|
||||
@ -93,36 +73,36 @@ function welcomeMessage() {
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once("ready", function () {
|
||||
|
||||
PegasusUtility.ready();
|
||||
// User warning
|
||||
Imperium5Utility.ready()
|
||||
|
||||
if (!game.user.isGM && game.user.character == undefined) {
|
||||
ui.notifications.info("Warning ! No character linked to your user !");
|
||||
ui.notifications.info("Attention ! Aucun personnage n'est relié !")
|
||||
ChatMessage.create({
|
||||
content: "<b>WARNING</b> The player " + game.user.name + " is not linked to a character !",
|
||||
content: "<b>WARNING</b> Le joueur " + game.user.name + " n'est pas connecté à un personnage !",
|
||||
user: game.user._id
|
||||
});
|
||||
}
|
||||
|
||||
// CSS patch for v9
|
||||
if (game.version) {
|
||||
let sidebar = document.getElementById("sidebar");
|
||||
sidebar.style.width = "min-content";
|
||||
let sidebar = document.getElementById("sidebar")
|
||||
sidebar.style.width = "min-content"
|
||||
}
|
||||
|
||||
welcomeMessage();
|
||||
});
|
||||
welcomeMessage()
|
||||
})
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
if (content[0] == '/') {
|
||||
let regExp = /(\S+)/g;
|
||||
let commands = content.match(regExp);
|
||||
if (game.system.pegasus.commands.processChatCommand(commands, content, msg)) {
|
||||
return false;
|
||||
let regExp = /(\S+)/g
|
||||
let commands = content.match(regExp)
|
||||
if (game.system.imperium5.commands.processChatCommand(commands, content, msg)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return true
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user