bloxd.io.d.ts 2.0.1 → 2.2.0
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/api-type-def/clientOption/clientOptions/canChange.d.ts +75 -75
- package/dist/api-type-def/clientOption/clientOptions/crouchingSpeed.d.ts +46 -46
- package/dist/api-type-def/clientOption/clientOptions/index.d.ts +34 -34
- package/dist/api-type-def/clientOption/clientOptions/runningSpeed.d.ts +51 -51
- package/dist/api-type-def/clientOption/clientOptions/speedMultiplier.d.ts +53 -53
- package/dist/api-type-def/clientOption/clientOptions/walkingSpeed.d.ts +51 -51
- package/dist/api-type-def/clientOption/index.d.ts +12 -16
- package/dist/api-type-def/entitySetting/entitySettings/example.d.ts +63 -63
- package/dist/api-type-def/entitySetting/entitySettings/index.d.ts +32 -32
- package/dist/api-type-def/entitySetting/entitySettings/opacity.d.ts +69 -69
- package/dist/api-type-def/entitySetting/entitySettings/overlayColour.d.ts +65 -65
- package/dist/api-type-def/entitySetting/entitySettings/zIndex.d.ts +64 -64
- package/dist/api-type-def/entitySetting/index.d.ts +54 -61
- package/dist/api-type-def/index.d.ts +86 -10
- package/dist/api-type-def/mobSetting/index.d.ts +44 -35
- package/dist/api-type-def/mobSetting/mobSettings/index.d.ts +6 -6
- package/dist/api-type-def/mobSetting/mobSettings/variation.d.ts +118 -118
- package/dist/api-type-def/normal/block/attemptWorldChangeBlock.d.ts +3 -0
- package/dist/api-type-def/normal/block/blockCoordToChunkId.d.ts +3 -0
- package/dist/api-type-def/normal/block/blockIdToBlockName.d.ts +9 -0
- package/dist/api-type-def/normal/block/blockNameToBlockId.d.ts +17 -0
- package/dist/api-type-def/normal/block/chunkIdToBotLeftCoord.d.ts +3 -0
- package/dist/api-type-def/normal/block/getBlock.d.ts +17 -0
- package/dist/api-type-def/normal/block/getBlockId.d.ts +12 -0
- package/dist/api-type-def/normal/block/getBlockSolidity.d.ts +19 -0
- package/dist/api-type-def/normal/block/getChunk.d.ts +15 -0
- package/dist/api-type-def/normal/block/getEmptyChunk.d.ts +12 -0
- package/dist/api-type-def/normal/block/getMetaInfo.d.ts +9 -0
- package/dist/api-type-def/normal/block/index.d.ts +30 -0
- package/dist/api-type-def/normal/block/isBlockInLoadedChunk.d.ts +10 -0
- package/dist/api-type-def/normal/block/setBlock.d.ts +20 -0
- package/dist/api-type-def/normal/block/setBlockRect.d.ts +11 -0
- package/dist/api-type-def/normal/block/setBlockWalls.d.ts +13 -0
- package/dist/api-type-def/normal/entity/getEntityName.d.ts +9 -0
- package/dist/api-type-def/normal/entity/index.d.ts +3 -0
- package/dist/api-type-def/normal/forceRespawn.d.ts +10 -1
- package/dist/api-type-def/normal/getUnitCoordinatesLifeformWithin.d.ts +10 -12
- package/dist/api-type-def/normal/health/applyHealthChange.d.ts +10 -12
- package/dist/api-type-def/normal/health/applyMeleeHit.d.ts +18 -20
- package/dist/api-type-def/normal/health/attemptApplyDamage.d.ts +29 -31
- package/dist/api-type-def/normal/health/getHealth.d.ts +13 -15
- package/dist/api-type-def/normal/health/index.d.ts +9 -8
- package/dist/api-type-def/normal/health/isAlive.d.ts +9 -11
- package/dist/api-type-def/normal/health/killLifeform.d.ts +10 -12
- package/dist/api-type-def/normal/health/setHealth.d.ts +15 -17
- package/dist/api-type-def/normal/index.d.ts +67 -13
- package/dist/api-type-def/normal/item/createItemDrop.d.ts +20 -0
- package/dist/api-type-def/normal/item/deleteItemDrop.d.ts +3 -0
- package/dist/api-type-def/normal/item/index.d.ts +5 -0
- package/dist/api-type-def/normal/item/setCantPickUpItem.d.ts +3 -0
- package/dist/api-type-def/normal/killstreak/clearKillstreak.d.ts +9 -11
- package/dist/api-type-def/normal/killstreak/getCurrentKillstreak.d.ts +9 -11
- package/dist/api-type-def/normal/killstreak/index.d.ts +4 -3
- package/dist/api-type-def/normal/message/broadcastMessage.d.ts +14 -16
- package/dist/api-type-def/normal/message/index.d.ts +23 -4
- package/dist/api-type-def/normal/message/sendFlyingMiddleMessage.d.ts +13 -15
- package/dist/api-type-def/normal/message/sendMessage.d.ts +26 -25
- package/dist/api-type-def/normal/message/sendTopRightHelper.d.ts +31 -0
- package/dist/api-type-def/normal/playParticleEffect.d.ts +11 -0
- package/dist/api-type-def/normal/player/getNumPlayers.d.ts +8 -10
- package/dist/api-type-def/normal/player/getPlayerDbId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerIdFromDbId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerIds.d.ts +8 -10
- package/dist/api-type-def/normal/player/getPlayerPartyWhenJoined.d.ts +10 -12
- package/dist/api-type-def/normal/player/index.d.ts +12 -6
- package/dist/api-type-def/normal/player/isMobile.d.ts +9 -0
- package/dist/api-type-def/normal/player/kickPlayer.d.ts +8 -0
- package/dist/api-type-def/normal/player/playerIsInGame.d.ts +9 -11
- package/dist/api-type-def/normal/player/playerIsLoggedIn.d.ts +7 -9
- package/dist/api-type-def/normal/positions/getPosition.d.ts +9 -11
- package/dist/api-type-def/normal/positions/index.d.ts +7 -3
- package/dist/api-type-def/normal/positions/setPosition.d.ts +23 -22
- package/dist/api-type-def/normal/shields/getShieldAmount.d.ts +11 -13
- package/dist/api-type-def/normal/shields/index.d.ts +4 -4
- package/dist/api-type-def/normal/shields/setShieldAmount.d.ts +10 -12
- package/dist/api-type-def/normal/shops/configureShopCategory.d.ts +10 -12
- package/dist/api-type-def/normal/shops/configureShopCategoryForPlayer.d.ts +11 -0
- package/dist/api-type-def/normal/shops/createShopItem.d.ts +14 -16
- package/dist/api-type-def/normal/shops/createShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/shops/deleteShopItem.d.ts +12 -14
- package/dist/api-type-def/normal/shops/index.d.ts +11 -6
- package/dist/api-type-def/normal/shops/resetShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/shops/showShopTutorial.d.ts +9 -11
- package/dist/api-type-def/normal/shops/updateShopItem.d.ts +13 -15
- package/dist/api-type-def/normal/shops/updateShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/standingOns/getBlockCoordinatesPlayerStandingOn.d.ts +12 -14
- package/dist/api-type-def/normal/standingOns/getBlockTypesPlayerStandingOn.d.ts +10 -12
- package/dist/api-type-def/normal/standingOns/index.d.ts +4 -3
- package/dist/index.d.ts +9 -9
- package/dist/type/ApplyMeleeHitOverrides.d.ts +7 -7
- package/dist/type/ChunkId.d.ts +1 -0
- package/dist/type/Coordinate.d.ts +1 -1
- package/dist/type/Direction.d.ts +1 -1
- package/dist/type/Health.d.ts +1 -1
- package/dist/type/ItemMetaInfo.d.ts +1 -0
- package/dist/type/LifeFormBodyPart.d.ts +1 -1
- package/dist/type/Party.d.ts +5 -5
- package/dist/type/PlayerAttemptDamageOtherPlayerOpts.d.ts +19 -19
- package/dist/type/ShieldAmount.d.ts +1 -1
- package/dist/type/WhoDidDamage.d.ts +5 -5
- package/dist/type/WhoKilled.d.ts +2 -2
- package/dist/type/WorldBlockChangedInfo.d.ts +3 -0
- package/dist/type/block/AllBlockId.d.ts +1 -1
- package/dist/type/block/AllBlockName.d.ts +1 -1
- package/dist/type/block/Block.d.ts +3 -3
- package/dist/type/block/BlockId.d.ts +2 -6
- package/dist/type/block/BlockName.d.ts +2 -6
- package/dist/type/block/index.d.ts +5 -5
- package/dist/type/color/Array255Color.d.ts +8 -8
- package/dist/type/color/Array255ColorWithA.d.ts +10 -10
- package/dist/type/color/StringColor.d.ts +7 -7
- package/dist/type/color/index.d.ts +3 -3
- package/dist/type/dbId/PlayerDbId.d.ts +1 -5
- package/dist/type/dbId/index.d.ts +1 -1
- package/dist/type/id/EntityId.d.ts +2 -6
- package/dist/type/id/Id.d.ts +1 -5
- package/dist/type/id/ItemEntityId.d.ts +2 -0
- package/dist/type/id/LifeFormId.d.ts +3 -3
- package/dist/type/id/MobId.d.ts +2 -6
- package/dist/type/id/PlayerId.d.ts +2 -6
- package/dist/type/id/index.d.ts +6 -5
- package/dist/type/index.d.ts +24 -20
- package/dist/type/item/AllItemId.d.ts +4 -4
- package/dist/type/item/AllItemName.d.ts +1 -1
- package/dist/type/item/Item.d.ts +3 -3
- package/dist/type/item/ItemAttributes.d.ts +5 -0
- package/dist/type/item/ItemId.d.ts +2 -6
- package/dist/type/item/ItemName.d.ts +2 -6
- package/dist/type/item/index.d.ts +6 -5
- package/dist/type/message/CustomTextStyling.d.ts +2 -2
- package/dist/type/message/EntityName.d.ts +8 -8
- package/dist/type/message/StyledIcon.d.ts +10 -10
- package/dist/type/message/StyledText.d.ts +6 -6
- package/dist/type/message/TextStyle.d.ts +8 -8
- package/dist/type/message/TranslatedText.d.ts +5 -5
- package/dist/type/message/index.d.ts +6 -6
- package/dist/type/mob/MobType.d.ts +1 -1
- package/dist/type/mob/index.d.ts +1 -1
- package/dist/type/particle/ParticlePresetOpts.d.ts +20 -20
- package/dist/type/particle/ParticleSystemBlendMode.d.ts +21 -21
- package/dist/type/particle/PresetId.d.ts +1 -1
- package/dist/type/particle/TempParticleSystemOpts.d.ts +31 -31
- package/dist/type/particle/Texture.d.ts +1 -1
- package/dist/type/particle/index.d.ts +5 -5
- package/dist/type/shop/ShopCategoryConfig.d.ts +9 -9
- package/dist/type/shop/ShopCategoryKey.d.ts +1 -1
- package/dist/type/shop/ShopItem.d.ts +25 -25
- package/dist/type/shop/ShopItemBadgeType.d.ts +1 -1
- package/dist/type/shop/ShopItemKey.d.ts +1 -1
- package/dist/type/shop/ShopItemUserInput.d.ts +25 -25
- package/dist/type/shop/index.d.ts +6 -6
- package/dist/type/sound/AllSoundName.d.ts +1 -1
- package/dist/type/sound/SoundName.d.ts +2 -6
- package/dist/type/sound/index.d.ts +2 -2
- package/dist/type/utilType.d.ts +3 -3
- package/package.json +1 -1
- package/readme.md +48 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default ClearKillstreakInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Clears the player's current killstreak
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
declare const clearKillstreak: (playerId: PlayerId) => void;
|
|
9
|
+
export { clearKillstreak };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default GetCurrentKillsreakInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the player's current killstreak
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId
|
|
6
|
+
* @returns {number}
|
|
7
|
+
*/
|
|
8
|
+
declare const getCurrentKillstreak: (playerId: PlayerId) => number;
|
|
9
|
+
export { getCurrentKillstreak };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const KillstreakApis: {
|
|
2
|
+
readonly getCurrentKillstreak: (playerId: import("../../..").PlayerId) => number;
|
|
3
|
+
readonly clearKillstreak: (playerId: import("../../..").PlayerId) => void;
|
|
4
|
+
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { CustomTextStyling } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export default BroadcastMessageInterface;
|
|
1
|
+
import { CustomTextStyling } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Send a message to everyone
|
|
4
|
+
*
|
|
5
|
+
* @param {string | CustomTextStyling} message - The text contained within the message. Can use `Custom Text Styling`.
|
|
6
|
+
* @param { { fontWeight?: number | string; color?: string } } [style] - An optional style argument. Can contain values for fontWeight and color of the message.
|
|
7
|
+
* style is ignored if message uses custom text styling (i.e. is not a string).
|
|
8
|
+
* @returns {void}
|
|
9
|
+
*/
|
|
10
|
+
declare const broadcastMessage: (message: string | CustomTextStyling, style?: {
|
|
11
|
+
fontWeight?: number | string;
|
|
12
|
+
color?: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
export { broadcastMessage };
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const MessageApis: {
|
|
2
|
+
broadcastMessage: (message: string | import("../../..").CustomTextStyling, style?: {
|
|
3
|
+
fontWeight?: number | string;
|
|
4
|
+
color?: string;
|
|
5
|
+
}) => void;
|
|
6
|
+
sendMessage: {
|
|
7
|
+
(playerId: import("../../..").PlayerId, message: string, style: {
|
|
8
|
+
fontWeight?: number | string;
|
|
9
|
+
color?: string;
|
|
10
|
+
}): void;
|
|
11
|
+
(playerId: import("../../..").PlayerId, message: import("../../..").CustomTextStyling): void;
|
|
12
|
+
};
|
|
13
|
+
sendFlyingMiddleMessage: (playerId: import("../../..").PlayerId, message: string | import("../../..").CustomTextStyling, distanceFromAction?: number, lifetimeMs?: number) => void;
|
|
14
|
+
sendTopRightHelper: (playerId: import("../../..").PlayerId, icon: string, text: string, opts: {
|
|
15
|
+
duration?: number;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
color?: import("../../..").StringColor;
|
|
19
|
+
iconSizeMult?: number;
|
|
20
|
+
textAndIconColor?: string;
|
|
21
|
+
fontSize?: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { CustomTextStyling, PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export default SendFlyingMiddleMessage;
|
|
1
|
+
import { CustomTextStyling, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Send a flying middle message to a specific player
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId - Id of the player
|
|
6
|
+
* @param {string | CustomTextStyling} message - The text contained within the message. Can be either a string or use `Custom Text Styling`.
|
|
7
|
+
* @param {number} distanceFromAction - The distance from the action that has caused this message to be displayed,
|
|
8
|
+
* this value will be used to determine how the message flies across the screen.
|
|
9
|
+
* @param {number} [lifetimeMs] - How long the message will be visible in milliseconds. Defaults to 1000ms.
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
declare const sendFlyingMiddleMessage: (playerId: PlayerId, message: string | CustomTextStyling, distanceFromAction?: number, lifetimeMs?: number) => void;
|
|
13
|
+
export { sendFlyingMiddleMessage };
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { PlayerId, CustomTextStyling } from "../../../type/index";
|
|
2
|
-
interface SendMessageInterface {
|
|
3
|
-
/**
|
|
4
|
-
* Send a message to a specific player
|
|
5
|
-
*
|
|
6
|
-
* @param {PlayerId} playerId - Id of the player
|
|
7
|
-
* @param {string} message - The text contained within the message.
|
|
8
|
-
* @param { { fontWeight?: number | string; color?: string } } [style] - An optional style argument. Can contain values for fontWeight and color of the message.
|
|
9
|
-
* @returns {void}
|
|
10
|
-
*/
|
|
11
|
-
sendMessage(playerId: PlayerId, message: string, style: {
|
|
12
|
-
fontWeight?: number | string;
|
|
13
|
-
color?: string;
|
|
14
|
-
}): void;
|
|
15
|
-
/**
|
|
16
|
-
* Send a message to a specific player
|
|
17
|
-
*
|
|
18
|
-
* @param {PlayerId} playerId - Id of the player
|
|
19
|
-
* @param {CustomTextStyling} message - The text contained within the message.
|
|
20
|
-
*
|
|
21
|
-
* @returns {void}
|
|
22
|
-
*/
|
|
23
|
-
sendMessage(playerId: PlayerId, message: CustomTextStyling): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
1
|
+
import { PlayerId, CustomTextStyling } from "../../../type/index";
|
|
2
|
+
interface SendMessageInterface {
|
|
3
|
+
/**
|
|
4
|
+
* Send a message to a specific player
|
|
5
|
+
*
|
|
6
|
+
* @param {PlayerId} playerId - Id of the player
|
|
7
|
+
* @param {string} message - The text contained within the message.
|
|
8
|
+
* @param { { fontWeight?: number | string; color?: string } } [style] - An optional style argument. Can contain values for fontWeight and color of the message.
|
|
9
|
+
* @returns {void}
|
|
10
|
+
*/
|
|
11
|
+
sendMessage(playerId: PlayerId, message: string, style: {
|
|
12
|
+
fontWeight?: number | string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* Send a message to a specific player
|
|
17
|
+
*
|
|
18
|
+
* @param {PlayerId} playerId - Id of the player
|
|
19
|
+
* @param {CustomTextStyling} message - The text contained within the message.
|
|
20
|
+
*
|
|
21
|
+
* @returns {void}
|
|
22
|
+
*/
|
|
23
|
+
sendMessage(playerId: PlayerId, message: CustomTextStyling): void;
|
|
24
|
+
}
|
|
25
|
+
declare const sendMessage: SendMessageInterface["sendMessage"];
|
|
26
|
+
export { sendMessage };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PlayerId, StringColor } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated - prefer using other UI elements
|
|
4
|
+
* (this UI element hasn't been properly thought through in combination with other elements like killfeed, uirequests, etc)
|
|
5
|
+
*
|
|
6
|
+
* Send a player an icon in the top right corner
|
|
7
|
+
*
|
|
8
|
+
* @param {PlayerId} playerId
|
|
9
|
+
* @param {string} icon - Can be any icon from font-awesome.
|
|
10
|
+
* @param {string} text - The text to send.
|
|
11
|
+
* @param { {
|
|
12
|
+
* duration?: number
|
|
13
|
+
* width?: number
|
|
14
|
+
* height?: number
|
|
15
|
+
* color?: string
|
|
16
|
+
* iconSizeMult?: number
|
|
17
|
+
* textAndIconColor?: string
|
|
18
|
+
* fontSize?: string
|
|
19
|
+
* } } opts - Can include keys duration, width, height, color, iconSizeMult.
|
|
20
|
+
* @returns {void}
|
|
21
|
+
*/
|
|
22
|
+
declare const sendTopRightHelper: (playerId: PlayerId, icon: string, text: string, opts: {
|
|
23
|
+
duration?: number;
|
|
24
|
+
width?: number;
|
|
25
|
+
height?: number;
|
|
26
|
+
color?: StringColor;
|
|
27
|
+
iconSizeMult?: number;
|
|
28
|
+
textAndIconColor?: string;
|
|
29
|
+
fontSize?: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
export { sendTopRightHelper };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlayerId, TempParticleSystemOpts } from "../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Play particle effect on all clients, or only on some clients if clientPredictedBy is specified
|
|
4
|
+
*
|
|
5
|
+
* @param {TempParticleSystemOpts | ParticlePresetOpts} opts
|
|
6
|
+
* @param {PlayerId} [clientPredictedBy] - Play only on clients where client with playerId clientPredictedBy
|
|
7
|
+
* is not invisible, transparent, or themselves
|
|
8
|
+
* @returns {void}
|
|
9
|
+
*/
|
|
10
|
+
declare const playParticleEffect: (opts: TempParticleSystemOpts, clientPredictedBy?: PlayerId) => void;
|
|
11
|
+
export { playParticleEffect };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export default GetNumPlayersInterface;
|
|
1
|
+
/**
|
|
2
|
+
* Get the number of players in the room
|
|
3
|
+
*
|
|
4
|
+
* @description this return number is 1 - 40 int cuz one room max player number is 40
|
|
5
|
+
* @returns {number}
|
|
6
|
+
*/
|
|
7
|
+
declare const getNumPlayers: () => number;
|
|
8
|
+
export { getNumPlayers };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PlayerDbId, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Given a player, get their permanent identifier that doesn't change when leaving and re-entering
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId
|
|
6
|
+
* @returns {PlayerDbId}
|
|
7
|
+
*/
|
|
8
|
+
declare const getPlayerDbId: (playerId: PlayerId) => PlayerDbId;
|
|
9
|
+
export { getPlayerDbId };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Given the name of a player, get their id
|
|
4
|
+
*
|
|
5
|
+
* @param {string} playerName
|
|
6
|
+
* @returns {null | PlayerId}
|
|
7
|
+
*/
|
|
8
|
+
declare const getPlayerId: (playerName: string) => null | PlayerId;
|
|
9
|
+
export { getPlayerId };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PlayerDbId, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Returns null if player not in lobby
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerDbId} dbId
|
|
6
|
+
* @returns {null | PlayerId}
|
|
7
|
+
*/
|
|
8
|
+
declare const getPlayerIdFromDbId: (dbId: PlayerDbId) => null | PlayerId;
|
|
9
|
+
export { getPlayerIdFromDbId };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export default GetPlayerIdsInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get all the player ids.
|
|
4
|
+
*
|
|
5
|
+
* @returns {PlayerId[]}
|
|
6
|
+
*/
|
|
7
|
+
declare const getPlayerIds: () => PlayerId[];
|
|
8
|
+
export { getPlayerIds };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { Party, PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default GetPlayerPartyWhenJoinedInterface;
|
|
1
|
+
import { Party, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the party that the player was in when they joined the game. The returned object contains the playerDbIds, as well
|
|
4
|
+
* as the playerIds if available, of the party leader and members.
|
|
5
|
+
*
|
|
6
|
+
* @param {PlayerId} playerId
|
|
7
|
+
* @returns {PNull<{ partyCode: string; playerDbIds: PlayerDbId[] }>}
|
|
8
|
+
*/
|
|
9
|
+
declare const getPlayerPartyWhenJoined: (playerId: PlayerId) => Party | null;
|
|
10
|
+
export { getPlayerPartyWhenJoined };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const PlayerApis: {
|
|
2
|
+
getPlayerIds: () => import("../../..").PlayerId[];
|
|
3
|
+
getNumPlayers: () => number;
|
|
4
|
+
getPlayerPartyWhenJoined: (playerId: import("../../..").PlayerId) => import("../../..").Party | null;
|
|
5
|
+
playerIsInGame: (playerId: import("../../..").PlayerId) => boolean;
|
|
6
|
+
playerIsLoggedIn: (playerId: import("../../..").PlayerId) => boolean;
|
|
7
|
+
getPlayerId: (playerName: string) => null | import("../../..").PlayerId;
|
|
8
|
+
getPlayerDbId: (playerId: import("../../..").PlayerId) => import("../../..").PlayerDbId;
|
|
9
|
+
getPlayerIdFromDbId: (dbId: import("../../..").PlayerDbId) => null | import("../../..").PlayerId;
|
|
10
|
+
kickPlayer: (playerId: import("../../..").PlayerId, reason: string) => void;
|
|
11
|
+
isMobile: (playerId: import("../../..").PlayerId) => boolean;
|
|
12
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default PlayerIsInGameInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a player is currently in the game
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
declare const playerIsInGame: (playerId: PlayerId) => boolean;
|
|
9
|
+
export { playerIsInGame };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export default PlayerIsLoggedInInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* @param {PlayerId} playerId
|
|
4
|
+
* @returns {boolean}
|
|
5
|
+
*/
|
|
6
|
+
declare const playerIsLoggedIn: (playerId: PlayerId) => boolean;
|
|
7
|
+
export { playerIsLoggedIn };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Coordinate, EntityId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default GetPositionInterface;
|
|
1
|
+
import { Coordinate, EntityId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get position of a player / entity.
|
|
4
|
+
*
|
|
5
|
+
* @param {EntityId} entityId
|
|
6
|
+
* @returns {Coordinate}
|
|
7
|
+
*/
|
|
8
|
+
declare const getPosition: (entityId: EntityId) => Coordinate;
|
|
9
|
+
export { getPosition };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
export declare const PositionApis: {
|
|
2
|
+
getPosition: (entityId: import("../../..").EntityId) => import("../../..").Coordinate;
|
|
3
|
+
setPosition: {
|
|
4
|
+
(entityId: import("../../..").EntityId, x: number, y: number, z: number): void;
|
|
5
|
+
(entityId: import("../../..").EntityId, position: Readonly<import("../../..").Coordinate>): void;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { Coordinate, EntityId } from "../../../type/index";
|
|
2
|
-
interface SetPositionInterface {
|
|
3
|
-
/**
|
|
4
|
-
* Set position of a player / entity.
|
|
5
|
-
*
|
|
6
|
-
* @param {EntityId} entityId
|
|
7
|
-
* @param {number} x
|
|
8
|
-
* @param {number} y
|
|
9
|
-
* @param {number} z
|
|
10
|
-
* @returns {void}
|
|
11
|
-
*/
|
|
12
|
-
setPosition(entityId: EntityId, x: number, y: number, z: number): void;
|
|
13
|
-
/**
|
|
14
|
-
* Set position of a player / entity.
|
|
15
|
-
*
|
|
16
|
-
* @param {EntityId} entityId
|
|
17
|
-
* @param {Coordinate} position
|
|
18
|
-
* @returns {void}
|
|
19
|
-
*/
|
|
20
|
-
setPosition(entityId: EntityId, position: Readonly<Coordinate>): void;
|
|
21
|
-
}
|
|
22
|
-
|
|
1
|
+
import { Coordinate, EntityId } from "../../../type/index";
|
|
2
|
+
interface SetPositionInterface {
|
|
3
|
+
/**
|
|
4
|
+
* Set position of a player / entity.
|
|
5
|
+
*
|
|
6
|
+
* @param {EntityId} entityId
|
|
7
|
+
* @param {number} x
|
|
8
|
+
* @param {number} y
|
|
9
|
+
* @param {number} z
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
setPosition(entityId: EntityId, x: number, y: number, z: number): void;
|
|
13
|
+
/**
|
|
14
|
+
* Set position of a player / entity.
|
|
15
|
+
*
|
|
16
|
+
* @param {EntityId} entityId
|
|
17
|
+
* @param {Coordinate} position
|
|
18
|
+
* @returns {void}
|
|
19
|
+
*/
|
|
20
|
+
setPosition(entityId: EntityId, position: Readonly<Coordinate>): void;
|
|
21
|
+
}
|
|
22
|
+
declare const setPosition: SetPositionInterface["setPosition"];
|
|
23
|
+
export { setPosition };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { EntityId, ShieldAmount } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export default GetShieldAmountInterface;
|
|
1
|
+
import { EntityId, ShieldAmount } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get the current shield of an entity.
|
|
4
|
+
*
|
|
5
|
+
* returns value is marking `ShiendAmount`.which is `number` alias
|
|
6
|
+
*
|
|
7
|
+
* @param {EntityId} entityId
|
|
8
|
+
* @returns {number}
|
|
9
|
+
*/
|
|
10
|
+
declare const getShieldAmount: (entityId: EntityId) => ShieldAmount;
|
|
11
|
+
export { getShieldAmount };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const ShieldApis: {
|
|
2
|
+
getShieldAmount: (entityId: import("../../..").EntityId) => import("../../..").ShieldAmount;
|
|
3
|
+
setShieldAmount: (lifeformId: import("../../..").LifeformId, newShieldAmount: import("../../..").ShieldAmount) => void;
|
|
4
|
+
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { LifeformId, ShieldAmount } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default SetShieldAmountInterface;
|
|
1
|
+
import { LifeformId, ShieldAmount } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Set the current shield of a lifeform.
|
|
4
|
+
*
|
|
5
|
+
* @param {LifeformId} lifeformId
|
|
6
|
+
* @param {number} newShieldAmount - on d.ts,this arg type is marking `ShieldAmount` which is `number` alias
|
|
7
|
+
* @returns {void}
|
|
8
|
+
*/
|
|
9
|
+
declare const setShieldAmount: (lifeformId: LifeformId, newShieldAmount: ShieldAmount) => void;
|
|
10
|
+
export { setShieldAmount };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ShopCategoryConfig, ShopCategoryKey } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default ConfigureShopCategory;
|
|
1
|
+
import { ShopCategoryConfig, ShopCategoryKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Set properties of a shop category.
|
|
4
|
+
*
|
|
5
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category to configure
|
|
6
|
+
* @param {ShopCategoryConfig} config - Category configuration properties
|
|
7
|
+
* @returns {void}
|
|
8
|
+
*/
|
|
9
|
+
declare const configureShopCategory: (categoryKey: ShopCategoryKey, config: ShopCategoryConfig) => void;
|
|
10
|
+
export { configureShopCategory };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlayerId, ShopCategoryConfig, ShopCategoryKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Configure a shop category for a specific player.
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId - The player to configure the category for
|
|
6
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category to configure
|
|
7
|
+
* @param {ShopCategoryConfig} config - Category configuration properties
|
|
8
|
+
* @returns {void}
|
|
9
|
+
*/
|
|
10
|
+
declare const configureShopCategoryForPlayer: (playerId: PlayerId, categoryKey: ShopCategoryKey, config: ShopCategoryConfig) => void;
|
|
11
|
+
export { configureShopCategoryForPlayer };
|