Пользовательские дополнения

На главную


craft.DiceCraftRecipeIsSameItem( recipeItemId, inventoryItemId )

Определяет тот ли это предмет, что может быть использован в рецепте DiceCraft-механики. Работает как с обычными преметами, так и с джокерами.

-- библиотека
craft

-- объявление:
function DiceCraftRecipeIsSameItem( recipeItemId, inventoryItemId )

-- параметры
recipeItemId: ObjectId - id итема из описания рецепта
inventoryItemId: ObjectId - id итема (например из сумки), который предполагается использовать при крафтинге по рецепту

-- возвращаемые значения
boolean - true если предмет, чей id указан вторым, может быть использован в рецепте на месте предмета, чей id указан первым

-- пример использования
if craft.DiceCraftRecipeIsSameItem( recipeItemId, inventoryItemId ) then
  UseItem( inventoryItemId )
end

См. также craft.DiceCraftIsJoker( itemId ).

См. также

Search: "CategoryLuaApi" "CategoryCraft"

CategoryCraft
EnumDiceCraftCmdType
EventDiceCraftCanceled
EventDiceCraftCmdFailed
EventDiceCraftFinished
EventDiceCraftNotEnoughComponents
EventDiceCraftPrepared
EventDiceCraftRecipesChanged
EventDiceCraftScoreChanged
EventDiceCraftSlotChanged
EventDiceCraftStatusChanged
EventReforgeResult
EventReforgeResultFail
EventReforgeResultReady
FunctionAvatarGetRecipeAfflatusItem
FunctionAvatarGetRecipeInfo
FunctionCraftDiceCraftEmptySlot
FunctionCraftDiceCraftGetCurrentDices
FunctionCraftDiceCraftGetCurrentRecipe
FunctionCraftDiceCraftGetDiceValues
FunctionCraftDiceCraftGetInspirationLevels
FunctionCraftDiceCraftGetInspiredRecipes
FunctionCraftDiceCraftGetLockedSlots
FunctionCraftDiceCraftGetPlacedItems
FunctionCraftDiceCraftGetRecipeInspiration
FunctionCraftDiceCraftGetRecipes
FunctionCraftDiceCraftIsJoker
FunctionCraftDiceCraftPutItem
FunctionCraftDiceCraftRecipeIsSameItem
FunctionCraftDiceCraftState
FunctionCraftDiceCraftUseInspiration
FunctionCraftFinishReforge
FunctionCraftGetDiceCraftRecipeResults
FunctionCraftGetForgeComponent
FunctionCraftGetForgeRecipe
FunctionCraftGetForgeRecipeInfo
FunctionCraftGetForgeRecipes
FunctionCraftGetGoldenSlotsForgeRecipes
FunctionCraftGetGoldenSlotsForgeTiersOrder
FunctionCraftGetItemSlotsCount
FunctionCraftGetReforgeComponent
FunctionCraftGetReforgeInfo
FunctionCraftGetReforgeRecipe
FunctionCraftGetReforgeVariants
FunctionCraftIncreaseQualification
FunctionCraftMakeForge
FunctionCraftMakeReforge
FunctionCraftPutForgeComponent
FunctionCraftPutReforgeComponent
FunctionCraftSetForgeRecipe
FunctionCraftSetReforgeRecipe


CategoryLuaApi CategoryFunction CategoryCraft

На главную