Initial system development
This commit is contained in:
@ -24,6 +24,10 @@ export class SoSActorSheet extends ActorSheet {
|
||||
getData() {
|
||||
let data = super.getData();
|
||||
|
||||
console.log("stats", data);
|
||||
//data.stats = duplicate(this.actor.stats);
|
||||
//data.scores = duplicate(this.actor.scores);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -37,7 +41,7 @@ export class SoSActorSheet extends ActorSheet {
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
||||
//HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
@ -32,7 +32,6 @@ export class SoSActor extends Actor {
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
||||
return super.create(data, options);
|
||||
}
|
||||
|
||||
|
@ -11,9 +11,7 @@
|
||||
import { SoSActor } from "./actor.js";
|
||||
import { SoSItemSheet } from "./item-sheet.js";
|
||||
import { SoSActorSheet } from "./actor-sheet.js";
|
||||
import { SoSUtility } from "./rdd-utility.js";
|
||||
//import { SoSTokenHud } from "./rdd-token-hud.js";
|
||||
//import { SoSCommands } from "./rdd-commands.js";
|
||||
import { SoSUtility } from "./sos-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -36,7 +34,7 @@ Hooks.once("init", async function () {
|
||||
// preload handlebars templates
|
||||
SoSUtility.preloadHandlebarsTemplates();
|
||||
// Create useful storage space
|
||||
game.system.sos = { TMRUtility: TMRUtility }
|
||||
game.system.sos = { }
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
@ -59,9 +57,9 @@ Hooks.once("init", async function () {
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("foundryvtt-reve-de-dragon", SoSActorSheet, { types: ["character"], makeDefault: true });
|
||||
Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("foundryvtt-reve-de-dragon", SoSItemSheet, { makeDefault: true });
|
||||
Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
|
||||
|
||||
// Patch the initiative formula
|
||||
_patch_initiative();
|
||||
@ -70,7 +68,7 @@ Hooks.once("init", async function () {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
function welcomeMessage() {
|
||||
ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
|
||||
//ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
|
||||
ChatMessage.create({
|
||||
user: game.user._id,
|
||||
whisper: [game.user._id],
|
||||
@ -112,6 +110,6 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||
RdDUtility.pushInitiativeOptions(html, options);
|
||||
//SoS.pushInitiativeOptions(html, options);
|
||||
}
|
||||
)
|
||||
|
@ -3,11 +3,13 @@ export class SoSUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async preloadHandlebarsTemplates() {
|
||||
|
||||
const templatePaths = [
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/editor-notes-gm.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item-shet.html'
|
||||
'systems/foundryvtt-shadows-over-sol/templates/actor-sheet.html',
|
||||
'systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html',
|
||||
'systems/foundryvtt-shadows-over-sol/templates/stat-option-list.html',
|
||||
'systems/foundryvtt-shadows-over-sol/templates/item-sheet.html'
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user