a bit more info in the assert

This commit is contained in:
FaceDeer 2020-07-11 12:12:20 -06:00
parent 78f7bf4997
commit cf6af5fc7e

View File

@ -526,7 +526,8 @@ if minetest.get_modpath("doc") then
local currencies = {}
for _, currency_item in ipairs(market_def.currency_ordered) do
local item_def = minetest.registered_items[currency_item.item]
assert(item_def, "Failed to find item definition for " .. currency_item.item)
assert(item_def, "Failed to find item definition for currency item " .. currency_item.item
.. ". Make sure the item has been registered before registering a market that references it as currency.")
table.insert(currencies, S("1 @1 = @2@3", item_def.description, market_def.currency_symbol, currency_item.amount))
end
local inventory_limit