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

На главную


device.GetShieldStrength( deviceId )

Возвращает силу щита, представленную парой - значение/максимальное значение. Если устройство не найдено или не является щитом, то возвращает nil.

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

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

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

-- возвращаемые значения -
table or nil - таблица, содержащая поля:
  value: number (int) - сила щита
  maxValue: number (int) - максимальная сила щита

-- пример:
local strength = device.GetShieldStrength( deviceId )
if strength then
  LogInfo( strength.value, " / ", strength.maxValue )
end

Search: "CategoryLuaApi" "CategoryDevice"

EnumTurnReason
EnumUsedev
EventCannonShotFinished
EventCannonShotPreparationStarted
EventCannonShotStarted
EventDeviceActionEffectivenessChanged
EventDeviceActiveActionChanged
EventDeviceChanged
EventDeviceCooldownFinished
EventDeviceCooldownsEnableChanged
EventDeviceCooldownStarted
EventDeviceDamageReceived
EventDeviceDeadChanged
EventDeviceDespawned
EventDeviceOfflineChanged
EventDeviceOfflineReason
EventDeviceRelatedQuestsChanged
EventDevicesChanged
EventDeviceSpawned
EventDeviceZeroSpeed
EventNavigationScanerHubPveInfo
EventNavigationScanerHubPvpInfo
EventNavigationScanerHubStarted
EventNavigationScanerHubTrailsInfo
EventNavigatorFollowedChanged
EventNavigatorTargetChestsChanged
EventShieldRegenInProgressChanged
EventShieldStrengthChanged
EventUsableDeviceDespawned
EventUsableDevicesChanged
EventUsableDeviceSpawned
FunctionAvatarGetActiveUsableDeviceInfo
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

На главную