添加2个接口
- setPlayerUIItem - getPlayerUIItem
This commit is contained in:
+25
-1
@@ -327,7 +327,11 @@ const GMLIB_API = {
|
||||
/** 获取物品BUFF效果名称 @type {function(Item):string} */
|
||||
getItemEffecName: ll.import("GMLIB_API", "getItemEffecName"),
|
||||
/** 物品是否为食物 @type {function(Item):boolean} */
|
||||
itemIsFood: ll.import("GMLIB_API", "itemIsFood")
|
||||
itemIsFood: ll.import("GMLIB_API", "itemIsFood"),
|
||||
/** 设置玩家UI栏物品 @type {function(Player,number,Item):void} */
|
||||
setPlayerUIItem: ll.import("GMLIB_API", "setPlayerUIItem"),
|
||||
/** 获取玩家UI栏物品 @type {function(Player,number):Item} */
|
||||
getPlayerUIItem: ll.import("GMLIB_API", "getPlayerUIItem")
|
||||
}
|
||||
|
||||
/** 静态悬浮字类列表 @type {Map<number,StaticFloatingText>} */
|
||||
@@ -2434,6 +2438,26 @@ LLSE_Item.prototype.isFood =
|
||||
return GMLIB_API.itemIsFood(this);
|
||||
}
|
||||
|
||||
LLSE_Player.prototype.setPlayerUIItem =
|
||||
/**
|
||||
* 设置玩家UI栏物品
|
||||
* @param {number} slot 格子槽位
|
||||
* @param {Item} item 要设置的物品
|
||||
*/
|
||||
function (slot, item) {
|
||||
return GMLIB_API.setPlayerUIItem(this, slot, item);
|
||||
}
|
||||
|
||||
LLSE_Player.prototype.setPlayerUIItem =
|
||||
/**
|
||||
* 获取玩家UI栏物品
|
||||
* @param {number} slot 格子槽位
|
||||
* @returns {Item} 物品对象
|
||||
*/
|
||||
function (slot) {
|
||||
return GMLIB_API.getPlayerUIItem(this, slot);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
StaticFloatingText,
|
||||
DynamicFloatingText,
|
||||
|
||||
Reference in New Issue
Block a user