@adatechnology/game-fluids 0.6.6 → 0.6.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/README.md +3 -3
- package/dist/index.d.ts +5 -0
- package/dist/index.global.js +79 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +79 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -407,6 +407,28 @@ var liquids_default = [
|
|
|
407
407
|
"corrosive"
|
|
408
408
|
]
|
|
409
409
|
},
|
|
410
|
+
{
|
|
411
|
+
id: "sewage",
|
|
412
|
+
color: 5921582,
|
|
413
|
+
opacity: 0.92,
|
|
414
|
+
stainColor: 3093273,
|
|
415
|
+
viscosity: 4,
|
|
416
|
+
density: 1010,
|
|
417
|
+
dryTime: 1800,
|
|
418
|
+
gloss: 0.8,
|
|
419
|
+
leavesMark: true,
|
|
420
|
+
drink: {
|
|
421
|
+
thirst: 0,
|
|
422
|
+
effects: [
|
|
423
|
+
"disgust",
|
|
424
|
+
"poison"
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
tags: [
|
|
428
|
+
"organic",
|
|
429
|
+
"waste"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
410
432
|
{
|
|
411
433
|
id: "honey",
|
|
412
434
|
color: 14193162,
|
|
@@ -438,6 +460,46 @@ var liquids_default = [
|
|
|
438
460
|
tags: [
|
|
439
461
|
"dirty"
|
|
440
462
|
]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
id: "coolant",
|
|
466
|
+
color: 3455050,
|
|
467
|
+
opacity: 0.7,
|
|
468
|
+
stainColor: 2783796,
|
|
469
|
+
viscosity: 4,
|
|
470
|
+
density: 1070,
|
|
471
|
+
dryTime: 1200,
|
|
472
|
+
gloss: 0.85,
|
|
473
|
+
leavesMark: true,
|
|
474
|
+
drink: {
|
|
475
|
+
thirst: 0,
|
|
476
|
+
effects: [
|
|
477
|
+
"poison"
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
tags: [
|
|
481
|
+
"coolant"
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
id: "brake_fluid",
|
|
486
|
+
color: 13145646,
|
|
487
|
+
opacity: 0.8,
|
|
488
|
+
stainColor: 9069600,
|
|
489
|
+
viscosity: 8,
|
|
490
|
+
density: 1050,
|
|
491
|
+
dryTime: 3600,
|
|
492
|
+
gloss: 0.9,
|
|
493
|
+
leavesMark: true,
|
|
494
|
+
drink: {
|
|
495
|
+
thirst: 0,
|
|
496
|
+
effects: [
|
|
497
|
+
"poison"
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
tags: [
|
|
501
|
+
"brake_fluid"
|
|
502
|
+
]
|
|
441
503
|
}
|
|
442
504
|
];
|
|
443
505
|
|
|
@@ -589,8 +651,11 @@ var locales = {
|
|
|
589
651
|
acid: "acid",
|
|
590
652
|
paint: "paint",
|
|
591
653
|
bleach: "bleach",
|
|
654
|
+
sewage: "sewage",
|
|
592
655
|
honey: "honey",
|
|
593
|
-
mud: "mud"
|
|
656
|
+
mud: "mud",
|
|
657
|
+
coolant: "coolant",
|
|
658
|
+
brake_fluid: "brake fluid"
|
|
594
659
|
},
|
|
595
660
|
events: {
|
|
596
661
|
fill: "filled",
|
|
@@ -632,8 +697,11 @@ var locales = {
|
|
|
632
697
|
acid: "\xE1cido",
|
|
633
698
|
paint: "tinta",
|
|
634
699
|
bleach: "\xE1gua sanit\xE1ria",
|
|
700
|
+
sewage: "esgoto",
|
|
635
701
|
honey: "mel",
|
|
636
|
-
mud: "lama"
|
|
702
|
+
mud: "lama",
|
|
703
|
+
coolant: "l\xEDquido de arrefecimento",
|
|
704
|
+
brake_fluid: "fluido de freio"
|
|
637
705
|
},
|
|
638
706
|
events: {
|
|
639
707
|
fill: "encheu",
|
|
@@ -1482,6 +1550,15 @@ function createFluids(options = {}) {
|
|
|
1482
1550
|
for (const key of Object.keys(c.streams)) endStreamKey(c, key);
|
|
1483
1551
|
containers.delete(id);
|
|
1484
1552
|
},
|
|
1553
|
+
shatter(id) {
|
|
1554
|
+
const c = containers.get(id);
|
|
1555
|
+
if (!c) return;
|
|
1556
|
+
const liquid = c.liquid;
|
|
1557
|
+
const liters = c.liters;
|
|
1558
|
+
const at = add(c.position, scale(c.normal, c.liters > 0 ? c.d : 0));
|
|
1559
|
+
world.removeContainer(id);
|
|
1560
|
+
if (liquid && liters > 0) world.splash(liquid, at, liters, c.velocity);
|
|
1561
|
+
},
|
|
1485
1562
|
setTransform(id, position, rotation, velocity) {
|
|
1486
1563
|
const c = containers.get(id);
|
|
1487
1564
|
if (!c) return;
|