Module:ManualDescriptions: Difference between revisions

From August Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
-- Module:ItemDescriptions
-- 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 5: Line 5:
-- Editable data table - contributors modify this directly
-- Editable data table - contributors modify this directly
local descriptions = {
local descriptions = {
     ["BronzeSword"] = {
     ["Dragonite ore"] = "'''Dragonite ore''' is a rare ore used to create [[Dragonite bar]]s.",
        description = "A basic bronze weapon perfect for new warriors starting their adventure.",
["Luminite ore"] = "'''Luminite ore''' can be crushed using a hammer, chisel, or pestle and mortar, to be turned into [[Luminite flux]], a stackable smelting catalyst used to make high tier bars for [[Smithing]].<br>'''Luminite ore''' can also be crushed into flux by using it on Nurmof at [[Home]], costing [[Skilling token]]s and rewarding no experience. <br><br>In addition to the below drop sources, '''Luminite ore''' can also be mined in donator mining zones at Home, in the mining guild, and south of the Barrows.",
        contributor = "Steve",
["Skilling token"] ="[[Skilling token|Skilling tokens]] are a currency dropped by performing skilling actions in August. Skilling tokens can be spent at the [[Skilling Token Store]] for various upgrades and rewards. <br><br>Skilling tokens are tradeable."
        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)
function p.getDescription(frame)
     local itemName = frame.args[1] or ""
     local itemName = frame.args[1] or ""
     local item = descriptions[itemName]
     local description = descriptions[itemName]
      
      
     if item then
     if description then
         return string.format('%s <small>(Updated by [[User:%s|%s]] on %s)</small>',
         return description
                          item.description, item.contributor, item.contributor, item.date_updated)
     end
     end
      
      
     return string.format("''No description available for %s. Please edit [[Module:ItemDescriptions]] to add one.''", itemName)
     return string.format("''No description available for %s. Please edit [[Module:ManualDescriptions]] to add one.''", itemName)
end
end


return p
return p

Latest revision as of 07: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.",
	["Luminite ore"] = "'''Luminite ore''' can be crushed using a hammer, chisel, or pestle and mortar, to be turned into [[Luminite flux]], a stackable smelting catalyst used to make high tier bars for [[Smithing]].<br>'''Luminite ore''' can also be crushed into flux by using it on Nurmof at [[Home]], costing [[Skilling token]]s and rewarding no experience. <br><br>In addition to the below drop sources, '''Luminite ore''' can also be mined in donator mining zones at Home, in the mining guild, and south of the Barrows.",
	["Skilling token"] ="[[Skilling token|Skilling tokens]] are a currency dropped by performing skilling actions in August. Skilling tokens can be spent at the [[Skilling Token Store]] for various upgrades and rewards. <br><br>Skilling tokens are tradeable."
}

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