增加4个接口
- getItemCanDestroy - setItemCanDestroy - getItemCanPlaceOn - setItemCanPlaceOn
This commit is contained in:
+45
-1
@@ -303,7 +303,15 @@ const GMLIB_API = {
|
||||
/** 获取物品惩罚等级 @type {function(Item):number} */
|
||||
getItemRepairCost: ll.import("GMLIB_API", "getItemRepairCost"),
|
||||
/** 设置物品惩罚等级 @type {function(Item,number):void} */
|
||||
setItemRepairCost: ll.import("GMLIB_API", "setItemRepairCost")
|
||||
setItemRepairCost: ll.import("GMLIB_API", "setItemRepairCost"),
|
||||
/** 获取物品冒险模式下可破坏的方块 @type {function(Item):Array.<string>} */
|
||||
getItemCanDestroy: ll.import("GMLIB_API", "getItemCanDestroy"),
|
||||
/** 设置物品冒险模式下可破坏的方块 @type {function(Item,Array.<string>):void} */
|
||||
setItemCanDestroy: ll.import("GMLIB_API", "setItemCanDestroy"),
|
||||
/** 获取物品冒险模式下能放置在什么方块上 @type {function(Item):Array.<string>} */
|
||||
getItemCanPlaceOn: ll.import("GMLIB_API", "getItemCanPlaceOn"),
|
||||
/** 设置物品冒险模式下能放置在什么方块上 @type {function(Item,Array.<string>):void} */
|
||||
setItemCanPlaceOn: ll.import("GMLIB_API", "setItemCanPlaceOn")
|
||||
}
|
||||
|
||||
/** 静态悬浮字类列表 @type {Map<number,StaticFloatingText>} */
|
||||
@@ -2301,6 +2309,42 @@ LLSE_Item.prototype.setRepairCost =
|
||||
return GMLIB_API.setItemRepairCost(this, cost);
|
||||
}
|
||||
|
||||
LLSE_Item.prototype.getCanDestroy =
|
||||
/**
|
||||
* 获取冒险模式下能破坏的方块
|
||||
* @returns {Array.<string>} 能破坏的方块
|
||||
*/
|
||||
function () {
|
||||
return GMLIB_API.getItemCanDestroy(this);
|
||||
}
|
||||
|
||||
LLSE_Item.prototype.setCanDestroy =
|
||||
/**
|
||||
* 设置冒险模式下能破坏的方块
|
||||
* @param {Array.<string>} blocks 能破坏的方块
|
||||
*/
|
||||
function (blocks) {
|
||||
GMLIB_API.setItemCanDestroy(this, blocks);
|
||||
}
|
||||
|
||||
LLSE_Item.prototype.getCanPlaceOn =
|
||||
/**
|
||||
* 获取冒险模式下能放置在什么方块上
|
||||
* @returns {Array.<string>} 能放置的方块
|
||||
*/
|
||||
function () {
|
||||
return GMLIB_API.getItemCanPlaceOn(this);
|
||||
}
|
||||
|
||||
LLSE_Item.prototype.setCanPlaceOn =
|
||||
/**
|
||||
* 设置冒险模式下能放置在什么方块上
|
||||
* @param {Array.<string>} blocks 能放置的方块
|
||||
*/
|
||||
function (blocks) {
|
||||
GMLIB_API.setItemCanPlaceOn(this, blocks);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
StaticFloatingText,
|
||||
DynamicFloatingText,
|
||||
|
||||
Reference in New Issue
Block a user