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

На главную


device.GetShipSlotInfo( deviceId )

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

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

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

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

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

-- возвращаемые значения -
table or nil: таблица с полями:
 interfaceSlot: number (int) - индекс слота при показе устройства в интерфейсе
 side: number(enum SHIP_SIDE_...) - сторона корабля

-- пример:
local slotInfo = device.GetShipSlotInfo( deviceId )
if slotInfo then
  local slotIndex = slotInfo.interfaceSlot
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

На главную