17,376
edits
(Update code) |
(Update code: Amend namespace data) |
||
Line 18: | Line 18: | ||
this.packData = {}; | this.packData = {}; | ||
this.gameData = {}; | this.gameData = {}; | ||
this.dataPropFilters = { | this.dataPropFilters = { | ||
// Specifies rules for properties of entities (items, monsters, etc.) which | // Specifies rules for properties of entities (items, monsters, etc.) which | ||
Line 303: | Line 302: | ||
throw new Error(`Couldn't find data for package ${ namespace }`); | throw new Error(`Couldn't find data for package ${ namespace }`); | ||
} | } | ||
// Add | // Add data within the game but outside of data packs | ||
this.registerNonPackData(); | this.registerNonPackData(); | ||
// Consolidate data | // Consolidate data | ||
Line 452: | Line 450: | ||
registerNonPackData() { | registerNonPackData() { | ||
// Some data resides outside of packages. Add any such data to this.gameData within this function | // Some data resides outside of packages. Add any such data to this.gameData within this function | ||
if (this.gameData.namespaces === undefined) { | |||
const nsData = []; | |||
game.registeredNamespaces.forEach((ns) => nsData.push(ns)); | |||
this.gameData.namespaces = nsData; | |||
} | |||
if (this.gameData.combatTriangles === undefined) { | if (this.gameData.combatTriangles === undefined) { | ||
const ctData = []; | const ctData = []; |