Fixed Datapackloader
Some checks are pending
Deploy MMO Server / deploy (push) Waiting to run

This commit is contained in:
MaksSlyzar 2026-05-05 01:38:54 +03:00
parent d5494c5453
commit 31fd36a4ef
4 changed files with 8 additions and 3 deletions

5
.gitignore vendored
View File

@ -7,6 +7,9 @@ game-server/*.sqlite
game-server/*.sqlite-shm game-server/*.sqlite-shm
game-server/*.sqlite-wal game-server/*.sqlite-wal
database.sqlite
database.sqlite-shm
database.sqlite-wal
**/.env **/.env
**/.env.local **/.env.local
**/.env.development.local **/.env.development.local
@ -21,4 +24,4 @@ Thumbs.db
client/dist/ client/dist/
client/build/ client/build/
game-server-* game-server-*

View File

@ -9,6 +9,7 @@ const config = {
serverRegion: process.env.REGION, serverRegion: process.env.REGION,
dbUri: process.env.DB_URI || "local", dbUri: process.env.DB_URI || "local",
host: process.env.HOST, host: process.env.HOST,
datapackSrc: process.env.DATAPACK_SRC,
}; };
module.exports = config; module.exports = config;

View File

@ -71,7 +71,7 @@ class DatapackLoader {
}); });
console.log( console.log(
`🚀 Registry Ready: ${this.registry.items.size} Items, ${this.registry.dungeons.size} Dungeons, ${this.registry.quests.size} Quests, ${this.registry.languages.size} Langs, ${manifestCount} Manifests ${this.registry.rooms.size} Rooms`, `🚀 Registry Ready: ${this.registry.recipes.size} Reciepes, ${this.registry.items.size} Items, ${this.registry.dungeons.size} Dungeons, ${this.registry.quests.size} Quests, ${this.registry.languages.size} Langs, ${manifestCount} Manifests ${this.registry.rooms.size} Rooms`,
); );
} }
@ -156,6 +156,7 @@ class DatapackLoader {
case "armour": case "armour":
case "plating": case "plating":
case "materials": case "materials":
case "equipment":
case "weapons": case "weapons":
data.type = typeKey; data.type = typeKey;
this.registry.items.set(fullId, data); this.registry.items.set(fullId, data);

View File

@ -79,7 +79,7 @@ const sendHeartbeat = async () => {
server.listen(config.port, async () => { server.listen(config.port, async () => {
try { try {
const datapacksPath = path.join(__dirname, "../datapacks"); const datapacksPath = config.datapackSrc;
DatapackLoader.init(datapacksPath, io); DatapackLoader.init(datapacksPath, io);
await sequelize.initDatabase(); await sequelize.initDatabase();
initSockets(io); initSockets(io);