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-wal
database.sqlite
database.sqlite-shm
database.sqlite-wal
**/.env
**/.env.local
**/.env.development.local
@ -21,4 +24,4 @@ Thumbs.db
client/dist/
client/build/
game-server-*
game-server-*

View File

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

View File

@ -71,7 +71,7 @@ class DatapackLoader {
});
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 "plating":
case "materials":
case "equipment":
case "weapons":
data.type = typeKey;
this.registry.items.set(fullId, data);

View File

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