h1z1-server 0.48.1-0 → 0.48.1-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/data/2016/lootTables/containers/Locker.json +1 -1
  2. package/data/2016/lootTables/containers/Weapons_Locker.json +1 -1
  3. package/data/2016/lootTables/containers/sub/File_military.json +1 -1
  4. package/data/2016/lootTables/ground/ItemSpawnerRare_Tier00.adr.json +1 -1
  5. package/data/2016/sampleData/screenEffects.json +297 -1
  6. package/data/defaultDatabase/shared/servers.json +62 -61
  7. package/docker-compose.yml +56 -0
  8. package/package.json +13 -13
  9. package/plugins/TestPlugin/tsconfig.json +6 -2
  10. package/src/servers/ZoneServer2016/classes/gridcell.ts +3 -0
  11. package/src/servers/ZoneServer2016/classes/trackedentityset.ts +16 -1
  12. package/src/servers/ZoneServer2016/classes/zoneclient.ts +13 -1
  13. package/src/servers/ZoneServer2016/data/loadouts.ts +53 -0
  14. package/src/servers/ZoneServer2016/entities/basefullcharacter.ts +2 -1
  15. package/src/servers/ZoneServer2016/entities/destroyable.ts +10 -7
  16. package/src/servers/ZoneServer2016/entities/explosiveentity.ts +3 -0
  17. package/src/servers/ZoneServer2016/entities/npc.ts +4 -0
  18. package/src/servers/ZoneServer2016/entities/watersource.ts +0 -1
  19. package/src/servers/ZoneServer2016/handlers/commands/commands.ts +22 -1
  20. package/src/servers/ZoneServer2016/handlers/commands/dev.ts +14 -0
  21. package/src/servers/ZoneServer2016/managers/aimanager.ts +1 -0
  22. package/src/servers/ZoneServer2016/managers/constructionmanager.ts +71 -42
  23. package/src/servers/ZoneServer2016/managers/groupmanager.ts +49 -45
  24. package/src/servers/ZoneServer2016/managers/worlddatamanager.ts +47 -17
  25. package/src/servers/ZoneServer2016/managers/worldobjectmanager.ts +175 -88
  26. package/src/servers/ZoneServer2016/models/config.ts +2 -2
  27. package/src/servers/ZoneServer2016/zonepackethandlers.ts +54 -35
  28. package/src/servers/ZoneServer2016/zoneserver.ts +369 -142
  29. package/src/utils/utils.ts +5 -0
  30. package/tsconfig.json +3 -2
  31. package/tsconfigs/tsconfig-tests.json +6 -3
  32. package/.claude/settings.local.json +0 -7
  33. package/config.yaml +0 -198
  34. package/src/servers/ZoneServer2016/managers/packetencodingworker.ts +0 -108
  35. package/src/servers/ZoneServer2016/managers/worlddatamanagerthread.ts +0 -76
@@ -11,7 +11,7 @@
11
11
  { "item": 2271, "weight": 25, "count": { "min": 1, "max": 1 } },
12
12
  { "item": 2172, "weight": 20, "count": { "min": 1, "max": 1 } },
13
13
  { "item": 10, "weight": 10, "count": { "min": 1, "max": 1 } },
14
- { "item": 2229, "weight": 8, "count": { "min": 1, "max": 1 } }
14
+ { "item": 2229, "weight": 3, "count": { "min": 1, "max": 1 } }
15
15
  ]
16
16
  },
