Module:ItemData/nav: Difference between revisionsGive feedback
Fixed sorting for the Souls column in the Active Items table. |
Filtered out items with no cost in the active items table. |
||
| Line 167: | Line 167: | ||
-- 1. Collect active items and their cost | -- 1. Collect active items and their cost | ||
for item_key, item_data in pairs(items_data) do | for item_key, item_data in pairs(items_data) do | ||
-- Convert cost to a number; will be nil if the JSON value is null or missing | |||
local cost = tonumber(item_data["Cost"]) | |||
if item_data["Name"] and | if item_data["Name"] and | ||
item_data["IsDisabled"] == false and | item_data["IsDisabled"] == false and | ||
cost ~= nil and cost > 0 and -- FILTER: Must have a cost greater than 0 | |||
item_data["Activation"] and | item_data["Activation"] and | ||
item_data["Activation"] ~= "Passive" then | item_data["Activation"] ~= "Passive" then | ||
| Line 175: | Line 179: | ||
name = item_data["Name"], | name = item_data["Name"], | ||
key = item_key, | key = item_key, | ||
cost = | cost = cost, | ||
slot = item_data["Slot"] or "Weapon", | slot = item_data["Slot"] or "Weapon", | ||
has_active_desc = item_data["ActiveDescription"] ~= nil | has_active_desc = item_data["ActiveDescription"] ~= nil | ||