Module:ManualDescriptions: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
-- Module: | -- Module:ManualDescriptions | ||
-- Create this as a MediaWiki page that contributors can edit directly | -- Create this as a MediaWiki page that contributors can edit directly | ||
local p = {} | local p = {} | ||
Line 27: | Line 27: | ||
end | end | ||
return string.format("''No description available for %s. Please edit [[Module: | 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:19, 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 = {
["BronzeSword"] = {
description = "A basic bronze weapon perfect for new warriors starting their adventure.",
contributor = "Steve",
date_updated = "2025-01-15"
},
["IronOre"] = {
description = "Raw iron that can be smelted into useful bars for smithing.",
contributor = "Steve",
date_updated = "2025-01-14"
}
-- Contributors add new items here by editing this page
}
function p.getDescription(frame)
local itemName = frame.args[1] or ""
local item = descriptions[itemName]
if item then
return string.format('%s <small>(Updated by [[User:%s|%s]] on %s)</small>',
item.description, item.contributor, item.contributor, item.date_updated)
end
return string.format("''No description available for %s. Please edit [[Module:ManualDescriptions]] to add one.''", itemName)
end
return p