pixi-rainman-game-engine 0.1.21 → 0.1.22

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.
@@ -5,7 +5,7 @@ import { BetSettings, CloseModalButton, UXSettings } from "../components";
5
5
  import { useDeviceOrientations } from "../hooks";
6
6
  export const SystemSettingsComponent = () => {
7
7
  const deviceOrientation = useDeviceOrientations();
8
- return (<div className="flex w-full max-w-lg flex-col justify-center gap-2 p-4">
8
+ return (<div className="flex w-full max-w-lg flex-col justify-center gap-2 p-4 sm:max-w-xl">
9
9
  <div className="flex w-full justify-center">
10
10
  <h2 className="text-2xl font-bold uppercase text-primary-500">{i18next.t("systemSettings")}</h2>
11
11
  </div>
@@ -51,7 +51,7 @@ export const AutoplaySettings = observer(() => {
51
51
  updateLimitsBounds(initialAutoSpinCount);
52
52
  }, []);
53
53
  const { singleWinExceeds, balancedIncreased, balancedDecreased, howManyAutoSpinsLeft, infinitySpinsEnabled, setSingleWinExceeds, setBalancedIncreased, setBalancedDecreased, setAutoSpinsCount, flipInfinitySpinsFlag, resetAutoplaySettings, } = settingStore;
54
- return (<div className="flex w-full max-w-xs flex-col items-center justify-between gap-8 p-4 sm:max-w-md">
54
+ return (<div className="flex w-full max-w-xs flex-col items-center justify-between gap-8 p-4 sm:max-w-xl">
55
55
  <CloseModalButton layerId={UI_ITEMS.autoplay}/>
56
56
  <h2 className="text-center text-3xl font-bold text-primary-500">{i18next.t("autoPlay")}</h2>
57
57
  <div className="flex h-12 w-full flex-wrap items-center justify-center gap-2 sm:max-w-72 sm:flex-nowrap">
@@ -22,12 +22,12 @@ export const GameRules = observer(() => {
22
22
  }
23
23
  setPageNumber(pageNumber + incrementor);
24
24
  };
25
- return (<div className="max-w-5/6 flex h-fit max-h-[80vh] flex-col items-center gap-4 p-5">
25
+ return (<div className="max-w-5/6 flex h-fit flex-col items-center gap-4 p-5">
26
26
  <h2 className="text-center text-3xl font-bold text-primary-500">{i18next.t("gameRules")}</h2>
27
27
  <CloseModalButton layerId={UI_ITEMS.gameRules}/>
28
28
  <div className="custom-scroll max-w-5/6 h-full min-h-[60vh]">
29
29
  <CustomScroll className="h-full w-full overflow-y-auto portrait:max-h-[60vh]" allowOuterScroll={true}>
30
- <div className="text-md max-w-5/6 w-full overflow-y-auto landscape:max-h-[30vh]">
30
+ <div className="text-md max-w-5/6 w-full overflow-y-auto landscape:max-h-[50vh]">
31
31
  {gameRulesContent.pages[pageNumber]}
32
32
  </div>
33
33
  </CustomScroll>
@@ -15,7 +15,7 @@ export const SpeedSettingsPopup = observer(() => {
15
15
  fast: SPEED_LEVELS.fast,
16
16
  };
17
17
  const { settingStore } = useStores();
18
- return (<div className="flex h-full w-fit flex-col items-center justify-between gap-2 p-4 portrait:max-w-72">
18
+ return (<div className="flex h-fit w-fit flex-col items-center justify-between gap-2 p-4 portrait:max-w-72">
19
19
  <CloseModalButton layerId={UI_ITEMS.speedSettings}/>
20
20
  <h1 className="mt-3 font-bold uppercase text-white sm:text-xl">{i18next.t("howDoYouWantToPlay")}</h1>
21
21
  <div className="flex h-fit w-full flex-wrap justify-between gap-2 portrait:items-center portrait:justify-center">
@@ -26,7 +26,7 @@ export const SymbolMultiplierPopup = observer(() => {
26
26
  left: popupPaytablePosition.x,
27
27
  top: popupPaytablePosition.y,
28
28
  }}>
29
- <div className="flex h-full w-fit flex-col items-center justify-center sm:w-full">
29
+ <div className="flex h-fit w-fit flex-col items-center justify-center sm:w-full">
30
30
  {popupPaytableData.map((popupPaytableRow) => (<div key={popupPaytableRow.prefix} className="flex gap-1 text-xs sm:text-2xl">
31
31
  <div className="text-xs font-bold text-primary-500 sm:text-2xl">
32
32
  {popupPaytableRow.prefix}x
@@ -749,10 +749,6 @@ video {
749
749
  height: 100%;
750
750
  }
751
751
 
752
- .max-h-\[80vh\] {
753
- max-height: 80vh;
754
- }
755
-
756
752
  .min-h-\[60vh\] {
757
753
  min-height: 60vh;
758
754
  }
@@ -1552,8 +1548,8 @@ html.is-locked .ios-scroller-animation {
1552
1548
  max-width: 18rem;
1553
1549
  }
1554
1550
 
1555
- .sm\:max-w-md {
1556
- max-width: 28rem;
1551
+ .sm\:max-w-xl {
1552
+ max-width: 36rem;
1557
1553
  }
1558
1554
 
1559
1555
  .sm\:flex-row {
@@ -1611,7 +1607,7 @@ html.is-locked .ios-scroller-animation {
1611
1607
  }
1612
1608
 
1613
1609
  @media (orientation: landscape) {
1614
- .landscape\:max-h-\[30vh\] {
1615
- max-height: 30vh;
1610
+ .landscape\:max-h-\[50vh\] {
1611
+ max-height: 50vh;
1616
1612
  }
1617
1613
  }
@@ -39,9 +39,6 @@ export class AbstractMainContainer extends Container {
39
39
  }
40
40
  triggerStoreInitState(...containersWithSpines) {
41
41
  RainMan.settingsStore.containersWithSpines.push(...containersWithSpines);
42
- RainMan.settingsStore.containersWithSpines.forEach((spine) => {
43
- spine.setAnimationTimescale(RainMan.settingsStore.batterySaverFlag);
44
- });
45
42
  RainMan.settingsStore.refreshBatterySaver();
46
43
  }
47
44
  get freeSpinPlate() {
@@ -306,15 +306,15 @@ export class AbstractSymbolsColumn extends Container {
306
306
  this.swapSymbolFace(symbol);
307
307
  }
308
308
  shouldPlaySpecialRollStopSound() {
309
- for (let i = 0; i <= RainMan.config.numberOfColumns; i++) {
310
- const currentColumn = this.columnsContainer.getColumnAtPosition(i);
311
- if (currentColumn !== this)
312
- continue;
313
- return !!currentColumn.symbols
314
- .slice(0, RainMan.config.numberOfRows)
315
- .find((symbol) => symbol.id === this.bonusSymbol);
316
- }
317
- return false;
309
+ return (Array.from({ length: RainMan.config.numberOfColumns }, (_, i) => i)
310
+ .map((i) => {
311
+ const column = this.columnsContainer.getColumnAtPosition(i);
312
+ if (column !== this)
313
+ return null;
314
+ return column.symbols.slice(0, RainMan.config.numberOfRows);
315
+ })
316
+ .flat()
317
+ .filter((symbol) => symbol && symbol.id === this.bonusSymbol).length >= 1);
318
318
  }
319
319
  handleStopping() {
320
320
  if (!this.topMostSymbol || this.phase === Phase.END)
@@ -1,3 +1,4 @@
1
+ import i18next from "i18next";
1
2
  import { Currencies } from "ts-money";
2
3
  import { ApiConfig } from "../application";
3
4
  import { SpinData, } from "../connectivity";
@@ -69,6 +70,7 @@ export class ConnectionWrapper {
69
70
  landscape: true,
70
71
  matched_ratio: "16:9",
71
72
  },
73
+ locale: i18next.language,
72
74
  vendor_id: RainMan.config.gameInitVendorId,
73
75
  }));
74
76
  RainMan.globals.currency = Currencies[this._initData.currency];
@@ -26,6 +26,7 @@ export type InitServerRequest = BaseServerRequest & {
26
26
  landscape: boolean;
27
27
  matched_ratio: string;
28
28
  };
29
+ locale: string;
29
30
  };
30
31
  export type SpinServerRequest = BaseServerRequest & {
31
32
  action: "spin";
@@ -60,11 +60,11 @@ export const waitForAnimationToEnd = async (spine, animationName, loopAnimationN
60
60
  };
61
61
  export const setTimeScale = (spine, flag) => {
62
62
  spine.state.originalTimeScale ||= spine.state.timeScale;
63
- if (flag)
63
+ if (flag) {
64
64
  spine.state.timeScale = spine.state.originalTimeScale;
65
+ }
65
66
  else {
66
67
  spine.state.originalTimeScale = spine.state.timeScale;
67
- spine.state.timeScale = 0;
68
68
  }
69
69
  };
70
70
  export const changeResolution = (high) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixi-rainman-game-engine",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "This repository contains all of the mechanics that used in rainman games.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -9,6 +9,7 @@
9
9
  "copyCss": "yarn build:tailwind && copyfiles -u 1 \"src/**/*.css\" dist/",
10
10
  "build:tailwind": "tailwindcss -i ./src/SettingsUI/index.css -o ./src/SettingsUI/packedStyles.css",
11
11
  "build": "rimraf dist/ && tsc && yarn copyCss",
12
+ "generate:changelog": "yarn changelog generate",
12
13
  "dev:build": "tsc-watch --onSuccess \"yarn copyCss\"",
13
14
  "lint": "eslint src/** --fix",
14
15
  "prepublishOnly": "husky && yarn build",
@@ -56,6 +57,7 @@
56
57
  "eslint-plugin-simple-import-sort": "^12.0.0",
57
58
  "eslint-plugin-sort-class-members": "^1.20.0",
58
59
  "eslint-prettier-config": "^1.0.1",
60
+ "generate-changelog": "^1.8.0",
59
61
  "husky": "^9.0.11",
60
62
  "postcss": "^8.4.38",
61
63
  "prettier": "^3.2.5",