Module:ItemData/nav: Difference between revisions

Sur (talk | contribs)
m get_slot_color now automatically prefixes the hex with #
Sur (talk | contribs)
m checks for IsDisabled instead of Disabled as it was renamed on GH
Line 34: Line 34:
for item_key, item_data in pairs(items_data) do
for item_key, item_data in pairs(items_data) do
--future proofing; Disabled will be renamed to IsDisabled soon
--future proofing; Disabled will be renamed to IsDisabled soon
if item_data['Disabled'] == nil and item_data['IsDisabled'] ~= nil then
return "REMINDER: 'Disabled' was renamed to 'IsDisabled'"
end
local this_cost = tonumber(item_data["Cost"])
local this_cost = tonumber(item_data["Cost"])
local this_slot = item_data["Slot"]
local this_slot = item_data["Slot"]
if item_data["Name"] ~= nil and item_data["Disabled"] == false and this_cost ~= nil and this_slot ~= nil then
if item_data["Name"] ~= nil and item_data["IsDisabled"] == false and this_cost ~= nil and this_slot ~= nil then
if slot == this_slot and this_cost>=min_souls and this_cost<max_souls then
if slot == this_slot and this_cost>=min_souls and this_cost<max_souls then
table.insert(items, lang_module.get_string(item_key))
table.insert(items, lang_module.get_string(item_key))