pixi-rainman-game-engine 0.3.16 → 0.3.17
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/SettingsUI/components/CloseModalButton/index.jsx +1 -0
- package/dist/SettingsUI/components/SpeedSettingsPopup/speedSettingsPopup.css +12 -2
- package/dist/SettingsUI/index.jsx +5 -3
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +6 -0
- package/dist/components/common/AnimatedNumber.d.ts +1 -1
- package/dist/connectivity/ConnectionWrapper.js +3 -5
- package/dist/controllers/AbstractController.js +13 -1
- package/dist/controllers/QuickStopController.js +2 -0
- package/dist/stores/SettingsStore.d.ts +2 -0
- package/dist/stores/SettingsStore.js +2 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export const CloseModalButton = observer(({ layerId, afterClose }) => {
|
|
|
11
11
|
settingStore.handleModalInvocation?.(layerId);
|
|
12
12
|
if (layerId === UI_ITEMS.speedSettings) {
|
|
13
13
|
settingStore.setSpeedPopupVisibility?.("none");
|
|
14
|
+
settingStore.isSpeedModalShown = false;
|
|
14
15
|
}
|
|
15
16
|
if (isBetDisabled) {
|
|
16
17
|
settingStore.enableButtons?.();
|
|
@@ -5,14 +5,24 @@
|
|
|
5
5
|
left: 25vw;
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: center;
|
|
8
|
+
z-index: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.modal-overlay {
|
|
12
|
+
position: fixed;
|
|
13
|
+
inset: 0;
|
|
14
|
+
background: rgba(0, 0, 0, 0.6);
|
|
15
|
+
backdrop-filter: blur(2px);
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
z-index: 0;
|
|
8
20
|
}
|
|
9
21
|
|
|
10
22
|
.speed-settings-popup {
|
|
11
23
|
display: flex;
|
|
12
24
|
flex-direction: column;
|
|
13
25
|
align-items: center;
|
|
14
|
-
width: 90%;
|
|
15
|
-
height: 90%;
|
|
16
26
|
justify-content: space-between;
|
|
17
27
|
}
|
|
18
28
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { UI_ITEMS } from "../utils";
|
|
4
|
-
import { AutoplaySettings, BetSettings, BuyFreeSpinModal, GameRules, SpeedSettingsPopup, SymbolMultiplierPopup, VolumeSettings
|
|
4
|
+
import { AutoplaySettings, BetSettings, BuyFreeSpinModal, GameRules, SpeedSettingsPopup, SymbolMultiplierPopup, VolumeSettings } from "./components";
|
|
5
5
|
import { SystemSettingsComponent } from "./SystemSettings/SystemSettingsComponent";
|
|
6
6
|
export const SettingsUI = () => {
|
|
7
7
|
return (<>
|
|
@@ -17,8 +17,10 @@ export const SettingsUI = () => {
|
|
|
17
17
|
<div id={UI_ITEMS.autoplay} className="modal modal-style">
|
|
18
18
|
<AutoplaySettings />
|
|
19
19
|
</div>
|
|
20
|
-
<div id={UI_ITEMS.speedSettings} className="
|
|
21
|
-
<
|
|
20
|
+
<div id={UI_ITEMS.speedSettings} className=" modal-overlay">
|
|
21
|
+
<div className="speed-settings-modal modal-style">
|
|
22
|
+
<SpeedSettingsPopup />
|
|
23
|
+
</div>
|
|
22
24
|
</div>
|
|
23
25
|
<div id={UI_ITEMS.symbolPayTable}>
|
|
24
26
|
<SymbolMultiplierPopup />
|
|
@@ -110,6 +110,8 @@ export class ButtonsEventManager {
|
|
|
110
110
|
this.settingsSpeedTurtle.addEventListener("click", () => {
|
|
111
111
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.slow);
|
|
112
112
|
this.setSpeedPopupVisibility("none");
|
|
113
|
+
this.enableButtons();
|
|
114
|
+
RainMan.settingsStore.isSpeedModalShown = false;
|
|
113
115
|
messageBox.updateIncentiveText(i18n.t("turtleSelected"));
|
|
114
116
|
});
|
|
115
117
|
}
|
|
@@ -120,6 +122,8 @@ export class ButtonsEventManager {
|
|
|
120
122
|
this.settingsSpeedRabbit.addEventListener("click", () => {
|
|
121
123
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.normal);
|
|
122
124
|
this.setSpeedPopupVisibility("none");
|
|
125
|
+
RainMan.settingsStore.isSpeedModalShown = false;
|
|
126
|
+
this.enableButtons();
|
|
123
127
|
messageBox.updateIncentiveText(i18n.t("rabbitSelected"));
|
|
124
128
|
RainMan.globals.disableSpeedPopup?.(true);
|
|
125
129
|
});
|
|
@@ -131,6 +135,8 @@ export class ButtonsEventManager {
|
|
|
131
135
|
this.settingsSpeedCheetah.addEventListener("click", () => {
|
|
132
136
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.fast);
|
|
133
137
|
this.setSpeedPopupVisibility("none");
|
|
138
|
+
this.enableButtons();
|
|
139
|
+
RainMan.settingsStore.isSpeedModalShown = false;
|
|
134
140
|
messageBox.updateIncentiveText(i18n.t("cheetahSelected"));
|
|
135
141
|
RainMan.globals.disableSpeedPopup?.(true);
|
|
136
142
|
});
|
|
@@ -26,11 +26,6 @@ export class ConnectionWrapper {
|
|
|
26
26
|
*/
|
|
27
27
|
handleMessage = (messageData) => {
|
|
28
28
|
this.lastFetchResponse.set(messageData.action, messageData);
|
|
29
|
-
if (messageData.status) {
|
|
30
|
-
if (messageData.status.code >= 300) {
|
|
31
|
-
throw new Error(`${messageData.status.code}: ${messageData.status.message}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
29
|
switch (messageData.action) {
|
|
35
30
|
case "init":
|
|
36
31
|
this.config = new ApiConfig(messageData);
|
|
@@ -105,6 +100,9 @@ export class ConnectionWrapper {
|
|
|
105
100
|
RainMan.globals.currency = Currencies[this._initData.currency];
|
|
106
101
|
RainMan.settingsStore.setFreeSpinsPriceTable(this._initData.free_spins_buy_table);
|
|
107
102
|
RainMan.settingsStore.setRoundNumber(this._initData.round_number);
|
|
103
|
+
if (this._initData.status?.code && this._initData.status.code >= 400) {
|
|
104
|
+
throw new Error(`Init failed with status code: ${this._initData.status?.code}: ${this._initData.status?.message}`);
|
|
105
|
+
}
|
|
108
106
|
}
|
|
109
107
|
/**
|
|
110
108
|
* Method for getting initial data from the server
|
|
@@ -104,6 +104,7 @@ export class AbstractController {
|
|
|
104
104
|
this.uiController.currentBalance = initData.balance;
|
|
105
105
|
if (RainMan.config.reinitMode) {
|
|
106
106
|
this.initControllerReinit();
|
|
107
|
+
RainMan.settingsStore.disableSpecialButtons();
|
|
107
108
|
}
|
|
108
109
|
this.reinitializeAllButtons();
|
|
109
110
|
this.buttonsEventManager.initSettingsEvents();
|
|
@@ -160,7 +161,10 @@ export class AbstractController {
|
|
|
160
161
|
window.addEventListener("keydown", (keyboardEvent) => {
|
|
161
162
|
if (keyboardEvent.code === "Space" || keyboardEvent.code === "Enter") {
|
|
162
163
|
keyboardEvent.preventDefault();
|
|
163
|
-
if (RainMan.settingsStore.isGambleGameActive) {
|
|
164
|
+
if (RainMan.settingsStore.isGambleGameActive || RainMan.settingsStore.isSpeedModalShown) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (RainMan.settingsStore.disableKeyboardShortcuts) {
|
|
164
168
|
return;
|
|
165
169
|
}
|
|
166
170
|
this.handleDisablingButtons(true);
|
|
@@ -376,6 +380,12 @@ export class AbstractController {
|
|
|
376
380
|
}
|
|
377
381
|
RainMan.settingsStore.setTotalNumberOfFreeSpins(availableFreeSpins);
|
|
378
382
|
RainMan.settingsStore.setNumberOfFreeSpin(availableFreeSpins);
|
|
383
|
+
if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
|
|
384
|
+
const freeSpinsUsed = this.initData?.free_spins_used ?? 0;
|
|
385
|
+
const freeSpinsAvailable = RainMan.settingsStore.reinitData?.[0]?.available_free_spins ?? 0;
|
|
386
|
+
this.uiController.totalNumberOfFreeSpins = freeSpinsUsed + freeSpinsAvailable;
|
|
387
|
+
RainMan.componentRegistry.get(MessageBox.currentWinTextRegistryName).update(this.initData.round_win_amount);
|
|
388
|
+
}
|
|
379
389
|
this.initControllerReinitModifier(spinLogic, spinData);
|
|
380
390
|
}
|
|
381
391
|
initControllerReinitModifier(_spinLogic, _spinData) { }
|
|
@@ -1059,6 +1069,8 @@ export class AbstractController {
|
|
|
1059
1069
|
if (RainMan.settingsStore.howManyFreeSpinsLeft !== 0 &&
|
|
1060
1070
|
(this.invokeFreeSpinPlateAfterWin || this.setSlowerSpeedForFreeSpins) &&
|
|
1061
1071
|
RainMan.settingsStore.isFreeSpinsPlayEnabled) {
|
|
1072
|
+
this.columnsContainer.clearQuickReelsStop();
|
|
1073
|
+
RainMan.settingsStore.setIsTemporarySpeed(false);
|
|
1062
1074
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.slow);
|
|
1063
1075
|
this.uiController.updateShownSpeedLevel(SPEED_LEVELS.slow);
|
|
1064
1076
|
this.disableSpeedButton(false);
|
|
@@ -46,6 +46,8 @@ export class QuickStopController {
|
|
|
46
46
|
handleSpeedPopupInvocation() {
|
|
47
47
|
if (this.shouldInvokeSpeedPopup && !this.speedPopupDisabled) {
|
|
48
48
|
this.buttonsEventManager?.setSpeedPopupVisibility("flex");
|
|
49
|
+
RainMan.settingsStore.isSpeedModalShown = true;
|
|
50
|
+
this.buttonsEventManager.disableButtons();
|
|
49
51
|
this.shouldInvokeSpeedPopup = false;
|
|
50
52
|
this.speedPopupDisabled = true;
|
|
51
53
|
}
|
|
@@ -11,6 +11,7 @@ import { PaytableData } from "./types";
|
|
|
11
11
|
export declare class SettingsStore {
|
|
12
12
|
static instance: SettingsStore | null;
|
|
13
13
|
betChangeDisabled: boolean;
|
|
14
|
+
disableKeyboardShortcuts: boolean;
|
|
14
15
|
bet: number;
|
|
15
16
|
betText: string;
|
|
16
17
|
shouldPlayAmbientMusic: boolean;
|
|
@@ -50,6 +51,7 @@ export declare class SettingsStore {
|
|
|
50
51
|
isTemporarySpeed: boolean;
|
|
51
52
|
disableBigWin: boolean;
|
|
52
53
|
isAfterFreeSpinsSummary: boolean;
|
|
54
|
+
isSpeedModalShown: boolean;
|
|
53
55
|
reinitData?: SpinDataInterface[];
|
|
54
56
|
setSpeedPopupVisibility?: (visibility: "flex" | "none") => void;
|
|
55
57
|
popupPaytableRepositionCallback?: () => void;
|
|
@@ -15,6 +15,7 @@ const INITIAL_AUTO_SPIN_COUNT = 50;
|
|
|
15
15
|
export class SettingsStore {
|
|
16
16
|
static instance = null;
|
|
17
17
|
betChangeDisabled = false;
|
|
18
|
+
disableKeyboardShortcuts = false;
|
|
18
19
|
bet = 0;
|
|
19
20
|
betText = "";
|
|
20
21
|
shouldPlayAmbientMusic = true;
|
|
@@ -54,6 +55,7 @@ export class SettingsStore {
|
|
|
54
55
|
isTemporarySpeed = false;
|
|
55
56
|
disableBigWin = false;
|
|
56
57
|
isAfterFreeSpinsSummary = true;
|
|
58
|
+
isSpeedModalShown = false;
|
|
57
59
|
reinitData;
|
|
58
60
|
setSpeedPopupVisibility;
|
|
59
61
|
popupPaytableRepositionCallback;
|
package/package.json
CHANGED