Module:Navbox/AHSW

local Box = {} local Navbox = require('Module:Navbox') local HF = require('Module:HF') local L = require('Module:List')

local data = mw.loadData( 'Module:HF/data' ) local Episodes = data.Episodes local MainCharacters = data.MainCharacters local Cast = data.Cast

function Box.character( frame ) local outer = { name = 'Template:Navbox/Character', title = 'Characters', state = 'expanded', listclass = 'hlist hwrap', bodyclass = 'navbox-footer', evenodd = 'off', image = '', navbar = 'off', group1 = 'Murder House', group2 = 'Asylum', -- group3 = 'Coven', -- group4 = 'Freak Show', --   group5 = 'Hotel' }   local inner_S1 = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Residents', group2 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Murder House Residents'] ) ), list2 = frame.args['S1_Recurring'] or 'Recurring' }   local inner_S2 = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Staff', group2 = 'Inmates', group3 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Briarcliff Staff'] ) ), list2 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Briarcliff Inmates'] ) ), list3 = frame.args['S2_Recurring'] or 'Recurring' }   local inner_S3 = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Main', group2 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Coven'] ) ), list2 = frame.args['S3_Recurring'] or 'Recurring' }   local inner_S4 = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Main', group2 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Freak Show'] ) ), list2 = frame.args['S4_Recurring'] or 'Recurring' }   local inner_S5 = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Main', group2 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Hotel'] ) ), list2 = frame.args['S5_Recurring'] or 'Recurring' }   local inner_S6A = { border = 'subgroup', navbar = 'off', evenodd = 'off', group1 = 'Main', group2 = 'Recurring', list1 = L.makeList( 'horizontal', HF.explode( ';', MainCharacters['Hotel'] ) ), list2 = frame.args['S6A_Recurring'] or 'Recurring' }   outer.list1 = Navbox._navbox( inner_S1 ) outer.list2 = Navbox._navbox( inner_S2 ) -- outer.list3 = Navbox._navbox( inner_S3 ) -- outer.list4 = Navbox._navbox( inner_S4 ) -- outer.list5 = Navbox._navbox( inner_S5 ) return Navbox._navbox(outer) end

function Box.episode( frame ) local outer = { name = "Template:Navbox/Episode", title = "Episodes", state = "expanded", navbar = 'off', image = "", listclass = "hlist mhlist hwrap", evenodd = "off", group1 = "Murder House", group2 = "Asylum", group3 = "Coven", group4 = "Freak Show", group5 = "Hotel", group6 = "Roanoke", navbar = "plain", list1 = L.makeList( "horizontal", HF.explode( ";", Episodes['Murder House'] ) ), list2 = L.makeList( "horizontal", HF.explode( ";", Episodes['Asylum'] ) ), list3 = L.makeList( "horizontal", HF.explode( ";", Episodes['Coven'] ) ), list4 = L.makeList( "horizontal", HF.explode( ";", Episodes['Freak Show'] ) ), list5 = L.makeList( "horizontal", HF.explode( ";", Episodes['Hotel'] ) ), list6 = L.makeList( "horizontal", HF.explode( ";", Episodes['Roanoke'] ) ) }   return Navbox._navbox(outer) end

function Box.cast( frame ) local outer = { name = "Template:Navbox/Cast", title = "Cast", state = "expanded", image = "", listclass = "hlist mhlist hwrap", evenodd = "off", group1 = "Murder House", group2 = "Asylum", group3 = "Coven", group4 = "Freak Show", group5 = "Hotel", group6 = "Roanoke", navbar = "off", list1 = L.makeList( "horizontal", HF.explode( ";", Cast['Murder House'] ) ), list2 = L.makeList( "horizontal", HF.explode( ";", Cast['Asylum'] ) ), list3 = L.makeList( "horizontal", HF.explode( ";", Cast['Coven'] ) ), list4 = L.makeList( "horizontal", HF.explode( ";", Cast['Freak Show'] ) ), list5 = L.makeList( "horizontal", HF.explode( ";", Cast['Hotel'] ) ), list6 = L.makeList( "horizontal", HF.explode( ";", Cast['Roanoke'] ) ) }   return Navbox._navbox(outer) end return Box