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

На главную


hangar.GetAllowedDeviceTypes()

Возвращает список список устройств имеющихся в ангаре, доступных для покупки в режиме просмотра. Возможно получить только после разговора с НПС в ангаре

Типы устройств: USDEV_...

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

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

-- параметры:
нет

-- возвращаемые значения -
table of table - индексированный с 0 список типов устройств для продажи, каждый элемент - описание одного типа. Таблица с полями:
  type: number (enum USDEV_...) - тип используемого устройства
  soldDevices: table - индексированный с 0 список устройств этого типа, доступных для покупки. Таблица с полями:
    deviceId: ObjectId - идентификатор устройства
    currencyId: CurrencyId or nil - идентификатор альтернативной валюты, если стоимость выражена в ней/ Иначе стоимость выражена в деньгах
    amount: number (integer) - стоимость устройства в валюте, если есть currencyId, или в меди (деньгах), если currencyId = nil

-- пример:
local devicesTypes = hangar.GetAllowedDeviceTypes()
for i, devicesType in pairs( devicesTypes ) do
  for j, device in pairs( devicesType.soldDevices ) do
    local deviceInfo = hangar.GetDeviceInfo( device.deviceId )
    local deviceMoney = device.currencyId and 0 or device.amount
  end
end

Search: "CategoryLuaApi" "CategoryHangar"

EnumCannonVisualType
EnumShipInfoMarker
EventHangarActiveHullChanged
EventHangarActiveShipChanged
EventHangarActiveShipHullsChanged
EventHangarActiveShipSkinsChanged
EventHangarActiveSkinChanged
EventHangarDevicesReceived
EventHangarRepairQuestion
EventHangarShipsChanged
EventHangarSlotDevicesReceived
EventHangarSpellChanged
EventHangarSpellEffect
EventShipCustomizationChanged
EventShipCustomizationFinished
EventShipCustomizationStarted
EventTransportRenameReply
EventTransportRenameReplyResult
FunctionHangarApplyCustomization
FunctionHangarCanCustomize
FunctionHangarCanLendShip
FunctionHangarCanRemoveDevice
FunctionHangarChangeSlotCustomization
FunctionHangarGetActiveShip
FunctionHangarGetActiveShipHull
FunctionHangarGetActiveShipSkin
FunctionHangarGetAllowedDeviceTypes
FunctionHangarGetAvailableHulls
FunctionHangarGetAvailableSkins
FunctionHangarGetBuildProgress
FunctionHangarGetCustomizationCost
FunctionHangarGetCustomizationCurrency
FunctionHangarGetCustomizationSlotDevices
FunctionHangarGetCustomizationSlotInfo
FunctionHangarGetCustomizationSlots
FunctionHangarGetDeviceInfo
FunctionHangarGetDevices
FunctionHangarGetHullInfo
FunctionHangarGetLendShipSpellId
FunctionHangarGetRandomName
FunctionHangarGetRepairProgress
FunctionHangarGetReturnLendedShipSpellId
FunctionHangarGetShipInfo
FunctionHangarGetShips
FunctionHangarGetSkinInfo
FunctionHangarGetSlotDevices
FunctionHangarGetSummonShipSpellId
FunctionHangarGetSwitchShipMasterHullSpellId
FunctionHangarGetSwitchShipSkinSpellId
FunctionHangarGetTakeAwaySpellId
FunctionHangarGetUnsummonShipSpellId
FunctionHangarLendShip
FunctionHangarPreviewPurchasedDevice
FunctionHangarPurchaseDevice
FunctionHangarRemoveDevice
FunctionHangarRemoveDeviceFromHangar
FunctionHangarRename
FunctionHangarRepairReply
FunctionHangarReplaceDevice
FunctionHangarResetDevicePreview
FunctionHangarRevertCustomization
FunctionHangarSummonShip
FunctionHangarSwitchShipMasterHull
FunctionHangarSwitchShipSkin
FunctionHangarTakeAwayShip
FunctionHangarUnsummonShip
ShipSkinId
VisualShipId


CategoryLuaApi CategoryFunction CategoryHangar

На главную