Editing Module:ItemListDebug
From Fallen London Wiki (Staging)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 455: | Line 455: | ||
The returned list contains item detail tables as described in the top-level documentation for this module. | The returned list contains item detail tables as described in the top-level documentation for this module. | ||
]] | ]] | ||
− | local function smw_fetch_items(header) | + | local function smw_fetch_items(header, effectproperty) |
local extendedResult = mw.smw.getQueryResult(header .. [===[ | local extendedResult = mw.smw.getQueryResult(header .. [===[ | ||
[[!The Imperturbable Patroness]] | [[!The Imperturbable Patroness]] | ||
Line 461: | Line 461: | ||
|?=Item | |?=Item | ||
|?Has icon=Icon | |?Has icon=Icon | ||
− | |? | + | |?]===] .. effectproperty .. [===[#-=Effects |
− | |||
|?Category:Fate Items=Fate | |?Category:Fate Items=Fate | ||
|?-Has renown item=Faction | |?-Has renown item=Faction | ||
Line 508: | Line 507: | ||
local effs = {}; | local effs = {}; | ||
for j, e in ipairs(item.printouts.Effects) do | for j, e in ipairs(item.printouts.Effects) do | ||
− | + | local qual = e["Modifies quality"].item[1].fulltext | |
− | + | local modprop = "Modifies by" | |
− | + | if menace[qual] then | |
− | effs[ | + | modprop = "Modifies gain by" |
+ | end | ||
+ | effs[qual] = e[modprop].item[1]; | ||
end | end | ||
local icon | local icon | ||
Line 545: | Line 546: | ||
end | end | ||
if other then header = header .. other end | if other then header = header .. other end | ||
− | return smw_fetch_items(header); | + | return smw_fetch_items(header, effectproperty); |
end | end | ||