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

На главную


craft.DiceCraftState()

Состояние крафтинга.

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

-- объявление:
function DiceCraftState()

-- параметры
нет

-- возвращаемые значения
table или nil - nil, если режим крафтинга не включён; иначе таблица с полями:
  maxLockedDices: number (int) - максимально допустимое количество залоченых костей для одного переброса
  maxRecipeLevel: number (int) - максимально допустимый уровень рецепта
  rerolls: number (int) - базовое количество рероллов
  inGame: boolean - false если мини-игра ещё не началась (в этом состоянии можно использовать, например, craft.DiceCraftPutItem(itemId, slot, count), craft.DiceCraftEmptySlot(slot)); true если идёт мини-игра (можно использовать craft.DiceCraftLockSlot(slot, lock))
  currentDicesNumber: number (int) или nil - число костей в мини-игре; nil если мини-игра ещё не начата
  rerollsLeft: number (int) или nil - число оставшихся рероллов в мини-игре; nil если мини-игра ещё не начата

-- пример использования
local state = craft.DiceCraftState()
if state and state.inGame then
  craft.DiceCraftLockSlot(slot, true)
end

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

На главную