<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://story.dsserv.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AStructure</id>
	<title>Module:Structure - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://story.dsserv.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AStructure"/>
	<link rel="alternate" type="text/html" href="https://story.dsserv.net/index.php?title=Module:Structure&amp;action=history"/>
	<updated>2026-05-06T15:04:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://story.dsserv.net/index.php?title=Module:Structure&amp;diff=41&amp;oldid=prev</id>
		<title>Dubhghlas: Created page with &quot;-- Module:Structure -- Provides enhanced functionality for structure infoboxes  local p = {}  -- Main entry point for the module function p.infobox(frame)     local args = frame.args          -- If called via #invoke, get the args from the parent frame     if not args or not args[1] then         args = frame:getParent().args     end          -- Initialize HTML output     local html = mw.html.create()          -- Create the main infobox container     local infobox = html:...&quot;</title>
		<link rel="alternate" type="text/html" href="https://story.dsserv.net/index.php?title=Module:Structure&amp;diff=41&amp;oldid=prev"/>
		<updated>2025-05-04T13:21:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Module:Structure -- Provides enhanced functionality for structure infoboxes  local p = {}  -- Main entry point for the module function p.infobox(frame)     local args = frame.args          -- If called via #invoke, get the args from the parent frame     if not args or not args[1] then         args = frame:getParent().args     end          -- Initialize HTML output     local html = mw.html.create()          -- Create the main infobox container     local infobox = html:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:Structure&lt;br /&gt;
