h1z1-server 0.48.1-2 → 0.48.1-3

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.
@@ -1025,7 +1025,7 @@
1025
1025
  },
1026
1026
  {
1027
1027
  "file_name": "Assets_256.pack",
1028
- "crc32_hash": "5fd58d48"
1028
+ "crc32_hash": "fe0eaa1f"
1029
1029
  },
1030
1030
  {
1031
1031
  "file_name": "Assets_257.pack",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "item": 25,
38
- "weight": 6,
38
+ "weight": 8,
39
39
  "count": {
40
40
  "min": 1,
41
41
  "max": 1
@@ -44,4 +44,4 @@
44
44
  ]
45
45
  }
46
46
  ]
47
- }
47
+ }
@@ -66,7 +66,7 @@
66
66
  },
67
67
  {
68
68
  "item": 25,
69
- "weight": 1,
69
+ "weight": 2,
70
70
  "count": {
71
71
  "min": 10,
72
72
  "max": 15
@@ -83,4 +83,4 @@
83
83
  ]
84
84
  }
85
85
  ]
86
- }
86
+ }
@@ -7,7 +7,7 @@
7
7
  "entries": [
8
8
  {
9
9
  "item": 25,
10
- "weight": 23,
10
+ "weight": 33,
11
11
  "count": {
12
12
  "min": 1,
13
13
  "max": 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h1z1-server",
3
- "version": "0.48.1-2",
3
+ "version": "0.48.1-3",
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",
@@ -474,8 +474,6 @@ export class ConstructionManager {
474
474
  // for construction entities that don't have a parentObjectCharacterId from the client
475
475
  let freeplaceParentCharacterId = "";
476
476
  // TODO: SEARCH FOUNDATIONS IN GRID RANGE INSTEAD OF ALL OF THEM
477
- // TODO: CHECK DECKS BEFORE TAMPERS SO OBJECTS PLACED ON A DECK DON'T GET INCORRECTLY
478
- // PARENTED TO THE TAMPER A DECK IS ON
479
477
  for (const a in server._constructionFoundations) {
480
478
  const foundation = server._constructionFoundations[a];
481
479
  // check if inside a shelter even if not inside foundation (large shelters can extend it)
@@ -507,7 +505,21 @@ export class ConstructionManager {
507
505
  });
508
506
  }
509
507
 
510
- // check deck last in case it's parented to a shelter or upper first
508
+ // check expansion decks before the foundation/tamper itself
509
+ if (!Number(freeplaceParentCharacterId)) {
510
+ Object.values(foundation.occupiedExpansionSlots).forEach(
511
+ (expansion) => {
512
+ if (
513
+ !Number(freeplaceParentCharacterId) &&
514
+ expansion.isInside(position)
515
+ ) {
516
+ freeplaceParentCharacterId = expansion.characterId;
517
+ }
518
+ }
519
+ );
520
+ }
521
+
522
+ // check foundation last so expansion decks/shelters take priority
511
523
  if (
512
524
  !Number(freeplaceParentCharacterId) &&
513
525
  foundation.isInside(position)