Пользовательские дополнения
На главную
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
EventDeviceActiveActionChanged
EventDeviceChanged
EventDeviceCooldownFinished
EventDeviceCooldownsEnableChanged
EventDeviceCooldownStarted
EventDeviceDespawned
EventDeviceHealthChanged
EventDeviceOfflineChanged
EventDeviceOfflineReason
EventDevicesChanged
EventDeviceSpawned
EventDeviceZeroSpeed
EventNavigationScanerHubPveInfo
EventNavigationScanerHubPvpInfo
EventNavigationScanerHubStarted
EventNavigationScanerHubTrailsInfo
EventNavigatorFollowedChanged
EventShieldStrengthChanged
EventUsableDeviceDespawned
EventUsableDevicesChanged
EventUsableDeviceSpawned
FunctionAvatarGetActiveUsableDeviceInfo
FunctionDeviceCanUse
FunctionDeviceGetCannonTarget
FunctionDeviceGetCooldown
FunctionDeviceGetHealth
FunctionDeviceGetMass
FunctionDeviceGetScanerHubInfo
FunctionDeviceGetScanerPvEInfo
FunctionDeviceGetScanerPvPInfo
FunctionDeviceGetScanerTrailInfo
FunctionDeviceGetScanerTrails
FunctionDeviceGetShieldStrength
FunctionDeviceGetShipSlotInfo
FunctionDeviceGetTitle
FunctionDeviceGetTransport
FunctionDeviceGetUsableDeviceType
FunctionDeviceHasNavigatorFollowedMarker
FunctionDeviceIsInUse
FunctionDeviceIsOffline
FunctionDeviceIsScanerScanning
FunctionDeviceIsUsable
FunctionDeviceNavigatorZoomIn
FunctionDeviceNavigatorZoomOut
FunctionDeviceSetScanerDestinationDevice
FunctionDeviceSetScanerDestinationTrail
FunctionTransportGetAbordageCooldown
FunctionTransportGetAbordageInfo
FunctionTransportGetDevices
CategoryLuaApi
CategoryFunction
CategoryDevice
На главную