Module:ManualDescriptions: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 1: | Line 1: | ||
-- Module:ManualDescriptions | -- Module:ManualDescriptions | ||
-- Create this as a MediaWiki page that contributors can edit directly | |||
local p = {} | local p = {} | ||
-- | -- Editable data table - contributors modify this directly | ||
local descriptions = { | |||
["Dragonite ore"] = "'''Dragonite ore''' is a rare ore used to create [[Dragonite bar]]s." | |||
-- Contributors add new items here by editing this page | |||
} | |||
function p.getDescription(frame) | function p.getDescription(frame) | ||
local itemName = frame.args[1] or "" | local itemName = frame.args[1] or "" | ||
local description = descriptions[itemName] | |||
if description then | if description then | ||
return description | return description | ||
end | end | ||
return string.format("''No description available for %s. Please edit [[ | return string.format("''No description available for %s. Please edit [[Module:ManualDescriptions]] to add one.''", itemName) | ||
end | end | ||
return p | return p |
Revision as of 06:38, 16 August 2025
Documentation for this module may be created at Module:ManualDescriptions/doc
-- Module:ManualDescriptions
-- Create this as a MediaWiki page that contributors can edit directly
local p = {}
-- Editable data table - contributors modify this directly
local descriptions = {
["Dragonite ore"] = "'''Dragonite ore''' is a rare ore used to create [[Dragonite bar]]s."
-- Contributors add new items here by editing this page
}
function p.getDescription(frame)
local itemName = frame.args[1] or ""
local description = descriptions[itemName]
if description then
return description
end
return string.format("''No description available for %s. Please edit [[Module:ManualDescriptions]] to add one.''", itemName)
end
return p