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

На главную


device.GetTransport( usableDeviceId )

Возвращает id транспорта(корабля), на котором расположено используемое устройство.

Если устройство не найдено или не является UsableDevice, то бросается исключение и возвращается nil.

Если устройство не находится на корабле, то возвращается nil без каких-либо ошибок.

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

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

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

-- возвращаемые значения -
ObjectId (or nil) -- идентификатор транспорта


-- пример:
local transportId = device.GetTransport( usableDeviceId )
if transportId then
  local health = transport.GetHealth( transportId )
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

На главную