Skip to content

Commit 0441c82

Browse files
authored
Merge pull request #351 from runejs/feature/server-module
Splitting server-specific code out into a new @server submodule
2 parents 7fe08ca + b5bd5da commit 0441c82

File tree

203 files changed

+930
-891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+930
-891
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
[ "babel-plugin-module-resolver", {
1515
"root": [ "./src" ],
1616
"alias": {
17-
"@engine": "./dist/game-engine",
17+
"@engine": "./dist/engine",
18+
"@server": "./dist/server",
1819
"@plugins": "./dist/plugins"
1920
}
2021
} ]

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"start": "npm run build && concurrently \"npm run build:watch\" \"npm run start:infra\" \"npm run start:game\"",
8-
"start:game": "nodemon --delay 5000ms --max-old-space-size=2048 dist/main.js",
8+
"start:game": "nodemon --delay 5000ms --max-old-space-size=2048 dist/server/runner.js -- -game",
99
"start:game:dev": "npm run build && concurrently \"npm run build:watch\" \"npm run start:game\"",
10-
"start:login": "node --max-old-space-size=1024 dist/game-engine/login-server.js",
11-
"start:update": "node --max-old-space-size=1024 dist/game-engine/update-server.js",
10+
"start:login": "node --max-old-space-size=1024 dist/server/runner.js -- -login",
11+
"start:update": "node --max-old-space-size=1024 dist/server/runner.js -- -update",
1212
"start:infra": "concurrently \"npm run start:update\" \"npm run start:login\"",
1313
"start:standalone": "concurrently \"npm run start:infra\" \"npm run start:game\"",
1414
"game": "npm run start:game",
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'json5/lib/register';
12
import { logger } from '@runejs/core';
23
import _ from 'lodash';
34
import {
@@ -6,7 +7,7 @@ import {
67
loadItemConfigurations,
78
translateItemConfig
89
} from '@engine/config/item-config';
9-
import { filestore, questMap } from '@engine/game-server';
10+
import { filestore } from '@server/game/game-server';
1011
import {
1112
loadNpcConfigurations,
1213
NpcDetails,
@@ -15,13 +16,11 @@ import {
1516
} from '@engine/config/npc-config';
1617
import { loadNpcSpawnConfigurations, NpcSpawn } from '@engine/config/npc-spawn-config';
1718
import { loadShopConfigurations, Shop } from '@engine/config/shop-config';
18-
import { Quest } from '@engine/world/actor/player/quest';
19+
import { Quest } from '@engine/world/actor';
1920
import { ItemSpawn, loadItemSpawnConfigurations } from '@engine/config/item-spawn-config';
2021
import { loadMusicRegionConfigurations, MusicTrack } from '@engine/config/music-regions-config';
2122
import { loadXteaRegionFiles, ObjectConfig, XteaRegion } from '@runejs/filestore';
22-
23-
require('json5/lib/register');
24-
23+
import { questMap } from '@engine/plugins';
2524

2625

2726
export let itemMap: { [key: string]: ItemDetails };
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from 'path';
22
import { writeFileSync } from 'fs';
3-
import { filestore } from '@engine/game-server';
3+
import { filestore } from '@server/game/game-server';
44
import { logger } from '@runejs/core';
55
import { ItemConfig, NpcConfig, ObjectConfig, WidgetBase } from '@runejs/filestore';
66

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ export * from './music-regions-config';
55
export * from './npc-config';
66
export * from './npc-spawn-config';
77
export * from './quest-config';
8-
export * from './server-config';
98
export * from './shop-config';
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DefensiveBonuses } from '@engine/config/item-config';
22
import { loadConfigurationFiles } from '@runejs/core/fs';
3-
import { filestore } from '@engine/game-server';
3+
import { filestore } from '@server/game/game-server';
44
import _ from 'lodash';
55
import { NpcConfig } from '@runejs/filestore';
66
import { logger } from '@runejs/core';
File renamed without changes.

0 commit comments

Comments
 (0)