@adatechnology/game-fluids 0.6.14 → 0.7.0
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/dist/index.d.ts +2 -0
- package/dist/index.global.js +9 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1619,6 +1619,15 @@ function createFluids(options = {}) {
|
|
|
1619
1619
|
settle(c);
|
|
1620
1620
|
return out;
|
|
1621
1621
|
},
|
|
1622
|
+
decant(id, liters) {
|
|
1623
|
+
const c = containers.get(id);
|
|
1624
|
+
if (!c || c.closed || c.liters <= 1e-6 || !(liters > 0)) return 0;
|
|
1625
|
+
const amount = Math.min(liters, c.liters);
|
|
1626
|
+
removeLiters(c, amount);
|
|
1627
|
+
refreshLevel(c);
|
|
1628
|
+
settle(c);
|
|
1629
|
+
return amount;
|
|
1630
|
+
},
|
|
1622
1631
|
drink(id, liters, options2) {
|
|
1623
1632
|
const c = containers.get(id);
|
|
1624
1633
|
const def = c ? defOf(c) : null;
|