17
17
  {
@@ -8,7 +8,7 @@
8
8
  "rolls": { "min": 0, "max": 1 },
9
9
  "entries": [
10
10
  { "item": 10, "weight": 15, "count": { "min": 1, "max": 1 } },
11
- { "item": 2229, "weight": 12, "count": { "min": 1, "max": 1 } },
11
+ { "item": 2229, "weight": 8, "count": { "min": 1, "max": 1 } },
12
12
  { "item": 1373, "weight": 8, "count": { "min": 1, "max": 1 } },
13
13
  { "item": 2271, "weight": 30, "count": { "min": 1, "max": 1 } },
14
14
  { "item": 2124, "weight": 25, "count": { "min": 1, "max": 1 } }
@@ -7,7 +7,7 @@
7
7
  "entries": [
8
8
  {
9
9
  "item": 2229,
10
- "weight": 5,
10
+ "weight": 2,
11
11
  "functions": [{ "function": "set_damage", "min": 0.3, "max": 0.9 }]
12
12
  },
13
13
  { "item": 2325, "weight": 20, "count": { "min": 1, "max": 3 } },
@@ -132,7 +132,7 @@
132
132
  "entries": [
133
133
  {
134
134
  "item": 2229,
135
- "weight": 80,
135
+ "weight": 10,
136
136
  "count": { "min": 1, "max": 1 },
137
137
  "functions": [{ "function": "set_damage", "min": 0.2, "max": 0.8 }]
138
138
  },
@@ -91,6 +91,302 @@
91
91
  "unknownDword17": 1.5,
92
92
  "unknownDword18": 0.05,
93
93
  "unknownDword19": 1082130432
94
+ },
95
+ {
96
+ "id": 9,
97
+ "typeName": "HALF_ZOMBIE",
98
+ "duration": 8000,
99
+ "screenBrightness": 0,
100
+ "colorGradingFilename": "colorkey_zombie_half.tga",
101
+ "colorGrading": 1,
102
+ "screenCover": 0,
103
+ "transparency": 0,
104
+ "color": "000000"
105
+ },
106
+ {
107
+ "id": 10,
108
+ "typeName": "FULL_ZOMBIE",
109
+ "duration": 8000,
110
+ "screenBrightness": 0,
111
+ "colorGradingFilename": "colorkey_zombie_full.tga",
112
+ "colorGrading": 1,
113
+ "screenCover": 0,
114
+ "transparency": 0,
115
+ "color": "000000"
116
+ },
117
+ {
118
+ "id": 11,
119
+ "typeName": "FALSE_DAWN",
120
+ "duration": 8000,
121
+ "screenBrightness": 0,
122
+ "colorGradingFilename": "colorkey_falsedawn.tga",
123
+ "colorGrading": 1,
124
+ "screenCover": 0,
125
+ "transparency": 0,
126
+ "color": "000000"
127
+ },
128
+ {
129
+ "id": 12,
130
+ "typeName": "TWILIGHT",
131
+ "duration": 4294967295,
132
+ "screenBrightness": 0,
133
+ "colorGradingFilename": "colorkey_twilight.tga",
134
+ "colorGrading": 1,
135
+ "screenCover": 0,
136
+ "transparency": 0,
137
+ "color": "000000"
138
+ },
139
+ {
140
+ "id": 13,
141
+ "typeName": "DUSK",
142
+ "duration": 4294967295,
143
+ "screenBrightness": 0,
144
+ "colorGradingFilename": "colorkey_dusk.tga",
145
+ "colorGrading": 1,
146
+ "screenCover": 0,
147
+ "transparency": 0,
148
+ "color": "000000"
149
+ },
150
+ {
151
+ "id": 14,
152
+ "typeName": "DEEP_BLUE",
153
+ "duration": 4294967295,
154
+ "screenBrightness": 0,
155
+ "colorGradingFilename": "colorkey_deepblue.tga",
156
+ "colorGrading": 1,
157
+ "screenCover": 0,
158
+ "transparency": 0,
159
+ "color": "000000"
160
+ },
161
+ {
162
+ "id": 15,
163
+ "typeName": "IDENTITY",
164
+ "duration": 4294967295,
165
+ "screenBrightness": 0,
166
+ "colorGradingFilename": "colorkey_identity.tga",
167
+ "colorGrading": 1,
168
+ "screenCover": 0,
169
+ "transparency": 0,
170
+ "color": "000000"
171
+ },
172
+ {
173
+ "id": 16,
174
+ "typeName": "DAY_DESATURATION",
175
+ "duration": 4294967295,
176
+ "screenBrightness": 0,
177
+ "colorGradingFilename": "colorkey_day_desaturation.tga",
178
+ "colorGrading": 1,
179
+ "screenCover": 0,
180
+ "transparency": 0,
181
+ "color": "000000"
182
+ },
183
+ {
184
+ "id": 17,
185
+ "typeName": "DARK_DESATURATION",
186
+ "duration": 4294967295,
187
+ "screenBrightness": 0,
188
+ "colorGradingFilename": "colorkey_darkdesaturation.tga",
189
+ "colorGrading": 1,
190
+ "screenCover": 0,
191
+ "transparency": 0,
192
+ "color": "000000"
193
+ },
194
+ {
195
+ "id": 18,
196
+ "typeName": "BLOWNOUT_DESATURATION",
197
+ "duration": 4294967295,
198
+ "screenBrightness": 0,
199
+ "colorGradingFilename": "colorkey_blownout_desaturation.tga",
200
+ "colorGrading": 1,
201
+ "screenCover": 0,
202
+ "transparency": 0,
203
+ "color": "000000"
204
+ },
205
+ {
206
+ "id": 19,
207
+ "typeName": "NIGHT",
208
+ "duration": 4294967295,
209
+ "screenBrightness": 0,
210
+ "colorGradingFilename": "colorkey_night.tga",
211
+ "colorGrading": 1,
212
+ "screenCover": 0,
213
+ "transparency": 0,
214
+ "color": "000000"
215
+ },
216
+ {
217
+ "id": 20,
218
+ "typeName": "CONTRAST_DESATURATION",
219
+ "duration": 4294967295,
220
+ "screenBrightness": 0,
221
+ "colorGradingFilename": "colorkey_contrast_desaturation.tga",
222
+ "colorGrading": 1,
223
+ "screenCover": 0,
224
+ "transparency": 0,
225
+ "color": "000000"
226
+ },
227
+ {
228
+ "id": 21,
229
+ "typeName": "DAY",
230
+ "duration": 4294967295,
231
+ "screenBrightness": 0,
232
+ "colorGradingFilename": "colorkey_day.tga",
233
+ "colorGrading": 1,
234
+ "screenCover": 0,
235
+ "transparency": 0,
236
+ "color": "000000"
237
+ },
238
+ {
239
+ "id": 22,
240
+ "typeName": "DAWN",
241
+ "duration": 4294967295,
242
+ "screenBrightness": 0,
243
+ "colorGradingFilename": "colorkey_dawn.tga",
244
+ "colorGrading": 1,
245
+ "screenCover": 0,
246
+ "transparency": 0,
247
+ "color": "000000"
248
+ },
249
+ {
250
+ "id": 23,
251
+ "typeName": "Z2_DAY",
252
+ "duration": 4294967295,
253
+ "screenBrightness": 0,
254
+ "colorGradingFilename": "z2_colorkey_day.tga",
255
+ "colorGrading": 1,
256
+ "screenCover": 0,
257
+ "transparency": 0,
258
+ "color": "000000"
259
+ },
260
+ {
261
+ "id": 24,
262
+ "typeName": "Z2_NIGHT",
263
+ "duration": 4294967295,
264
+ "screenBrightness": 0,
265
+ "colorGradingFilename": "z2_colorkey_night.tga",
266
+ "colorGrading": 1,
267
+ "screenCover": 0,
268
+ "transparency": 0,
269
+ "color": "000000"
270
+ },
271
+ {
272
+ "id": 25,
273
+ "typeName": "Z2_DAWN",
274
+ "duration": 4294967295,
275
+ "screenBrightness": 0,
276
+ "colorGradingFilename": "z2_colorkey_dawn.tga",
277
+ "colorGrading": 1,
278
+ "screenCover": 0,
279
+ "transparency": 0,
280
+ "color": "000000"
281
+ },
282
+ {
283
+ "id": 26,
284
+ "typeName": "NEXUS_DAWN",
285
+ "duration": 4294967295,
286
+ "screenBrightness": 0,
287
+ "colorGradingFilename": "nexus_colorkey_dawn.tga",
288
+ "colorGrading": 1,
289
+ "screenCover": 0,
290
+ "transparency": 0,
291
+ "color": "000000"
292
+ },
293
+ {
294
+ "id": 27,
295
+ "typeName": "GENERIC_CONTRAST",
296
+ "duration": 4294967295,
297
+ "screenBrightness": 0,
298
+ "colorGradingFilename": "colorkey_genericcontrast.tga",
299
+ "colorGrading": 1,
300
+ "screenCover": 0,
301
+ "transparency": 0,
302
+ "color": "000000"
303
+ },
304
+ {
305
+ "id": 29,
306
+ "typeName": "Z2_DUSK",
307
+ "duration": 4294967295,
308
+ "screenBrightness": 0,
309
+ "colorGradingFilename": "z2_colorkey_dusk.tga",
310
+ "colorGrading": 1,
311
+ "screenCover": 0,
312
+ "transparency": 0,
313
+ "color": "000000"
314
+ },
315
+ {
316
+ "id": 30,
317
+ "typeName": "SKY_CLOUDTEST",
318
+ "duration": 4294967295,
319
+ "screenBrightness": 0,
320
+ "colorGradingFilename": "sky_colorkey_cloudtest.tga",
321
+ "colorGrading": 1,
322
+ "screenCover": 0,
323
+ "transparency": 0,
324
+ "color": "000000"
325
+ },
326
+ {
327
+ "id": 31,
328
+ "typeName": "NEXUS_NIGHT",
329
+ "duration": 4294967295,
330
+ "screenBrightness": 0,
331
+ "colorGradingFilename": "nexus_colorkey_night.tga",
332
+ "colorGrading": 1,
333
+ "screenCover": 0,
334
+ "transparency": 0,
335
+ "color": "000000"
336
+ },
337
+ {
338
+ "id": 32,
339
+ "typeName": "NEXUS_NOON",
340
+ "duration": 4294967295,
341
+ "screenBrightness": 0,
342
+ "colorGradingFilename": "nexus_colorkey_noon.tga",
343
+ "colorGrading": 1,
344
+ "screenCover": 0,
345
+ "transparency": 0,
346
+ "color": "000000"
347
+ },
348
+ {
349
+ "id": 33,
350
+ "typeName": "Z2_FALSEDAWN",
351
+ "duration": 4294967295,
352
+ "screenBrightness": 0,
353
+ "colorGradingFilename": "z2_colorkey_falsedawn.tga",
354
+ "colorGrading": 1,
355
+ "screenCover": 0,
356
+ "transparency": 0,
357
+ "color": "000000"
358
+ },
359
+ {
360
+ "id": 34,
361
+ "typeName": "Z2_TWILIGHT",
362
+ "duration": 4294967295,
363
+ "screenBrightness": 0,
364
+ "colorGradingFilename": "z2_colorkey_twilight.tga",
365
+ "colorGrading": 1,
366
+ "screenCover": 0,
367
+ "transparency": 0,
368
+ "color": "000000"
369
+ },
370
+ {
371
+ "id": 35,
372
+ "typeName": "BRILLIANT",
373
+ "duration": 4294967295,
374
+ "screenBrightness": 0,
375
+ "colorGradingFilename": "Brilliant_colorkey.tga",
376
+ "colorGrading": 1,
377
+ "screenCover": 0,
378
+ "transparency": 0,
379
+ "color": "000000"
380
+ },
381
+ {
382
+ "id": 36,
383
+ "typeName": "NEXUS_DUSK",
384
+ "duration": 4294967295,
385
+ "screenBrightness": 0,
386
+ "colorGradingFilename": "nexus_colorkey_dusk.tga",
387
+ "colorGrading": 1,
388
+ "screenCover": 0,
389
+ "transparency": 0,
390
+ "color": "000000"
94
391
  }
95
392
  ]
96
-
@@ -1,62 +1,63 @@
1
1
  [
2
- {
3
- "serverId": 1,
4
- "serverState": 2,
5
- "serverAddress": "localhost:1117",
6
- "locked": false,
7
- "name": "",
8
- "nameId": 193,
9
- "description": "",
10
- "descriptionId": 193,
11
- "reqFeatureId": 0,
12
- "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
13
- "populationLevel": 0,
14
- "populationData": "<Population ServerCapacity=\"0\" PingAddress=\"127.0.0.1:1117\" Rulesets=\"PvE\"><factionlist IsList=\"1\"><faction Id=\"1\" Percent=\"0\" TargetPopPct=\"0\" RewardBuff=\"52\" XPBuff=\"52\" PercentAvg=\"0\"/><faction Id=\"2\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"0\"/><faction Id=\"3\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"1\"/></factionlist></Population>",
15
- "allowedAccess": false,
16
- "populationNumber": 0,
17
- "maxPopulationNumber": 100,
18
- "gameVersion": 1,
19
- "serverVersionTag": "2015",
20
- "isDisabled": false
21
- },
22
- {
23
- "serverId": 2,
24
- "serverState": 2,
25
- "serverAddress": "localhost:1117",
26
- "locked": false,
27
- "name": "",
28
- "nameId": 193,
29
- "description": "",
30
- "descriptionId": 193,
31
- "reqFeatureId": 0,
32
- "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
33
- "populationLevel": 0,
34
- "populationData": "<Population ServerCapacity=\"0\" PingAddress=\"127.0.0.1:1117\" Rulesets=\"PvE\"><factionlist IsList=\"1\"><faction Id=\"1\" Percent=\"0\" TargetPopPct=\"0\" RewardBuff=\"52\" XPBuff=\"52\" PercentAvg=\"0\"/><faction Id=\"2\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"0\"/><faction Id=\"3\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"1\"/></factionlist></Population>",
35
- "allowedAccess": true,
36
- "populationNumber": 0,
37
- "maxPopulationNumber": 100,
38
- "gameVersion": 2,
39
- "serverVersionTag": "2016",
40
- "isDisabled": false
41
- },
42
- {
43
- "serverId": 3,
44
- "serverState": 2,
45
- "serverAddress": "localhost:1117",
46
- "locked": false,
47
- "name": "",
48
- "nameId": 193,
49
- "description": "",
50
- "descriptionId": 193,
51
- "reqFeatureId": 0,
52
- "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
53
- "populationLevel": 0,
54
- "populationData": "<Population PctCap=\"0\" PingAdr=\"127.0.0.1:1117\" Rulesets=\"\" Mode=\"0\" IsLogin=\"1\" IsWL=\"0\" IsEvt=\"0\" PL=\"0\" DC=\"LVS\" PopLock=\"0\" GP=\"100\" BP=\"175\" MaxPop=\"4000\" Subregion=\"US\"><Fac IsList=\"1\"/></Population>",
55
- "allowedAccess": true,
56
- "populationNumber": 0,
57
- "maxPopulationNumber": 100,
58
- "gameVersion": 3,
59
- "serverVersionTag": "KOTK",
60
- "isDisabled": false
61
- }
62
- ]
2
+ {
3
+ "serverId": 1,
4
+ "serverState": 2,
5
+ "serverAddress": "127.0.0.1:1117",
6
+ "locked": false,
7
+ "name": "",
8
+ "nameId": 193,
9
+ "description": "",
10
+ "descriptionId": 193,
11
+ "reqFeatureId": 0,
12
+ "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
13
+ "populationLevel": 0,
14
+ "populationData": "<Population ServerCapacity=\"0\" PingAddress=\"127.0.0.1:1117\" Rulesets=\"PvE\"><factionlist IsList=\"1\"><faction Id=\"1\" Percent=\"0\" TargetPopPct=\"0\" RewardBuff=\"52\" XPBuff=\"52\" PercentAvg=\"0\"/><faction Id=\"2\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"0\"/><faction Id=\"3\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"1\"/></factionlist></Population>",
15
+ "allowedAccess": false,
16
+ "populationNumber": 0,
17
+ "maxPopulationNumber": 100,
18
+ "gameVersion": 1,
19
+ "serverVersionTag": "2015",
20
+ "isDisabled": false
21
+ },
22
+ {
23
+ "serverId": 2,
24
+ "serverState": 2,
25
+ "serverAddress": "127.0.0.1:1117",
26
+ "locked": false,
27
+ "name": "",
28
+ "nameId": 193,
29
+ "description": "",
30
+ "descriptionId": 193,
31
+ "reqFeatureId": 0,
32
+ "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
33
+ "populationLevel": 0,
34
+ "populationData": "<Population ServerCapacity=\"0\" PingAddress=\"127.0.0.1:1117\" Rulesets=\"PvE\"><factionlist IsList=\"1\"><faction Id=\"1\" Percent=\"0\" TargetPopPct=\"0\" RewardBuff=\"52\" XPBuff=\"52\" PercentAvg=\"0\"/><faction Id=\"2\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"0\"/><faction Id=\"3\" Percent=\"0\" TargetPopPct=\"1\" RewardBuff=\"0\" XPBuff=\"0\" PercentAvg=\"1\"/></factionlist></Population>",
35
+ "allowedAccess": true,
36
+ "populationNumber": 0,
37
+ "maxPopulationNumber": 100,
38
+ "gameVersion": 2,
39
+ "serverVersionTag": "2016",
40
+ "isDisabled": false
41
+ },
42
+ {
43
+ "serverId": 3,
44
+ "serverState": 2,
45
+ "serverAddress": "127.0.0.1:1117",
46
+ "locked": false,
47
+ "name": "",
48
+ "nameId": 193,
49
+ "description": "",
50
+ "descriptionId": 193,
51
+ "reqFeatureId": 0,
52
+ "serverInfo": "<ServerInfo Region=\"CharacterCreate.RegionEu\" Subregion=\"UI.SubregionEu\" IsRecommended=\"1\" IsRecommendedVS=\"0\" IsRecommendedNC=\"0\" IsRecommendedTR=\"0\" />",
53
+ "populationLevel": 0,
54
+ "populationData": "<Population PctCap=\"0\" PingAdr=\"127.0.0.1:1117\" Rulesets=\"\" Mode=\"0\" IsLogin=\"1\" IsWL=\"0\" IsEvt=\"0\" PL=\"0\" DC=\"LVS\" PopLock=\"0\" GP=\"100\" BP=\"175\" MaxPop=\"4000\" Subregion=\"US\"><Fac IsList=\"1\"/></Population>",
55
+ "allowedAccess": true,
56
+ "populationNumber": 0,
57
+ "maxPopulationNumber": 100,
58
+ "gameVersion": 3,
59
+ "serverVersionTag": "KOTK",
60
+ "isDisabled": false
61
+ }
62
+ ]
63
+
@@ -0,0 +1,56 @@
1
+ services:
2
+ mongodb:
3
+ image: mongo:6.0
4
+ restart: unless-stopped
5
+ volumes:
6
+ - mongodb-data:/data/db
7
+ environment:
8
+ MONGO_INITDB_DATABASE: h1server
9
+ ports:
10
+ - "27018:27017"
11
+
12
+ login-server:
13
+ build:
14
+ context: .
15
+ dockerfile: docker/2015/LoginServer.Dockerfile
16
+ depends_on:
17
+ - mongodb
18
+ environment:
19
+ MONGO_URL: mongodb://127.0.0.1:27018/h1server
20
+ network_mode: host
21
+ restart: unless-stopped
22
+
23
+ zone-server-2016:
24
+ build:
25
+ context: .
26
+ dockerfile: docker/2016/ZoneServer.Dockerfile
27
+ depends_on:
28
+ - mongodb
29
+ - login-server
30
+ environment:
31
+ MONGO_URL: mongodb://127.0.0.1:27018/h1server
32
+ WORLD_ID: ${WORLD_ID:-2}
33
+ LOGINSERVER_IP: "127.0.0.1"
34
+ network_mode: host
35
+ restart: unless-stopped
36
+ profiles:
37
+ - "2016"
38
+
39
+ zone-server-2015:
40
+ build:
41
+ context: .
42
+ dockerfile: docker/2015/ZoneServer.Dockerfile
43
+ depends_on:
44
+ - mongodb
45
+ - login-server
46
+ environment:
47
+ MONGO_URL: mongodb://127.0.0.1:27018/h1server
48
+ WORLD_ID: ${WORLD_ID:-0}
49
+ LOGINSERVER_IP: "127.0.0.1"
50
+ network_mode: host
51
+ restart: unless-stopped
52
+ profiles:
53
+ - "2015"
54
+
55
+ volumes:
56
+ mongodb-data:
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "h1z1-server",
3
- "version": "0.48.1-0",
3
+ "version": "0.48.1-2",
4
4
  "description": "Library for emulating h1z1 servers",
5
5
  "author": "Quentin Gruber <quentingruber@gmail.com> (http://github.com/quentingruber)",
6
6
  "license": "GPL-3.0-only",
7
7
  "main": "h1z1-server.js",
8
8
  "engines": {
9
- "node": ">=0.24.0 <26"
9
+ "node": ">=0.24.0 <27"
10
10
  },
11
11
  "bin": {
12
12
  "h1z1-server-demo": "scripts/h1z1-server-demo.js",
@@ -14,29 +14,29 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@types/js-yaml": "4.0.9",
17
- "@types/node": "25.2.0",
17
+ "@types/node": "25.9.1",
18
18
  "@types/ws": "8.18.1",
19
19
  "debug": "4.4.3",
20
- "elastic-apm-node": "^4.15.0",
20
+ "elastic-apm-node": "4.15.0",
21
21
  "h1emu-core": "1.3.2",
22
- "h1z1-dataschema": "1.9.2",
22
+ "h1z1-dataschema": "1.9.3",
23
23
  "js-yaml": "4.1.1",
24
24
  "mongodb": "6.20.0",
25
- "recast-navigation": "0.43.0",
25
+ "recast-navigation": "0.43.1",
26
26
  "threads": "1.7.0",
27
- "typescript": "5.9.3",
28
- "ws": "8.19.0"
27
+ "typescript": "6.0.3",
28
+ "ws": "8.21.0"
29
29
  },
30
30
  "directories": {
31
31
  "src": "./src"
32
32
  },
33
33
  "devDependencies": {
34
34
  "cross-env": "^10.1.0",
35
- "globals": "^17.3.0",
36
- "oxlint": "^1.43.0",
37
- "prettier": "^3.8.1",
38
- "tsx": "^4.21.0",
39
- "typedoc": "^0.28.16"
35
+ "globals": "^17.6.0",
36
+ "oxlint": "^1.67.0",
37
+ "prettier": "^3.8.3",
38
+ "tsx": "^4.22.3",
39
+ "typedoc": "^0.28.19"
40
40
  },
41
41
  "scripts": {
42
42
  "gen-packets-types": "tsx ./scripts/genPacketsNames.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
3
+ "target": "ES2023" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
4
4
  "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
5
5
  "allowJs": true /* Allow javascript files to be compiled. */,
6
6
  "declaration": true /* Generates corresponding '.d.ts' file. */,
@@ -9,7 +9,11 @@
9
9
  "baseUrl": "./src" /* Base directory to resolve non-absolute module names. */,
10
10
  "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
11
11
  "skipLibCheck": true /* Skip type checking of declaration files. */,
12
- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
12
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
13
+ "sourceMap": true,
14
+ "incremental": true,
15
+ "experimentalDecorators": true,
16
+ "types": ["node"]
13
17
  },
14
18
  "include": ["src/"]
15
19
  }
