hytopia 0.3.7 → 0.3.8
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.
- package/examples/hygrounds/assets/icons/auto-sniper.png +0 -0
- package/examples/hygrounds/assets/icons/gravity-potion.png +0 -0
- package/examples/hygrounds/assets/icons/revolver.png +0 -0
- package/examples/hygrounds/assets/icons/submachine-gun.png +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/auto-sniper/auto-sniper-named-nodes.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/auto-sniper/auto-sniper.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/auto-sniper/auto-sniper.glb.md5 +1 -0
- package/examples/hygrounds/assets/models/items/.optimized/gravity-potion/gravity-potion-named-nodes.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/gravity-potion/gravity-potion.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/gravity-potion/gravity-potion.glb.md5 +1 -0
- package/examples/hygrounds/assets/models/items/.optimized/revolver/revolver-named-nodes.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/revolver/revolver.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/revolver/revolver.glb.md5 +1 -0
- package/examples/hygrounds/assets/models/items/.optimized/submachine-gun/submachine-gun-named-nodes.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/submachine-gun/submachine-gun.glb +0 -0
- package/examples/hygrounds/assets/models/items/.optimized/submachine-gun/submachine-gun.glb.md5 +1 -0
- package/examples/hygrounds/assets/models/items/auto-sniper.glb +0 -0
- package/examples/hygrounds/assets/models/items/gravity-potion.glb +0 -0
- package/examples/hygrounds/assets/models/items/revolver.glb +0 -0
- package/examples/hygrounds/assets/models/items/submachine-gun.glb +0 -0
- package/examples/hygrounds/assets/ui/index.html +51 -1
- package/examples/hygrounds/classes/GameManager.ts +39 -1
- package/examples/hygrounds/classes/GamePlayerEntity.ts +44 -13
- package/examples/hygrounds/classes/GunEntity.ts +1 -5
- package/examples/hygrounds/classes/ItemFactory.ts +12 -0
- package/examples/hygrounds/classes/items/GravityPotionEntity.ts +48 -0
- package/examples/hygrounds/classes/items/ShieldPotionEntity.ts +1 -1
- package/examples/hygrounds/classes/weapons/AutoShotgunEntity.ts +1 -1
- package/examples/hygrounds/classes/weapons/AutoSniperEntity.ts +43 -0
- package/examples/hygrounds/classes/weapons/LightMachineGunEntity.ts +2 -2
- package/examples/hygrounds/classes/weapons/RevolverEntity.ts +46 -0
- package/examples/hygrounds/classes/weapons/RocketLauncherEntity.ts +11 -2
- package/examples/hygrounds/classes/weapons/ShotgunEntity.ts +1 -1
- package/examples/hygrounds/classes/weapons/SubmachineGunEntity.ts +43 -0
- package/examples/hygrounds/gameConfig.ts +38 -6
- package/examples/hygrounds/index.ts +2 -1
- package/examples/player-persistence/README.md +3 -0
- package/examples/player-persistence/assets/map.json +2623 -0
- package/examples/player-persistence/dev/persistence/player-player-1.json +6 -0
- package/examples/player-persistence/dev/persistence/test.json +3 -0
- package/examples/player-persistence/index.ts +126 -0
- package/examples/player-persistence/package.json +16 -0
- package/package.json +1 -1
- package/server.js +1 -1
- /package/examples/hygrounds/assets/audio/sfx/{shield-potion-consume.mp3 → potion-consume.mp3} +0 -0
@@ -44,7 +44,7 @@ export const BLOCK_ID_MATERIALS: Record<string | number, number> = {
|
|
44
44
|
|
45
45
|
export const BUILD_BLOCK_ID = 37; // stone
|
46
46
|
|
47
|
-
export const CHEST_DROP_INTERVAL_MS =
|
47
|
+
export const CHEST_DROP_INTERVAL_MS = 15 * 1000; // 20 seconds
|
48
48
|
|
49
49
|
export const CHEST_DROP_REGION_AABB = {
|
50
50
|
min: { x: -45, y: 100, z: -45 },
|
@@ -60,19 +60,27 @@ export const CHEST_OPEN_DESPAWN_MS = 20 * 1000; // 20 seconds
|
|
60
60
|
export const CHEST_DROP_ITEMS = [
|
61
61
|
{
|
62
62
|
itemId: 'ak47',
|
63
|
-
pickWeight: 0.
|
63
|
+
pickWeight: 0.5,
|
64
64
|
},
|
65
65
|
{
|
66
66
|
itemId: 'auto-shotgun',
|
67
67
|
pickWeight: 0.5,
|
68
68
|
},
|
69
|
+
{
|
70
|
+
itemId: 'auto-sniper',
|
71
|
+
pickWeight: 0.5,
|
72
|
+
},
|
69
73
|
{
|
70
74
|
itemId: 'bolt-action-sniper',
|
71
|
-
pickWeight: 0.
|
75
|
+
pickWeight: 0.5,
|
76
|
+
},
|
77
|
+
{
|
78
|
+
itemId: 'gravity-potion',
|
79
|
+
pickWeight: 0.4,
|
72
80
|
},
|
73
81
|
{
|
74
82
|
itemId: 'light-machine-gun',
|
75
|
-
pickWeight: 0.
|
83
|
+
pickWeight: 0.5,
|
76
84
|
},
|
77
85
|
{
|
78
86
|
itemId: 'medpack',
|
@@ -80,15 +88,19 @@ export const CHEST_DROP_ITEMS = [
|
|
80
88
|
},
|
81
89
|
{
|
82
90
|
itemId: 'mining-drill',
|
83
|
-
pickWeight: 0.
|
91
|
+
pickWeight: 0.5,
|
84
92
|
},
|
85
93
|
{
|
86
94
|
itemId: 'pistol',
|
87
95
|
pickWeight: 1,
|
88
96
|
},
|
97
|
+
{
|
98
|
+
itemId: 'revolver',
|
99
|
+
pickWeight: 0.5,
|
100
|
+
},
|
89
101
|
{
|
90
102
|
itemId: 'rocket-launcher',
|
91
|
-
pickWeight: 0.
|
103
|
+
pickWeight: 0.4,
|
92
104
|
},
|
93
105
|
{
|
94
106
|
itemId: 'shotgun',
|
@@ -98,6 +110,10 @@ export const CHEST_DROP_ITEMS = [
|
|
98
110
|
itemId: 'shield-potion',
|
99
111
|
pickWeight: 1,
|
100
112
|
},
|
113
|
+
{
|
114
|
+
itemId: 'submachine-gun',
|
115
|
+
pickWeight: 0.5,
|
116
|
+
},
|
101
117
|
]
|
102
118
|
|
103
119
|
export const CHEST_SPAWNS = [
|
@@ -354,10 +370,18 @@ export const ITEM_SPAWN_ITEMS = [
|
|
354
370
|
itemId: 'auto-shotgun',
|
355
371
|
pickWeight: 0.05,
|
356
372
|
},
|
373
|
+
{
|
374
|
+
itemId: 'auto-sniper',
|
375
|
+
pickWeight: 0.05,
|
376
|
+
},
|
357
377
|
{
|
358
378
|
itemId: 'bolt-action-sniper',
|
359
379
|
pickWeight: 0.05,
|
360
380
|
},
|
381
|
+
{
|
382
|
+
itemId: 'gravity-potion',
|
383
|
+
pickWeight: 0.05,
|
384
|
+
},
|
361
385
|
{
|
362
386
|
itemId: 'light-machine-gun',
|
363
387
|
pickWeight: 0.05,
|
@@ -374,6 +398,10 @@ export const ITEM_SPAWN_ITEMS = [
|
|
374
398
|
itemId: 'pistol',
|
375
399
|
pickWeight: 1,
|
376
400
|
},
|
401
|
+
{
|
402
|
+
itemId: 'revolver',
|
403
|
+
pickWeight: 0.1,
|
404
|
+
},
|
377
405
|
{
|
378
406
|
itemId: 'rocket-launcher',
|
379
407
|
pickWeight: 0.03,
|
@@ -386,6 +414,10 @@ export const ITEM_SPAWN_ITEMS = [
|
|
386
414
|
itemId: 'shield-potion',
|
387
415
|
pickWeight: 1,
|
388
416
|
},
|
417
|
+
{
|
418
|
+
itemId: 'submachine-gun',
|
419
|
+
pickWeight: 0.05,
|
420
|
+
},
|
389
421
|
];
|
390
422
|
|
391
423
|
export const ITEM_SPAWNS_AT_START = 8;
|