@energy8platform/shell 0.11.0 → 0.11.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.
- package/dist/html.cjs.js +20 -4
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +20 -4
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +19 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +19 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/pixi.cjs.js +28 -7
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +28 -7
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/keyboard.ts +7 -1
- package/src/core/locales.ts +1 -1
- package/src/core/state.ts +15 -0
- package/src/core/version.ts +1 -1
- package/src/ui/html/components/BottomBar.ts +2 -1
- package/src/ui/pixi/components/BottomBar.ts +9 -3
package/dist/html.cjs.js
CHANGED
|
@@ -324,6 +324,20 @@ function nextTurbo(current, maxLevels) {
|
|
|
324
324
|
return 0;
|
|
325
325
|
return current >= maxLevels ? 0 : current + 1;
|
|
326
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Is a bonus buy unavailable right now?
|
|
329
|
+
*
|
|
330
|
+
* The three RUNTIME locks, in one place because they used to be in three: both bottom bars spelled
|
|
331
|
+
* them out for the coin, and the Shift+B hotkey spelled out a different, shorter set — so the
|
|
332
|
+
* keyboard opened the buy-bonus overlay mid-round and let a player stake a second bet on top of a
|
|
333
|
+
* round already in flight. A predicate the bars and the hotkey share cannot drift apart again.
|
|
334
|
+
*
|
|
335
|
+
* Runtime only. Whether the feature EXISTS at all is a config question (`features.buyBonus`), and
|
|
336
|
+
* whether this particular surface should offer it (mode, replay) belongs to the caller.
|
|
337
|
+
*/
|
|
338
|
+
function bonusBuyLocked(s) {
|
|
339
|
+
return s.busy || s.autoplay.active || !s.buyBonusEnabled;
|
|
340
|
+
}
|
|
327
341
|
|
|
328
342
|
/** The single brand accent (purple). The bar accent default (theme.ts) and the buy-a-bonus
|
|
329
343
|
* card default both derive from this, so a rebrand only touches one constant. */
|
|
@@ -1300,7 +1314,7 @@ const BASE_LOCALES = {
|
|
|
1300
1314
|
// Kept in a separate block (grouped per language, not interleaved) because these are long legal
|
|
1301
1315
|
// sentences, MACHINE-TRANSLATED and pending native QA. The keys are the exact English source lines
|
|
1302
1316
|
// the Stake bridge emits (see @energy8platform/stake-bridge `buildDisclaimer`). The copyright/brand
|
|
1303
|
-
// line ("TM and © {year}
|
|
1317
|
+
// line ("TM and © {year} Engine.") is deliberately omitted — it renders verbatim.
|
|
1304
1318
|
const D = {
|
|
1305
1319
|
L1: 'Malfunction voids all wins and plays.',
|
|
1306
1320
|
L2: 'A consistent internet connection is required. In the event of a disconnection, reload the game to finish any uncompleted rounds.',
|
|
@@ -1626,7 +1640,9 @@ class KeyboardController {
|
|
|
1626
1640
|
}
|
|
1627
1641
|
break;
|
|
1628
1642
|
case 'KeyB':
|
|
1629
|
-
|
|
1643
|
+
// `bonusBuyLocked` is the same predicate the bar's coin uses. Without it this hotkey
|
|
1644
|
+
// reached past a disabled coin and opened the overlay mid-round.
|
|
1645
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay && !bonusBuyLocked(s)) {
|
|
1630
1646
|
h.openBuyBonus();
|
|
1631
1647
|
return;
|
|
1632
1648
|
}
|
|
@@ -1738,7 +1754,7 @@ function keyboardCapable(win = typeof window === 'undefined' ? undefined : windo
|
|
|
1738
1754
|
|
|
1739
1755
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1740
1756
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1741
|
-
const PACKAGE_VERSION = '0.11.
|
|
1757
|
+
const PACKAGE_VERSION = '0.11.2';
|
|
1742
1758
|
|
|
1743
1759
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1744
1760
|
function resolveConfig(config) {
|
|
@@ -3345,7 +3361,7 @@ function applyBusy(host, bar) {
|
|
|
3345
3361
|
const buy = bar.querySelector('[data-ge="buybonus"]');
|
|
3346
3362
|
// disabled for the whole autoplay run (not just per-spin busy) so it doesn't flicker/pulse
|
|
3347
3363
|
if (buy)
|
|
3348
|
-
buy.disabled =
|
|
3364
|
+
buy.disabled = bonusBuyLocked(host.state);
|
|
3349
3365
|
}
|
|
3350
3366
|
|
|
3351
3367
|
/** Cue diameter, mirrored in the stylesheet. Kept here because the cue is positioned in JS. */
|