@@ -10,6 +10,9 @@ export class GridCell {
10
10
  width: number;
11
11
  height: number;
12
12
  availableScrap: number;
13
+ /** Timestamp of the last time an entity was added to this cell.
14
+ * Used to skip re-scanning cells that haven't changed since the client's last heavy-scan pass. */
15
+ lastModified = 0;
13
16
  constructor(
14
17
  server: ZoneServer2016,
15
18
  x: number,
@@ -4,13 +4,23 @@ import { BaseEntity } from "../entities/baseentity";
4
4
  * A Set<BaseEntity> that keeps an external inverse-observer registry in sync.
5
5
  * The registry maps entity.characterId → Set<TOwner> so callers can look up
6
6
  * which owners have a given entity without iterating the full owner list.
7
+ *
8
+ * Optionally accepts a filterSet + filterPredicate pair: entities matching the
9
+ * predicate are mirrored into filterSet on add/delete/clear automatically.
7
10
  */
8
11
  export class TrackedEntitySet<TOwner> extends Set<BaseEntity> {
12
+ private readonly _filterSet?: Set<BaseEntity>;
13
+ private readonly _filterPredicate?: (entity: BaseEntity) => boolean;
14
+
9
15
  constructor(
10
16
  private readonly _registry: Map<string, Set<TOwner>>,
11
- private readonly _owner: TOwner
17
+ private readonly _owner: TOwner,
18
+ filterSet?: Set<BaseEntity>,
19
+ filterPredicate?: (entity: BaseEntity) => boolean
12
20
  ) {
13
21
  super();
22
+ this._filterSet = filterSet;
23
+ this._filterPredicate = filterPredicate;
14
24
  }
15
25
 
16
26
  add(entity: BaseEntity): this {
@@ -22,6 +32,9 @@ export class TrackedEntitySet<TOwner> extends Set<BaseEntity> {
22
32
  this._registry.set(entity.characterId, obs);
23
33
  }
24
34
  obs.add(this._owner);
35
+ if (this._filterSet && this._filterPredicate?.(entity)) {
36
+ this._filterSet.add(entity);
37
+ }
25
38
  }
26
39
  return this;
27
40
  }
@@ -29,6 +42,7 @@ export class TrackedEntitySet<TOwner> extends Set<BaseEntity> {
29
42
  delete(entity: BaseEntity): boolean {
30
43
  if (super.delete(entity)) {
31
44
  this._registry.get(entity.characterId)?.delete(this._owner);
45
+ this._filterSet?.delete(entity);
32
46
  return true;
33
47
  }
34
48
  return false;
@@ -38,6 +52,7 @@ export class TrackedEntitySet<TOwner> extends Set<BaseEntity> {
38
52
  for (const entity of this) {
39
53
  this._registry.get(entity.characterId)?.delete(this._owner);
40
54
  }
55
+ this._filterSet?.clear();
41
56
  super.clear();
42
57
  }
43
58
  }