新增/修改
新增 - getContainerType 修改 - HandleRequestActionEvent
This commit is contained in:
Vendored
+2
-2
@@ -215,8 +215,8 @@ declare class Event {
|
||||
player: Player,
|
||||
/** 请求类型 */
|
||||
actionType: string,
|
||||
/** 容器ID */
|
||||
containerId: number,
|
||||
/** 容器枚举名 */
|
||||
containerNetId: string,
|
||||
/** 请求的槽位 */
|
||||
slot: number
|
||||
) => boolean | void
|
||||
|
||||
Vendored
+9
-4
@@ -1266,15 +1266,20 @@ interface Item {
|
||||
blocks: string[]
|
||||
): void;
|
||||
|
||||
/** 获取物品分类名称 */
|
||||
/** (GMLIB)获取物品分类名称 */
|
||||
getCategoryName(): string;
|
||||
|
||||
/** 获取物品的命名 */
|
||||
/** (GMLIB)获取物品的命名 */
|
||||
getCustomName(): string;
|
||||
|
||||
/** 获取物品的BUFF效果名称 */
|
||||
/** (GMLIB)获取物品的BUFF效果名称 */
|
||||
getEffecName(): string;
|
||||
|
||||
/** 物品是否为食物 */
|
||||
/** (GMLIB)物品是否为食物 */
|
||||
isFood(): boolean;
|
||||
}
|
||||
|
||||
interface Container {
|
||||
/** (GMLIB)获取容器类型 */
|
||||
getContainerType(): string
|
||||
}
|
||||
+11
-1
@@ -333,7 +333,9 @@ const GMLIB_API = {
|
||||
/** 获取玩家UI栏物品 @type {function(Player,number):Item} */
|
||||
getPlayerUIItem: ll.import("GMLIB_API", "getPlayerUIItem"),
|
||||
/** 更新玩家容器物品 @type {function(Player,number,number,Item):void} */
|
||||
sendInventorySlotPacket: ll.import("GMLIB_API","sendInventorySlotPacket")
|
||||
sendInventorySlotPacket: ll.import("GMLIB_API", "sendInventorySlotPacket"),
|
||||
/** 获取容器类型 @type {function(Container):string} */
|
||||
getContainerType: ll.import("GMLIB_API", "getContainerType")
|
||||
}
|
||||
|
||||
/** 静态悬浮字类列表 @type {Map<number,StaticFloatingText>} */
|
||||
@@ -2471,6 +2473,14 @@ LLSE_Player.prototype.sendInventorySlotPacket =
|
||||
GMLIB_API.sendInventorySlotPacket(this, containerId, slot, item);
|
||||
}
|
||||
|
||||
LLSE_Container.prototype.getContainerType =
|
||||
/**
|
||||
* 获取容器类型
|
||||
*/
|
||||
function () {
|
||||
return GMLIB_API.getContainerType(this);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
StaticFloatingText,
|
||||
DynamicFloatingText,
|
||||
|
||||
Reference in New Issue
Block a user