@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.d.ts
CHANGED
|
@@ -641,7 +641,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
641
641
|
tokens: ShellTokens;
|
|
642
642
|
layout: ShellLayoutMode;
|
|
643
643
|
soundOn: boolean;
|
|
644
|
-
readonly engineVersion = "0.11.
|
|
644
|
+
readonly engineVersion = "0.11.2";
|
|
645
645
|
readonly actions: ShellActions;
|
|
646
646
|
private renderer;
|
|
647
647
|
private i18n;
|
|
@@ -800,7 +800,7 @@ declare function createI18n(opts: I18nOptions): I18n;
|
|
|
800
800
|
declare const DISCLAIMER_LINES: readonly string[];
|
|
801
801
|
|
|
802
802
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
803
|
-
declare const PACKAGE_VERSION = "0.11.
|
|
803
|
+
declare const PACKAGE_VERSION = "0.11.2";
|
|
804
804
|
|
|
805
805
|
/**
|
|
806
806
|
* What a scrollable region should ADVERTISE about itself.
|
package/dist/html.esm.js
CHANGED
|
@@ -322,6 +322,20 @@ function nextTurbo(current, maxLevels) {
|
|
|
322
322
|
return 0;
|
|
323
323
|
return current >= maxLevels ? 0 : current + 1;
|
|
324
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Is a bonus buy unavailable right now?
|
|
327
|
+
*
|
|
328
|
+
* The three RUNTIME locks, in one place because they used to be in three: both bottom bars spelled
|
|
329
|
+
* them out for the coin, and the Shift+B hotkey spelled out a different, shorter set — so the
|
|
330
|
+
* keyboard opened the buy-bonus overlay mid-round and let a player stake a second bet on top of a
|
|
331
|
+
* round already in flight. A predicate the bars and the hotkey share cannot drift apart again.
|
|
332
|
+
*
|
|
333
|
+
* Runtime only. Whether the feature EXISTS at all is a config question (`features.buyBonus`), and
|
|
334
|
+
* whether this particular surface should offer it (mode, replay) belongs to the caller.
|
|
335
|
+
*/
|
|
336
|
+
function bonusBuyLocked(s) {
|
|
337
|
+
return s.busy || s.autoplay.active || !s.buyBonusEnabled;
|
|
338
|
+
}
|
|
325
339
|
|
|
326
340
|
/** The single brand accent (purple). The bar accent default (theme.ts) and the buy-a-bonus
|
|
327
341
|
* card default both derive from this, so a rebrand only touches one constant. */
|
|
@@ -1298,7 +1312,7 @@ const BASE_LOCALES = {
|
|
|
1298
1312
|
// Kept in a separate block (grouped per language, not interleaved) because these are long legal
|
|
1299
1313
|
// sentences, MACHINE-TRANSLATED and pending native QA. The keys are the exact English source lines
|
|
1300
1314
|
// the Stake bridge emits (see @energy8platform/stake-bridge `buildDisclaimer`). The copyright/brand
|
|
1301
|
-
// line ("TM and © {year}
|
|
1315
|
+
// line ("TM and © {year} Engine.") is deliberately omitted — it renders verbatim.
|
|
1302
1316
|
const D = {
|
|
1303
1317
|
L1: 'Malfunction voids all wins and plays.',
|
|
1304
1318
|
L2: 'A consistent internet connection is required. In the event of a disconnection, reload the game to finish any uncompleted rounds.',
|
|
@@ -1624,7 +1638,9 @@ class KeyboardController {
|
|
|
1624
1638
|
}
|
|
1625
1639
|
break;
|
|
1626
1640
|
case 'KeyB':
|
|
1627
|
-
|
|
1641
|
+
// `bonusBuyLocked` is the same predicate the bar's coin uses. Without it this hotkey
|
|
1642
|
+
// reached past a disabled coin and opened the overlay mid-round.
|
|
1643
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay && !bonusBuyLocked(s)) {
|
|
1628
1644
|
h.openBuyBonus();
|
|
1629
1645
|
return;
|
|
1630
1646
|
}
|
|
@@ -1736,7 +1752,7 @@ function keyboardCapable(win = typeof window === 'undefined' ? undefined : windo
|
|
|
1736
1752
|
|
|
1737
1753
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1738
1754
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1739
|
-
const PACKAGE_VERSION = '0.11.
|
|
1755
|
+
const PACKAGE_VERSION = '0.11.2';
|
|
1740
1756
|
|
|
1741
1757
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1742
1758
|
function resolveConfig(config) {
|
|
@@ -3343,7 +3359,7 @@ function applyBusy(host, bar) {
|
|
|
3343
3359
|
const buy = bar.querySelector('[data-ge="buybonus"]');
|
|
3344
3360
|
// disabled for the whole autoplay run (not just per-spin busy) so it doesn't flicker/pulse
|
|
3345
3361
|
if (buy)
|
|
3346
|
-
buy.disabled =
|
|
3362
|
+
buy.disabled = bonusBuyLocked(host.state);
|
|
3347
3363
|
}
|
|
3348
3364
|
|
|
3349
3365
|
/** Cue diameter, mirrored in the stylesheet. Kept here because the cue is positioned in JS. */
|