Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetSiegePadBuildData

From RoR Wiki

UI Lua API · RvR functions
Version: WAR 1.4.8

Returns the siege weapons that can be built at the siege pad the player is interacting with.

weapons = GetSiegePadBuildData()

Arguments

None.

Returns

weapons
table – Array of siege weapon tables, indexed from 1, in the format described in GetSiegeWeaponControlData. Empty if the client has no build list.

Details

  • The function reads a list the client stores; it does not check whether the player is still at a siege pad. It always returns a table.
  • The same client bug applies as for GetSiegeWeaponControlData: buildTime and repairTime always equal maxUsers.
  • A new table is built on every call. The stock build window sorts it by name before showing it.

Errors

None.

Example

From default/ea_siegeweaponwindow/source/siegeweaponbuildwindow.lua:

SiegeWeaponBuildWindow.weaponsData = GetSiegePadBuildData()

local showWindow = SiegeWeaponBuildWindow.weaponsData[1] ~= nil
...
table.sort(SiegeWeaponBuildWindow.weaponsData, DataUtils.AlphabetizeByNames)

See also