Initial skeleton

This commit is contained in:
2026-03-05 21:51:31 +01:00
commit 12458925a1
53 changed files with 6646 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
import { SYSTEM } from "./module/config/system.mjs"
globalThis.SYSTEM = SYSTEM
import * as models from "./module/models/_module.mjs"
import * as documents from "./module/documents/_module.mjs"
import * as applications from "./module/applications/_module.mjs"
Hooks.once("init", function () {
console.info("Adventures with Emmy | Initializing System")
console.info(SYSTEM.ASCII)
globalThis.adventuresWithEmmy = game.system
game.system.CONST = SYSTEM
game.system.api = { applications, models, documents }
CONFIG.Actor.documentClass = documents.AwEActor
CONFIG.Actor.dataModels = {
character: models.AwECharacter,
creature: models.AwECreature
}
CONFIG.Item.documentClass = documents.AwEItem
CONFIG.Item.dataModels = {
ability: models.AwEAbility,
field: models.AwEField,
archetype: models.AwEArchetype,
background: models.AwEBackground,
kit: models.AwEKit,
weapon: models.AwEWeapon,
equipment: models.AwEEquipment
}
// Register actor sheets
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet)
foundry.documents.collections.Actors.registerSheet("fvtt-adventures-with-emmy", applications.AwECharacterSheet, {
types: ["character"], makeDefault: true
})
foundry.documents.collections.Actors.registerSheet("fvtt-adventures-with-emmy", applications.AwECreatureSheet, {
types: ["creature"], makeDefault: true
})
// Register item sheets
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet)
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEAbilitySheet, {
types: ["ability"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEFieldSheet, {
types: ["field"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEArchetypeSheet, {
types: ["archetype"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEBackgroundSheet, {
types: ["background"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEKitSheet, {
types: ["kit"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEWeaponSheet, {
types: ["weapon"], makeDefault: true
})
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEEquipmentSheet, {
types: ["equipment"], makeDefault: true
})
CONFIG.ChatMessage.documentClass = documents.AwEChatMessage
})
Hooks.once("ready", function () {
console.info("Adventures with Emmy | System Ready")
})