User:Kythyria/Sandbox

Proposal for navboxes
So, assuming we want to produce the following navbox:

My first proposal is something that will interpret the following module: local p = {}

p.navbox = { title = "Redpower 2", {       title = "Resources", {           title = "Raw", "",           "",        }        {            title = "Metal/Gems", {               title="Ingots", "",               "",                ""            },            {                title="Nuggets", "",               ""            }        }    },    {        title="Machines", {           title="tubes", "",           "",            "",            ""        }    } }

return p Proposal two is similar, but this might be nicer in the common case: local p = {}

p.navbox = function(ni, l) return { title = "Redpower 2", mod = "RP2" {       title = "Resources", {           title = "Raw", ni{"Marble", "Marble (RedPower 2)", "Marble"}, ni{"Basalt", "Basalt (RedPower 2)","Basalt"}, }       {            title = "Metal/Gems", {               title="Ingots", ni{"Copper Ingot", "Copper", "Copper Ingot"}, ni{"Tin Ingot", "Tin", "Tin Ingot"}, ni{"Silver Ingot", "Silver", "Silver Ingot"}, },           {                title="Nuggets", ni{"Tin Nugget", "Tin", "Tin Nugget"}, ni{"Iron Nugget", "Iron Nugget (RedPower 2)", "Iron Nugget"}, }       }    },    {        title="Machines", {           title="tubes", ni{"Pneumatic Tube"}, ni{"Restriction Tube"}, ni{"Magtube"}, ni{"Fluid Pipe", mod="RP2" "Fluid Pipe (RedPower 2)", "Fluid Pipe"} }   } } end

return p