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

На главную


device.GetCooldown( deviceId, actionIndex )

Возвращает информацию о кулдауне одного экшена используемого устройства (например, рули, пушки на корабле). Если устройство не найдено или не является используемым, то возвращает nil.

-- библиотека:
device

-- объявление:
function GetCooldown( deviceId, actionIndex )

-- параметры:
deviceId: ObjectId (not nil) -- идентификатор устройства
actionIndex: number (int) - номер экшена устройства

-- возвращаемые значения -
table or nil - Если устройство найдено, то возвращается таблица информации о кулдауне:
  remainingMs: number( int ) - сколько времени кулдауна осталось в миллисекундах
  durationMs: number( int ) - сколько кулдаун длится в миллисекундах

-- пример:
local cooldown = device.GetCooldown( deviceId, 0 )
if cooldown then
  local remaining = cooldown.remainingMs
  local duration = cooldown.durationMs
end

Search: "CategoryLuaApi" "CategoryDevice"

EnumTurnReason
EnumUsedev
EventCannonShotFinished
EventCannonShotPreparationStarted
EventCannonShotStarted
EventChestLooterChanged
EventDeviceActionEffectivenessChanged
EventDeviceActiveActionChanged
EventDeviceCooldownFinished
EventDeviceCooldownsEnableChanged
EventDeviceCooldownStarted
EventDeviceDamageReceived
EventDeviceDeadChanged
EventDeviceOfflineChanged
EventDeviceOfflineReason
EventDeviceRelatedQuestsChanged
EventDevicesChanged
EventDeviceZeroSpeed
EventNavigationScanerHubPveInfo
EventNavigationScanerHubPvpInfo
EventNavigationScanerHubStarted
EventNavigationScanerHubTrailsInfo
EventNavigatorFollowedChanged
EventNavigatorTargetChestsChanged
EventShieldRegenInProgressChanged
EventShieldStrengthChanged
EventUsableDevicesChanged
FunctionAvatarGetActiveUsableDevice
FunctionAvatarGetUsableDeviceInfo
FunctionDeviceCanUse
FunctionDeviceGetCannonTarget
FunctionDeviceGetCooldown
FunctionDeviceGetItemInstalled
FunctionDeviceGetMass
FunctionDeviceGetNavigatorTargetChests
FunctionDeviceGetRelatedQuestObjectives
FunctionDeviceGetScanerHubInfo
FunctionDeviceGetScanerPvEInfo
FunctionDeviceGetScanerPvPInfo
FunctionDeviceGetScanerTrailInfo
FunctionDeviceGetScanerTrails
FunctionDeviceGetShieldStrength
FunctionDeviceGetShipSlotInfo
FunctionDeviceGetTitle
FunctionDeviceGetTransport
FunctionDeviceGetUsableDeviceType
FunctionDeviceHasNavigatorFollowedMarker
FunctionDeviceIsInUse
FunctionDeviceIsOffline
FunctionDeviceIsScanerScanning
FunctionDeviceIsShieldRegenInProgress
FunctionDeviceIsUsable
FunctionDeviceNavigatorGetTarget
FunctionDeviceNavigatorGetZoomedObject
FunctionDeviceNavigatorSetTarget
FunctionDeviceNavigatorZoom
FunctionDeviceSetScanerDestinationDevice
FunctionDeviceSetScanerDestinationTrail
FunctionTransportGetDevices


CategoryLuaApi CategoryFunction CategoryDevice

На главную