Пользовательские дополнения
На главную
device.GetShieldStrength( shieldDeviceId )
Возвращает силу щита, представленную парой - значение/максимальное значение. Если устройство не найдено или не является щитом, то бросает исключение и возвращает nil.
-- библиотека:
device
-- объявление:
function GetShieldStrength( shieldDeviceId )
-- параметры:
shieldDeviceId: ObjectId (not nil) -- идентификатор устройства
-- возвращаемые значения -
table or nil - таблица, содержащая поля:
value: number (int) - сила щита
maxValue: number (int) - максимальная сила щита
-- пример:
local strength = device.GetShieldStrength( shieldDeviceId )
if strength then
LogInfo( strength.value, " / ", strength.maxValue )
end
Search: "CategoryLuaApi" "CategoryDevice"
EnumTurnReason
EnumUsedev
EventBeamCannonShotStarted
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
FunctionDeviceCanUse
FunctionDeviceGetCannonTarget
FunctionDeviceGetCooldown
FunctionDeviceGetItemInstalled
FunctionDeviceGetMass
FunctionDeviceGetNavigatorTargetChests
FunctionDeviceGetRelatedQuestObjectives
FunctionDeviceGetShieldStrength
FunctionDeviceGetShipSlotInfo
FunctionDeviceGetTitle
FunctionDeviceGetTransport
FunctionDeviceGetUsableDeviceActionInfo
FunctionDeviceGetUsableDeviceActionsInfo
FunctionDeviceGetUsableDeviceInfo
FunctionDeviceGetUsableDeviceType
FunctionDeviceHasNavigatorFollowedMarker
FunctionDeviceHasRelatedQuestObjectives
FunctionDeviceIsInUse
FunctionDeviceIsOffline
FunctionDeviceIsShieldRegenInProgress
FunctionDeviceIsUsable
FunctionDeviceNavigatorGetTarget
FunctionDeviceNavigatorGetZoomedObject
FunctionDeviceNavigatorSetTarget
FunctionDeviceNavigatorZoom
FunctionTransportGetDevices
CategoryLuaApi
CategoryFunction
CategoryDevice
На главную