@rpg-engine/shared 0.8.91 → 0.8.93
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/README.md +29 -29
- package/dist/constants/date.constants.d.ts +2 -2
- package/dist/constants/date.constants.js +5 -5
- package/dist/constants/npc.constants.d.ts +1 -1
- package/dist/constants/npc.constants.js +4 -4
- package/dist/constants/socket.constants.d.ts +2 -2
- package/dist/constants/socket.constants.js +6 -6
- package/dist/constants/world.constants.d.ts +10 -10
- package/dist/constants/world.constants.js +13 -13
- package/dist/helpers/deviceHelpers.d.ts +2 -2
- package/dist/helpers/deviceHelpers.js +16 -16
- package/dist/helpers/itemSlotHelper.d.ts +7 -7
- package/dist/helpers/itemSlotHelper.js +27 -27
- package/dist/helpers/skillHelpers.d.ts +4 -4
- package/dist/helpers/skillHelpers.js +25 -25
- package/dist/helpers/weightHelper.d.ts +1 -1
- package/dist/helpers/weightHelper.js +14 -14
- package/dist/index.d.ts +57 -57
- package/dist/index.js +73 -73
- package/dist/libs/GridHelper.d.ts +11 -11
- package/dist/libs/GridHelper.js +37 -37
- package/dist/libs/MathHelper.d.ts +16 -16
- package/dist/libs/MathHelper.js +14 -14
- package/dist/libs/SocketHelper.d.ts +2 -2
- package/dist/libs/SocketHelper.js +14 -14
- package/dist/libs/TextHelper.d.ts +7 -7
- package/dist/libs/TextHelper.js +21 -21
- package/dist/libs/TypeHelper.d.ts +3 -3
- package/dist/libs/TypeHelper.js +16 -16
- package/dist/translations/app-rate.lang.json +38 -38
- package/dist/translations/assets.lang.json +82 -82
- package/dist/translations/auth.lang.json +182 -182
- package/dist/translations/email.lang.json +70 -70
- package/dist/translations/error.lang.json +18 -18
- package/dist/translations/form.lang.json +94 -94
- package/dist/translations/global.lang.json +90 -90
- package/dist/translations/logs.lang.json +6 -6
- package/dist/translations/onboarding.lang.d.ts +10 -10
- package/dist/translations/onboarding.lang.js +21 -21
- package/dist/translations/onboarding.lang.json +50 -50
- package/dist/translations/order.lang.json +90 -90
- package/dist/translations/search.lang.json +50 -50
- package/dist/translations/settings.lang.json +14 -14
- package/dist/translations/tabs.lang.json +22 -22
- package/dist/translations/users.lang.json +22 -22
- package/dist/translations/validation.lang.json +86 -86
- package/dist/types/animation.types.d.ts +69 -69
- package/dist/types/animation.types.js +46 -46
- package/dist/types/api.types.d.ts +21 -21
- package/dist/types/api.types.js +20 -20
- package/dist/types/asset.types.d.ts +6 -6
- package/dist/types/asset.types.js +2 -2
- package/dist/types/auth.types.d.ts +7 -7
- package/dist/types/auth.types.js +2 -2
- package/dist/types/battle.types.d.ts +41 -41
- package/dist/types/battle.types.js +18 -18
- package/dist/types/buff.types.d.ts +39 -39
- package/dist/types/buff.types.js +13 -13
- package/dist/types/character.types.d.ts +233 -233
- package/dist/types/character.types.js +65 -65
- package/dist/types/chat.types.d.ts +72 -72
- package/dist/types/chat.types.js +22 -22
- package/dist/types/depot.types.d.ts +18 -18
- package/dist/types/depot.types.js +9 -9
- package/dist/types/device.types.d.ts +24 -24
- package/dist/types/device.types.js +7 -7
- package/dist/types/displayText.types.d.ts +10 -10
- package/dist/types/displayText.types.js +7 -7
- package/dist/types/entity.types.d.ts +30 -30
- package/dist/types/entity.types.js +20 -20
- package/dist/types/env.types.d.ts +5 -5
- package/dist/types/env.types.js +9 -9
- package/dist/types/equipment.types.d.ts +35 -35
- package/dist/types/equipment.types.js +18 -18
- package/dist/types/googleOAuth.types.d.ts +47 -47
- package/dist/types/googleOAuth.types.js +2 -2
- package/dist/types/inventory.types.d.ts +7 -7
- package/dist/types/inventory.types.js +2 -2
- package/dist/types/item.types.d.ts +377 -377
- package/dist/types/item.types.d.ts.map +1 -1
- package/dist/types/item.types.js +154 -154
- package/dist/types/itemContainer.types.d.ts +83 -83
- package/dist/types/itemContainer.types.js +11 -11
- package/dist/types/leaderboard.types.d.ts +32 -32
- package/dist/types/leaderboard.types.js +9 -9
- package/dist/types/macro.types.d.ts +8 -8
- package/dist/types/macro.types.js +12 -12
- package/dist/types/maps.types.d.ts +90 -90
- package/dist/types/maps.types.js +85 -85
- package/dist/types/marketplace.types.d.ts +61 -61
- package/dist/types/marketplace.types.js +15 -15
- package/dist/types/notification.types.d.ts +14 -14
- package/dist/types/notification.types.js +2 -2
- package/dist/types/npc.types.d.ts +165 -165
- package/dist/types/npc.types.js +49 -49
- package/dist/types/pagination.types.d.ts +13 -13
- package/dist/types/pagination.types.js +2 -2
- package/dist/types/party.types.d.ts +83 -83
- package/dist/types/party.types.js +54 -54
- package/dist/types/places.types.d.ts +16 -16
- package/dist/types/places.types.js +9 -9
- package/dist/types/preloadScene.types.d.ts +4 -4
- package/dist/types/preloadScene.types.js +7 -7
- package/dist/types/premiumAccount.types.d.ts +7 -7
- package/dist/types/premiumAccount.types.js +11 -11
- package/dist/types/quest.types.d.ts +74 -74
- package/dist/types/quest.types.js +21 -21
- package/dist/types/raid.types.d.ts +6 -6
- package/dist/types/raid.types.js +2 -2
- package/dist/types/resource.types.d.ts +5 -5
- package/dist/types/resource.types.js +2 -2
- package/dist/types/scene.types.d.ts +8 -8
- package/dist/types/scene.types.js +8 -8
- package/dist/types/shortcut.types.d.ts +11 -11
- package/dist/types/shortcut.types.js +9 -9
- package/dist/types/skills.types.d.ts +144 -144
- package/dist/types/skills.types.js +106 -106
- package/dist/types/socket.types.d.ts +18 -18
- package/dist/types/socket.types.js +8 -8
- package/dist/types/spell.types.d.ts +156 -156
- package/dist/types/spell.types.d.ts.map +1 -1
- package/dist/types/spell.types.js +108 -108
- package/dist/types/tiled.types.d.ts +119 -119
- package/dist/types/tiled.types.js +7 -7
- package/dist/types/trade.types.d.ts +65 -65
- package/dist/types/trade.types.js +15 -15
- package/dist/types/translation.types.d.ts +5 -5
- package/dist/types/translation.types.js +8 -8
- package/dist/types/ui.types.d.ts +8 -8
- package/dist/types/ui.types.js +7 -7
- package/dist/types/useWith.types.d.ts +25 -25
- package/dist/types/useWith.types.js +9 -9
- package/dist/types/user.types.d.ts +104 -104
- package/dist/types/user.types.js +38 -38
- package/dist/types/validation.types.d.ts +9 -9
- package/dist/types/validation.types.js +2 -2
- package/dist/types/view.types.d.ts +15 -15
- package/dist/types/view.types.js +7 -7
- package/package.json +43 -43
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# `@rpg-engine/shared`
|
|
2
|
-
|
|
3
|
-
# How to update our shared packages?
|
|
4
|
-
|
|
5
|
-
# Important
|
|
6
|
-
|
|
7
|
-
- You can push this project directly to master. Just make sure you're in sync with master before starting to work (git pull origin master)
|
|
8
|
-
|
|
9
|
-
# Pre-requisites:
|
|
10
|
-
|
|
11
|
-
- You must have the .npmrc file set on the root of this project. If you don't, [please check our notion documentation](https://www.notion.so/projectstockalert/Configuration-files-a1725ae8e64a497fb617d92a17ab29fd#7fe40aa161404c06b145c1b60c849495)
|
|
12
|
-
|
|
13
|
-
# Step-by-step:
|
|
14
|
-
|
|
15
|
-
1. Implement your desired changes. Remember to export any types in index.ts
|
|
16
|
-
|
|
17
|
-
2. `yarn publish`
|
|
18
|
-
|
|
19
|
-
3. Update back-end and front-end packages
|
|
20
|
-
|
|
21
|
-
References: https://cameronnokes.com/blog/the-30-second-guide-to-publishing-a-typescript-package-to-npm/
|
|
22
|
-
|
|
23
|
-
# Notes
|
|
24
|
-
|
|
25
|
-
- First time publishing will require you to explicitly set it to public:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
yarn publish --access public
|
|
29
|
-
```
|
|
1
|
+
# `@rpg-engine/shared`
|
|
2
|
+
|
|
3
|
+
# How to update our shared packages?
|
|
4
|
+
|
|
5
|
+
# Important
|
|
6
|
+
|
|
7
|
+
- You can push this project directly to master. Just make sure you're in sync with master before starting to work (git pull origin master)
|
|
8
|
+
|
|
9
|
+
# Pre-requisites:
|
|
10
|
+
|
|
11
|
+
- You must have the .npmrc file set on the root of this project. If you don't, [please check our notion documentation](https://www.notion.so/projectstockalert/Configuration-files-a1725ae8e64a497fb617d92a17ab29fd#7fe40aa161404c06b145c1b60c849495)
|
|
12
|
+
|
|
13
|
+
# Step-by-step:
|
|
14
|
+
|
|
15
|
+
1. Implement your desired changes. Remember to export any types in index.ts
|
|
16
|
+
|
|
17
|
+
2. `yarn publish`
|
|
18
|
+
|
|
19
|
+
3. Update back-end and front-end packages
|
|
20
|
+
|
|
21
|
+
References: https://cameronnokes.com/blog/the-30-second-guide-to-publishing-a-typescript-package-to-npm/
|
|
22
|
+
|
|
23
|
+
# Notes
|
|
24
|
+
|
|
25
|
+
- First time publishing will require you to explicitly set it to public:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
yarn publish --access public
|
|
29
|
+
```
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const DATE_FORMAT_FULL = "MM-DD-YYYY HH:mm:ss";
|
|
2
|
-
export declare const DATE_FORMAT_SHORT = "MM-DD-YYYY";
|
|
1
|
+
export declare const DATE_FORMAT_FULL = "MM-DD-YYYY HH:mm:ss";
|
|
2
|
+
export declare const DATE_FORMAT_SHORT = "MM-DD-YYYY";
|
|
3
3
|
//# sourceMappingURL=date.constants.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DATE_FORMAT_SHORT = exports.DATE_FORMAT_FULL = void 0;
|
|
4
|
-
exports.DATE_FORMAT_FULL = "MM-DD-YYYY HH:mm:ss";
|
|
5
|
-
exports.DATE_FORMAT_SHORT = "MM-DD-YYYY";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATE_FORMAT_SHORT = exports.DATE_FORMAT_FULL = void 0;
|
|
4
|
+
exports.DATE_FORMAT_FULL = "MM-DD-YYYY HH:mm:ss";
|
|
5
|
+
exports.DATE_FORMAT_SHORT = "MM-DD-YYYY";
|
|
6
6
|
//# sourceMappingURL=date.constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const NPC_MAX_TALKING_DISTANCE_IN_GRID = 5;
|
|
1
|
+
export declare const NPC_MAX_TALKING_DISTANCE_IN_GRID = 5;
|
|
2
2
|
//# sourceMappingURL=npc.constants.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NPC_MAX_TALKING_DISTANCE_IN_GRID = void 0;
|
|
4
|
-
exports.NPC_MAX_TALKING_DISTANCE_IN_GRID = 5;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NPC_MAX_TALKING_DISTANCE_IN_GRID = void 0;
|
|
4
|
+
exports.NPC_MAX_TALKING_DISTANCE_IN_GRID = 5;
|
|
5
5
|
//# sourceMappingURL=npc.constants.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SOCKET_TRANSMISSION_ZONE_WIDTH: number;
|
|
2
|
-
export declare const SOCKET_TRANSMISSION_ZONE_HEIGHT: number;
|
|
1
|
+
export declare const SOCKET_TRANSMISSION_ZONE_WIDTH: number;
|
|
2
|
+
export declare const SOCKET_TRANSMISSION_ZONE_HEIGHT: number;
|
|
3
3
|
//# sourceMappingURL=socket.constants.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SOCKET_TRANSMISSION_ZONE_HEIGHT = exports.SOCKET_TRANSMISSION_ZONE_WIDTH = void 0;
|
|
4
|
-
const world_constants_1 = require("./world.constants");
|
|
5
|
-
exports.SOCKET_TRANSMISSION_ZONE_WIDTH = world_constants_1.GRID_WIDTH * 30;
|
|
6
|
-
exports.SOCKET_TRANSMISSION_ZONE_HEIGHT = world_constants_1.GRID_HEIGHT * 30;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SOCKET_TRANSMISSION_ZONE_HEIGHT = exports.SOCKET_TRANSMISSION_ZONE_WIDTH = void 0;
|
|
4
|
+
const world_constants_1 = require("./world.constants");
|
|
5
|
+
exports.SOCKET_TRANSMISSION_ZONE_WIDTH = world_constants_1.GRID_WIDTH * 30;
|
|
6
|
+
exports.SOCKET_TRANSMISSION_ZONE_HEIGHT = world_constants_1.GRID_HEIGHT * 30;
|
|
7
7
|
//# sourceMappingURL=socket.constants.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const WORLD_WIDTH = 1600;
|
|
2
|
-
export declare const WORLD_HEIGHT = 1600;
|
|
3
|
-
export declare const CAMERA_VIEWPORT_WIDTH = 812;
|
|
4
|
-
export declare const CAMERA_VIEWPORT_HEIGHT = 375;
|
|
5
|
-
export declare const GRID_WIDTH = 16;
|
|
6
|
-
export declare const GRID_HEIGHT = 16;
|
|
7
|
-
export declare const TILE_WIDTH = 16;
|
|
8
|
-
export declare const TILE_HEIGHT = 16;
|
|
9
|
-
export declare const CAMERA_VIEWPORT_OFFSET_X: number;
|
|
10
|
-
export declare const CAMERA_VIEWPORT_OFFSET_Y: number;
|
|
1
|
+
export declare const WORLD_WIDTH = 1600;
|
|
2
|
+
export declare const WORLD_HEIGHT = 1600;
|
|
3
|
+
export declare const CAMERA_VIEWPORT_WIDTH = 812;
|
|
4
|
+
export declare const CAMERA_VIEWPORT_HEIGHT = 375;
|
|
5
|
+
export declare const GRID_WIDTH = 16;
|
|
6
|
+
export declare const GRID_HEIGHT = 16;
|
|
7
|
+
export declare const TILE_WIDTH = 16;
|
|
8
|
+
export declare const TILE_HEIGHT = 16;
|
|
9
|
+
export declare const CAMERA_VIEWPORT_OFFSET_X: number;
|
|
10
|
+
export declare const CAMERA_VIEWPORT_OFFSET_Y: number;
|
|
11
11
|
//# sourceMappingURL=world.constants.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.CAMERA_VIEWPORT_OFFSET_X = exports.TILE_HEIGHT = exports.TILE_WIDTH = exports.GRID_HEIGHT = exports.GRID_WIDTH = exports.CAMERA_VIEWPORT_HEIGHT = exports.CAMERA_VIEWPORT_WIDTH = exports.WORLD_HEIGHT = exports.WORLD_WIDTH = void 0;
|
|
4
|
-
exports.WORLD_WIDTH = 1600;
|
|
5
|
-
exports.WORLD_HEIGHT = 1600;
|
|
6
|
-
exports.CAMERA_VIEWPORT_WIDTH = 812;
|
|
7
|
-
exports.CAMERA_VIEWPORT_HEIGHT = 375;
|
|
8
|
-
exports.GRID_WIDTH = 16;
|
|
9
|
-
exports.GRID_HEIGHT = 16;
|
|
10
|
-
exports.TILE_WIDTH = 16;
|
|
11
|
-
exports.TILE_HEIGHT = 16;
|
|
12
|
-
exports.CAMERA_VIEWPORT_OFFSET_X = exports.GRID_WIDTH * 10;
|
|
13
|
-
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.GRID_HEIGHT * 10;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.CAMERA_VIEWPORT_OFFSET_X = exports.TILE_HEIGHT = exports.TILE_WIDTH = exports.GRID_HEIGHT = exports.GRID_WIDTH = exports.CAMERA_VIEWPORT_HEIGHT = exports.CAMERA_VIEWPORT_WIDTH = exports.WORLD_HEIGHT = exports.WORLD_WIDTH = void 0;
|
|
4
|
+
exports.WORLD_WIDTH = 1600;
|
|
5
|
+
exports.WORLD_HEIGHT = 1600;
|
|
6
|
+
exports.CAMERA_VIEWPORT_WIDTH = 812;
|
|
7
|
+
exports.CAMERA_VIEWPORT_HEIGHT = 375;
|
|
8
|
+
exports.GRID_WIDTH = 16;
|
|
9
|
+
exports.GRID_HEIGHT = 16;
|
|
10
|
+
exports.TILE_WIDTH = 16;
|
|
11
|
+
exports.TILE_HEIGHT = 16;
|
|
12
|
+
exports.CAMERA_VIEWPORT_OFFSET_X = exports.GRID_WIDTH * 10;
|
|
13
|
+
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.GRID_HEIGHT * 10;
|
|
14
14
|
//# sourceMappingURL=world.constants.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const isMobileOrTablet: () => boolean;
|
|
2
|
-
export declare const isMobile: () => boolean;
|
|
1
|
+
export declare const isMobileOrTablet: () => boolean;
|
|
2
|
+
export declare const isMobile: () => boolean;
|
|
3
3
|
//# sourceMappingURL=deviceHelpers.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMobile = exports.isMobileOrTablet = void 0;
|
|
4
|
-
const mobile_device_detect_1 = require("mobile-device-detect");
|
|
5
|
-
const isSmallerThanBreakpoint = (breakpoint) => {
|
|
6
|
-
const mql = window.matchMedia(`(max-width: ${breakpoint}) and (orientation: portrait), (max-height: ${breakpoint}) and (orientation: landscape)`);
|
|
7
|
-
return mql.matches;
|
|
8
|
-
};
|
|
9
|
-
const isMobileOrTablet = () => {
|
|
10
|
-
return mobile_device_detect_1.isMobile !== null && mobile_device_detect_1.isMobile !== void 0 ? mobile_device_detect_1.isMobile : (isSmallerThanBreakpoint("767px") && !isSmallerThanBreakpoint("479px"));
|
|
11
|
-
};
|
|
12
|
-
exports.isMobileOrTablet = isMobileOrTablet;
|
|
13
|
-
const isMobile = () => {
|
|
14
|
-
return mobile_device_detect_1.isMobileOnly !== null && mobile_device_detect_1.isMobileOnly !== void 0 ? mobile_device_detect_1.isMobileOnly : isSmallerThanBreakpoint("479px");
|
|
15
|
-
};
|
|
16
|
-
exports.isMobile = isMobile;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMobile = exports.isMobileOrTablet = void 0;
|
|
4
|
+
const mobile_device_detect_1 = require("mobile-device-detect");
|
|
5
|
+
const isSmallerThanBreakpoint = (breakpoint) => {
|
|
6
|
+
const mql = window.matchMedia(`(max-width: ${breakpoint}) and (orientation: portrait), (max-height: ${breakpoint}) and (orientation: landscape)`);
|
|
7
|
+
return mql.matches;
|
|
8
|
+
};
|
|
9
|
+
const isMobileOrTablet = () => {
|
|
10
|
+
return mobile_device_detect_1.isMobile !== null && mobile_device_detect_1.isMobile !== void 0 ? mobile_device_detect_1.isMobile : (isSmallerThanBreakpoint("767px") && !isSmallerThanBreakpoint("479px"));
|
|
11
|
+
};
|
|
12
|
+
exports.isMobileOrTablet = isMobileOrTablet;
|
|
13
|
+
const isMobile = () => {
|
|
14
|
+
return mobile_device_detect_1.isMobileOnly !== null && mobile_device_detect_1.isMobileOnly !== void 0 ? mobile_device_detect_1.isMobileOnly : isSmallerThanBreakpoint("479px");
|
|
15
|
+
};
|
|
16
|
+
exports.isMobile = isMobile;
|
|
17
17
|
//# sourceMappingURL=deviceHelpers.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface IItemTexturePathGetOptions {
|
|
2
|
-
key: string;
|
|
3
|
-
stackQty: number;
|
|
4
|
-
texturePath: string;
|
|
5
|
-
isStackable: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const getItemTextureKeyPath: (requiredOptions: IItemTexturePathGetOptions, atlasJSON: any) => string;
|
|
1
|
+
export interface IItemTexturePathGetOptions {
|
|
2
|
+
key: string;
|
|
3
|
+
stackQty: number;
|
|
4
|
+
texturePath: string;
|
|
5
|
+
isStackable: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const getItemTextureKeyPath: (requiredOptions: IItemTexturePathGetOptions, atlasJSON: any) => string;
|
|
8
8
|
//# sourceMappingURL=itemSlotHelper.d.ts.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getItemTextureKeyPath = void 0;
|
|
4
|
-
const getItemTextureKeyPath = (requiredOptions, atlasJSON) => {
|
|
5
|
-
var _a;
|
|
6
|
-
const stackQty = (_a = requiredOptions === null || requiredOptions === void 0 ? void 0 : requiredOptions.stackQty) !== null && _a !== void 0 ? _a : 0;
|
|
7
|
-
const itemTexturePath = requiredOptions.texturePath;
|
|
8
|
-
if (requiredOptions && (stackQty >= 1 || (requiredOptions.isStackable && stackQty > 0))) {
|
|
9
|
-
let idx = stackQty;
|
|
10
|
-
if (stackQty > 0 && stackQty < 1) {
|
|
11
|
-
idx = 1;
|
|
12
|
-
}
|
|
13
|
-
else if (stackQty >= 5) {
|
|
14
|
-
idx = 5;
|
|
15
|
-
}
|
|
16
|
-
const textureBreakPath = itemTexturePath.split(".");
|
|
17
|
-
const txtPrefix = textureBreakPath[0];
|
|
18
|
-
const txtExtension = textureBreakPath[1];
|
|
19
|
-
const newTexturePath = `${txtPrefix}-qty-${String(Math.floor(Number(idx)))}.${txtExtension}`;
|
|
20
|
-
const spriteData = atlasJSON.frames[newTexturePath];
|
|
21
|
-
if (spriteData !== undefined) {
|
|
22
|
-
return newTexturePath;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return itemTexturePath;
|
|
26
|
-
};
|
|
27
|
-
exports.getItemTextureKeyPath = getItemTextureKeyPath;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getItemTextureKeyPath = void 0;
|
|
4
|
+
const getItemTextureKeyPath = (requiredOptions, atlasJSON) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const stackQty = (_a = requiredOptions === null || requiredOptions === void 0 ? void 0 : requiredOptions.stackQty) !== null && _a !== void 0 ? _a : 0;
|
|
7
|
+
const itemTexturePath = requiredOptions.texturePath;
|
|
8
|
+
if (requiredOptions && (stackQty >= 1 || (requiredOptions.isStackable && stackQty > 0))) {
|
|
9
|
+
let idx = stackQty;
|
|
10
|
+
if (stackQty > 0 && stackQty < 1) {
|
|
11
|
+
idx = 1;
|
|
12
|
+
}
|
|
13
|
+
else if (stackQty >= 5) {
|
|
14
|
+
idx = 5;
|
|
15
|
+
}
|
|
16
|
+
const textureBreakPath = itemTexturePath.split(".");
|
|
17
|
+
const txtPrefix = textureBreakPath[0];
|
|
18
|
+
const txtExtension = textureBreakPath[1];
|
|
19
|
+
const newTexturePath = `${txtPrefix}-qty-${String(Math.floor(Number(idx)))}.${txtExtension}`;
|
|
20
|
+
const spriteData = atlasJSON.frames[newTexturePath];
|
|
21
|
+
if (spriteData !== undefined) {
|
|
22
|
+
return newTexturePath;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return itemTexturePath;
|
|
26
|
+
};
|
|
27
|
+
exports.getItemTextureKeyPath = getItemTextureKeyPath;
|
|
28
28
|
//# sourceMappingURL=itemSlotHelper.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const getSPForLevel: (level: number) => number;
|
|
2
|
-
export declare const getXPForLevel: (level: number) => number;
|
|
3
|
-
export declare const calculateXPToNextLevel: (currentXP: number, level: number) => number;
|
|
4
|
-
export declare const calculateSPToNextLevel: (currentSP: number, level: number) => number;
|
|
1
|
+
export declare const getSPForLevel: (level: number) => number;
|
|
2
|
+
export declare const getXPForLevel: (level: number) => number;
|
|
3
|
+
export declare const calculateXPToNextLevel: (currentXP: number, level: number) => number;
|
|
4
|
+
export declare const calculateSPToNextLevel: (currentSP: number, level: number) => number;
|
|
5
5
|
//# sourceMappingURL=skillHelpers.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateSPToNextLevel = exports.calculateXPToNextLevel = exports.getXPForLevel = exports.getSPForLevel = void 0;
|
|
4
|
-
const getSPForLevel = (level) => {
|
|
5
|
-
const totalSPOnLevel = Math.pow(level, 3) * 2.75;
|
|
6
|
-
return totalSPOnLevel;
|
|
7
|
-
};
|
|
8
|
-
exports.getSPForLevel = getSPForLevel;
|
|
9
|
-
const getXPForLevel = (level) => {
|
|
10
|
-
const totalXPOnLevel = Math.pow(level, 3) * 3;
|
|
11
|
-
return totalXPOnLevel;
|
|
12
|
-
};
|
|
13
|
-
exports.getXPForLevel = getXPForLevel;
|
|
14
|
-
const calculateXPToNextLevel = (currentXP, level) => {
|
|
15
|
-
const xpToNextLevel = (0, exports.getXPForLevel)(level);
|
|
16
|
-
const xpToNextLevelDiff = xpToNextLevel - currentXP;
|
|
17
|
-
return xpToNextLevelDiff;
|
|
18
|
-
};
|
|
19
|
-
exports.calculateXPToNextLevel = calculateXPToNextLevel;
|
|
20
|
-
const calculateSPToNextLevel = (currentSP, level) => {
|
|
21
|
-
const spToNextLevel = (0, exports.getSPForLevel)(level);
|
|
22
|
-
const spToNextLevelDiff = spToNextLevel - currentSP;
|
|
23
|
-
return spToNextLevelDiff;
|
|
24
|
-
};
|
|
25
|
-
exports.calculateSPToNextLevel = calculateSPToNextLevel;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateSPToNextLevel = exports.calculateXPToNextLevel = exports.getXPForLevel = exports.getSPForLevel = void 0;
|
|
4
|
+
const getSPForLevel = (level) => {
|
|
5
|
+
const totalSPOnLevel = Math.pow(level, 3) * 2.75;
|
|
6
|
+
return totalSPOnLevel;
|
|
7
|
+
};
|
|
8
|
+
exports.getSPForLevel = getSPForLevel;
|
|
9
|
+
const getXPForLevel = (level) => {
|
|
10
|
+
const totalXPOnLevel = Math.pow(level, 3) * 3;
|
|
11
|
+
return totalXPOnLevel;
|
|
12
|
+
};
|
|
13
|
+
exports.getXPForLevel = getXPForLevel;
|
|
14
|
+
const calculateXPToNextLevel = (currentXP, level) => {
|
|
15
|
+
const xpToNextLevel = (0, exports.getXPForLevel)(level);
|
|
16
|
+
const xpToNextLevelDiff = xpToNextLevel - currentXP;
|
|
17
|
+
return xpToNextLevelDiff;
|
|
18
|
+
};
|
|
19
|
+
exports.calculateXPToNextLevel = calculateXPToNextLevel;
|
|
20
|
+
const calculateSPToNextLevel = (currentSP, level) => {
|
|
21
|
+
const spToNextLevel = (0, exports.getSPForLevel)(level);
|
|
22
|
+
const spToNextLevelDiff = spToNextLevel - currentSP;
|
|
23
|
+
return spToNextLevelDiff;
|
|
24
|
+
};
|
|
25
|
+
exports.calculateSPToNextLevel = calculateSPToNextLevel;
|
|
26
26
|
//# sourceMappingURL=skillHelpers.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getSpeedMultiplierBasedOnWeightRatio: (ratio: number) => 1 | 0 | 0.8 | 0.6;
|
|
1
|
+
export declare const getSpeedMultiplierBasedOnWeightRatio: (ratio: number) => 1 | 0 | 0.8 | 0.6;
|
|
2
2
|
//# sourceMappingURL=weightHelper.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSpeedMultiplierBasedOnWeightRatio = void 0;
|
|
4
|
-
const getSpeedMultiplierBasedOnWeightRatio = (ratio) => {
|
|
5
|
-
if (ratio <= 1)
|
|
6
|
-
return 1;
|
|
7
|
-
if (ratio > 1 && ratio <= 2)
|
|
8
|
-
return 0.8;
|
|
9
|
-
if (ratio > 2 && ratio <= 6)
|
|
10
|
-
return 0.6;
|
|
11
|
-
if (ratio > 6)
|
|
12
|
-
return 0;
|
|
13
|
-
};
|
|
14
|
-
exports.getSpeedMultiplierBasedOnWeightRatio = getSpeedMultiplierBasedOnWeightRatio;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpeedMultiplierBasedOnWeightRatio = void 0;
|
|
4
|
+
const getSpeedMultiplierBasedOnWeightRatio = (ratio) => {
|
|
5
|
+
if (ratio <= 1)
|
|
6
|
+
return 1;
|
|
7
|
+
if (ratio > 1 && ratio <= 2)
|
|
8
|
+
return 0.8;
|
|
9
|
+
if (ratio > 2 && ratio <= 6)
|
|
10
|
+
return 0.6;
|
|
11
|
+
if (ratio > 6)
|
|
12
|
+
return 0;
|
|
13
|
+
};
|
|
14
|
+
exports.getSpeedMultiplierBasedOnWeightRatio = getSpeedMultiplierBasedOnWeightRatio;
|
|
15
15
|
//# sourceMappingURL=weightHelper.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
export * from "./constants/date.constants";
|
|
2
|
-
export * from "./constants/npc.constants";
|
|
3
|
-
export * from "./constants/socket.constants";
|
|
4
|
-
export * from "./constants/world.constants";
|
|
5
|
-
export * from "./helpers/deviceHelpers";
|
|
6
|
-
export * from "./helpers/itemSlotHelper";
|
|
7
|
-
export * from "./helpers/skillHelpers";
|
|
8
|
-
export * from "./helpers/weightHelper";
|
|
9
|
-
export * from "./libs/GridHelper";
|
|
10
|
-
export * from "./libs/MathHelper";
|
|
11
|
-
export * from "./libs/SocketHelper";
|
|
12
|
-
export * from "./libs/TextHelper";
|
|
13
|
-
export * from "./libs/TypeHelper";
|
|
14
|
-
export * from "./types/animation.types";
|
|
15
|
-
export * from "./types/api.types";
|
|
16
|
-
export * from "./types/asset.types";
|
|
17
|
-
export * from "./types/auth.types";
|
|
18
|
-
export * from "./types/battle.types";
|
|
19
|
-
export * from "./types/buff.types";
|
|
20
|
-
export * from "./types/character.types";
|
|
21
|
-
export * from "./types/chat.types";
|
|
22
|
-
export * from "./types/depot.types";
|
|
23
|
-
export * from "./types/device.types";
|
|
24
|
-
export * from "./types/displayText.types";
|
|
25
|
-
export * from "./types/entity.types";
|
|
26
|
-
export * from "./types/env.types";
|
|
27
|
-
export * from "./types/equipment.types";
|
|
28
|
-
export * from "./types/googleOAuth.types";
|
|
29
|
-
export * from "./types/inventory.types";
|
|
30
|
-
export * from "./types/item.types";
|
|
31
|
-
export * from "./types/itemContainer.types";
|
|
32
|
-
export * from "./types/leaderboard.types";
|
|
33
|
-
export * from "./types/macro.types";
|
|
34
|
-
export * from "./types/maps.types";
|
|
35
|
-
export * from "./types/marketplace.types";
|
|
36
|
-
export * from "./types/notification.types";
|
|
37
|
-
export * from "./types/npc.types";
|
|
38
|
-
export * from "./types/pagination.types";
|
|
39
|
-
export * from "./types/party.types";
|
|
40
|
-
export * from "./types/places.types";
|
|
41
|
-
export * from "./types/preloadScene.types";
|
|
42
|
-
export * from "./types/premiumAccount.types";
|
|
43
|
-
export * from "./types/quest.types";
|
|
44
|
-
export * from "./types/resource.types";
|
|
45
|
-
export * from "./types/scene.types";
|
|
46
|
-
export * from "./types/shortcut.types";
|
|
47
|
-
export * from "./types/skills.types";
|
|
48
|
-
export * from "./types/socket.types";
|
|
49
|
-
export * from "./types/spell.types";
|
|
50
|
-
export * from "./types/tiled.types";
|
|
51
|
-
export * from "./types/trade.types";
|
|
52
|
-
export * from "./types/translation.types";
|
|
53
|
-
export * from "./types/ui.types";
|
|
54
|
-
export * from "./types/useWith.types";
|
|
55
|
-
export * from "./types/user.types";
|
|
56
|
-
export * from "./types/validation.types";
|
|
57
|
-
export * from "./types/view.types";
|
|
1
|
+
export * from "./constants/date.constants";
|
|
2
|
+
export * from "./constants/npc.constants";
|
|
3
|
+
export * from "./constants/socket.constants";
|
|
4
|
+
export * from "./constants/world.constants";
|
|
5
|
+
export * from "./helpers/deviceHelpers";
|
|
6
|
+
export * from "./helpers/itemSlotHelper";
|
|
7
|
+
export * from "./helpers/skillHelpers";
|
|
8
|
+
export * from "./helpers/weightHelper";
|
|
9
|
+
export * from "./libs/GridHelper";
|
|
10
|
+
export * from "./libs/MathHelper";
|
|
11
|
+
export * from "./libs/SocketHelper";
|
|
12
|
+
export * from "./libs/TextHelper";
|
|
13
|
+
export * from "./libs/TypeHelper";
|
|
14
|
+
export * from "./types/animation.types";
|
|
15
|
+
export * from "./types/api.types";
|
|
16
|
+
export * from "./types/asset.types";
|
|
17
|
+
export * from "./types/auth.types";
|
|
18
|
+
export * from "./types/battle.types";
|
|
19
|
+
export * from "./types/buff.types";
|
|
20
|
+
export * from "./types/character.types";
|
|
21
|
+
export * from "./types/chat.types";
|
|
22
|
+
export * from "./types/depot.types";
|
|
23
|
+
export * from "./types/device.types";
|
|
24
|
+
export * from "./types/displayText.types";
|
|
25
|
+
export * from "./types/entity.types";
|
|
26
|
+
export * from "./types/env.types";
|
|
27
|
+
export * from "./types/equipment.types";
|
|
28
|
+
export * from "./types/googleOAuth.types";
|
|
29
|
+
export * from "./types/inventory.types";
|
|
30
|
+
export * from "./types/item.types";
|
|
31
|
+
export * from "./types/itemContainer.types";
|
|
32
|
+
export * from "./types/leaderboard.types";
|
|
33
|
+
export * from "./types/macro.types";
|
|
34
|
+
export * from "./types/maps.types";
|
|
35
|
+
export * from "./types/marketplace.types";
|
|
36
|
+
export * from "./types/notification.types";
|
|
37
|
+
export * from "./types/npc.types";
|
|
38
|
+
export * from "./types/pagination.types";
|
|
39
|
+
export * from "./types/party.types";
|
|
40
|
+
export * from "./types/places.types";
|
|
41
|
+
export * from "./types/preloadScene.types";
|
|
42
|
+
export * from "./types/premiumAccount.types";
|
|
43
|
+
export * from "./types/quest.types";
|
|
44
|
+
export * from "./types/resource.types";
|
|
45
|
+
export * from "./types/scene.types";
|
|
46
|
+
export * from "./types/shortcut.types";
|
|
47
|
+
export * from "./types/skills.types";
|
|
48
|
+
export * from "./types/socket.types";
|
|
49
|
+
export * from "./types/spell.types";
|
|
50
|
+
export * from "./types/tiled.types";
|
|
51
|
+
export * from "./types/trade.types";
|
|
52
|
+
export * from "./types/translation.types";
|
|
53
|
+
export * from "./types/ui.types";
|
|
54
|
+
export * from "./types/useWith.types";
|
|
55
|
+
export * from "./types/user.types";
|
|
56
|
+
export * from "./types/validation.types";
|
|
57
|
+
export * from "./types/view.types";
|
|
58
58
|
//# sourceMappingURL=index.d.ts.map
|