Module:AbilityTable/ComplexRenderers: Difference between revisions

Jump to navigation Jump to search
Vergir (talk | contribs)
create AbilityTable/ComplexRenderers submodule with helpers and cell renderers (with help from vergir-bot LLM)
 
Vergir (talk | contribs)
mNo edit summary
Line 1: Line 1:
-- Complex cell renderers for AbilityTable.
-- Complex cell renderers for AbilityTable.
-- Each RenderX function receives an ability record and returns a table of
-- { ["Column Name"] = value } pairs. Notes are appended by the main module.
-- Requires Module:AbilityTable/Lists for prop lists used in some renderers.
local Lists  = require("Module:AbilityTable/Lists")
local Lists  = require("Module:AbilityTable/Lists")
local GameData = require("Module:GameData")
local GameData = require("Module:GameData")
Line 53: Line 49:


-- Returns true if prop exists with a non-zero value anywhere in the record
-- Returns true if prop exists with a non-zero value anywhere in the record
-- excluding the Upgrades key. Thin wrapper over GameData.record_matches_prop.
-- excluding the Upgrades key.
local function is_base_property(record, prop)
local function is_base_property(record, prop)
     for k, v in pairs(record) do
     for k, v in pairs(record) do