-- Provides enhanced functionality for structure infoboxes&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Main entry point for the module&lt;br /&gt;
function p.infobox(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Initialize HTML output&lt;br /&gt;
    local html = mw.html.create()&lt;br /&gt;
    &lt;br /&gt;
    -- Create the main infobox container&lt;br /&gt;
    local infobox = html:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;infoboxFrame&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- Add the title&lt;br /&gt;
    local name = args.name or &amp;#039;Structure Name&amp;#039;&lt;br /&gt;
    local color = args.color or &amp;#039;#a2b0c6&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;infoboxHeadTitle&amp;#039;)&lt;br /&gt;
        :css(&amp;#039;background-color&amp;#039;, color)&lt;br /&gt;
        :wikitext(name)&lt;br /&gt;
    &lt;br /&gt;
    -- Add image if provided&lt;br /&gt;
    if args.image then&lt;br /&gt;
        local imageDiv = infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxImage&amp;#039;)&lt;br /&gt;
        &lt;br /&gt;
        imageDiv:wikitext(string.format(&amp;#039;[[File:%s|300px|%s]]&amp;#039;, args.image, name))&lt;br /&gt;
        &lt;br /&gt;
        if args.caption then&lt;br /&gt;
            imageDiv:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxCaption&amp;#039;)&lt;br /&gt;
                :wikitext(args.caption)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Function to add a simple row&lt;br /&gt;
    local function addRow(label, value)&lt;br /&gt;
        if value and value ~= &amp;#039;&amp;#039; then&lt;br /&gt;
            local row = infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxRow&amp;#039;)&lt;br /&gt;
            &lt;br /&gt;
            row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxLabel&amp;#039;)&lt;br /&gt;
                :wikitext(label)&lt;br /&gt;
            &lt;br /&gt;
            row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxData&amp;#039;)&lt;br /&gt;
                :wikitext(value)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Function to add a section header&lt;br /&gt;
    local function addSection(title)&lt;br /&gt;
        infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxSubheader&amp;#039;)&lt;br /&gt;
            :wikitext(title)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- General Information&lt;br /&gt;
    addSection(&amp;#039;General Information&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Location&amp;#039;, args.location)&lt;br /&gt;
    addRow(&amp;#039;Coordinates&amp;#039;, args.coordinates)&lt;br /&gt;
    addRow(&amp;#039;Status&amp;#039;, args.status)&lt;br /&gt;
    addRow(&amp;#039;Owner&amp;#039;, args.owner)&lt;br /&gt;
    addRow(&amp;#039;Governing Body&amp;#039;, args.governing_body)&lt;br /&gt;
    addRow(&amp;#039;Primary Function&amp;#039;, args.primary_function)&lt;br /&gt;
    addRow(&amp;#039;Established&amp;#039;, args.inception)&lt;br /&gt;
    addRow(&amp;#039;Age&amp;#039;, args.age)&lt;br /&gt;
    addRow(&amp;#039;Public Access&amp;#039;, args.open_to_public)&lt;br /&gt;
    &lt;br /&gt;
    -- Architectural Information&lt;br /&gt;
    if args.architect or args.architectural_style or args.material then&lt;br /&gt;
        addSection(&amp;#039;Architecture&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Architect&amp;#039;, args.architect)&lt;br /&gt;
        addRow(&amp;#039;Style&amp;#039;, args.architectural_style)&lt;br /&gt;
        addRow(&amp;#039;Material&amp;#039;, args.material)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Physical Characteristics&lt;br /&gt;
    if args.height or args.width or args.length or args.area or args.floors then&lt;br /&gt;
        addSection(&amp;#039;Dimensions&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Height&amp;#039;, args.height)&lt;br /&gt;
        addRow(&amp;#039;Width&amp;#039;, args.width)&lt;br /&gt;
        addRow(&amp;#039;Length&amp;#039;, args.length)&lt;br /&gt;
        addRow(&amp;#039;Area&amp;#039;, args.area)&lt;br /&gt;
        addRow(&amp;#039;Floors&amp;#039;, args.floors)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Magical Properties&lt;br /&gt;
    if args.magical_properties or args.ley_lines or args.enchantments then&lt;br /&gt;
        addSection(&amp;#039;Magical Properties&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Magic&amp;#039;, args.magical_properties)&lt;br /&gt;
        addRow(&amp;#039;Ley Lines&amp;#039;, args.ley_lines)&lt;br /&gt;
        addRow(&amp;#039;Enchantments&amp;#039;, args.enchantments)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Historical Information&lt;br /&gt;
    if args.historical_status or args.previous_names or args.significant_events then&lt;br /&gt;
        addSection(&amp;#039;Historical Information&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Historical Status&amp;#039;, args.historical_status)&lt;br /&gt;
        addRow(&amp;#039;Previous Names&amp;#039;, args.previous_names)&lt;br /&gt;
        addRow(&amp;#039;Notable Events&amp;#039;, args.significant_events)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Security Information&lt;br /&gt;
    if args.security_level or args.security_measures or args.guards then&lt;br /&gt;
        addSection(&amp;#039;Security&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Security Level&amp;#039;, args.security_level)&lt;br /&gt;
        addRow(&amp;#039;Security Measures&amp;#039;, args.security_measures)&lt;br /&gt;
        addRow(&amp;#039;Guard Force&amp;#039;, args.guards)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Technological Features&lt;br /&gt;
    if args.tech_level or args.power_source or args.special_systems then&lt;br /&gt;
        addSection(&amp;#039;Technology&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Tech Level&amp;#039;, args.tech_level)&lt;br /&gt;
        addRow(&amp;#039;Power Source&amp;#039;, args.power_source)&lt;br /&gt;
        addRow(&amp;#039;Special Systems&amp;#039;, args.special_systems)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Custom fields&lt;br /&gt;
    if args.custom1name then&lt;br /&gt;
        addRow(args.custom1name, args.custom1value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    if args.custom2name then&lt;br /&gt;
        addRow(args.custom2name, args.custom2value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    if args.custom3name then&lt;br /&gt;
        addRow(args.custom3name, args.custom3value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Return the completed HTML&lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to list structures in the same district&lt;br /&gt;
function p.districtsStructures(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local district = args.district or &amp;#039;&amp;#039;&lt;br /&gt;
    local limit = tonumber(args.limit) or 10&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented&lt;br /&gt;
    -- based on how you organize your wiki categories and structure data&lt;br /&gt;
    &lt;br /&gt;
    local html = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;related-structures&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;=== Notable Structures in &amp;quot; .. district .. &amp;quot; ===\n&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    local list = html:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- This would need to be replaced with actual category or property query&lt;br /&gt;
    -- For now, it just returns a message&lt;br /&gt;
    list:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;This function would list structures in the same district based on your wiki&amp;#039;s data structure.&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to list structures by the same architect&lt;br /&gt;
function p.architectsWorks(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local architect = args.architect or &amp;#039;&amp;#039;&lt;br /&gt;
    local limit = tonumber(args.limit) or 10&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented&lt;br /&gt;
    -- based on how you organize your wiki categories and structure data&lt;br /&gt;
    &lt;br /&gt;
    local html = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;related-structures&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;=== Other Works by &amp;quot; .. architect .. &amp;quot; ===\n&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    local list = html:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- This would need to be replaced with actual category or property query&lt;br /&gt;
    -- For now, it just returns a message&lt;br /&gt;
    list:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;This function would list other structures designed by the same architect based on your wiki&amp;#039;s data structure.&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to find structures with similar magical properties&lt;br /&gt;
function p.similarMagicStructures(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local magicType = args.magic_type or &amp;#039;&amp;#039;&lt;br /&gt;
    local limit = tonumber(args.limit) or 5&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented&lt;br /&gt;
    -- based on how you organize your wiki categories and structure data&lt;br /&gt;
    &lt;br /&gt;
    local html = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;related-structures&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;=== Structures with Similar Magical Properties ===\n&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    local list = html:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- This would need to be replaced with actual category or property query&lt;br /&gt;
    -- For now, it just returns a message&lt;br /&gt;
    list:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;This function would find structures with similar magical properties based on your wiki&amp;#039;s data structure.&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to generate a timeline of a structure&amp;#039;s history&lt;br /&gt;
function p.timeline(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local structure = args.structure or frame:preprocess(&amp;#039;{{PAGENAME}}&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented&lt;br /&gt;
    -- based on how you organize your wiki&amp;#039;s history data&lt;br /&gt;
    &lt;br /&gt;
    local html = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;structure-timeline&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;=== Timeline of &amp;quot; .. structure .. &amp;quot; ===\n&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    -- This would need to be replaced with actual timeline generation code&lt;br /&gt;
    -- For now, it just returns a message&lt;br /&gt;
    html:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
        :wikitext(&amp;quot;This function would generate a timeline of the structure&amp;#039;s history based on your wiki&amp;#039;s data structure.&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Dubhghlas</name></author>
	</entry>
</feed>