From CloudModding OoT Wiki

Documentation for this module may be created at Module:Files/Scenes/doc

local descriptions = require( "Module:Files/Descriptions" )
local p ={}
local t =
{
[0]="ydan_scene",
[1]="ddan_scene",
[2]="bdan_scene",
[3]="Bmori1_scene",
[4]="HIDAN_scene",
[5]="MIZUsin_scene",
[6]="jyasinzou_scene",
[7]="HAKAdan_scene",
[8]="HAKAdanCH_scene",
[9]="ice_doukutu_scene",
[10]="ganon_scene",
[11]="men_scene",
[12]="gerudoway_scene",
[13]="ganontika_scene",
[14]="ganon_sonogo_scene",
[15]="ganontikasonogo_scene",
[16]="takaraya_scene",
[17]="ydan_boss_scene",
[18]="ddan_boss_scene",
[19]="bdan_boss_scene",
[20]="moribossroom_scene",
[21]="FIRE_bs_scene",
[22]="MIZUsin_bs_scene",
[23]="jyasinboss_scene",
[24]="HAKAdan_bs_scene",
[25]="ganon_boss_scene",
[26]="ganon_final_scene",
[27]="entra_scene",
[28]="entra_n_scene",
[29]="enrui_scene",
[30]="market_alley_scene",
[31]="market_alley_n_scene",
[32]="market_day_scene",
[33]="market_night_scene",
[34]="market_ruins_scene",
[35]="shrine_scene",
[36]="shrine_n_scene",
[37]="shrine_r_scene",
[38]="kokiri_home_scene",
[39]="kokiri_home3_scene",
[40]="kokiri_home4_scene",
[41]="kokiri_home5_scene",
[42]="kakariko_scene",
[43]="kakariko3_scene",
[44]="shop1_scene",
[45]="kokiri_shop_scene",
[46]="golon_scene",
[47]="zoora_scene",
[48]="drag_scene",
[49]="alley_shop_scene",
[50]="night_shop_scene",
[51]="face_shop_scene",
[52]="link_home_scene",
[53]="impa_scene",
[54]="malon_stable_scene",
[55]="labo_scene",
[56]="hylia_labo_scene",
[57]="tent_scene",
[58]="hut_scene",
[59]="daiyousei_izumi_scene",
[60]="yousei_izumi_tate_scene",
[61]="yousei_izumi_yoko_scene",
[62]="kakusiana_scene",
[63]="hakaana_scene",
[64]="hakaana2_scene",
[65]="hakaana_ouke_scene",
[66]="syatekijyou_scene",
[67]="tokinoma_scene",
[68]="kenjyanoma_scene",
[69]="hairal_niwa_scene",
[70]="hairal_niwa_n_scene",
[71]="hiral_demo_scene",
[72]="hakasitarelay_scene",
[73]="turibori_scene",
[74]="nakaniwa_scene",
[75]="bowling_scene",
[76]="souko_scene",
[77]="miharigoya_scene",
[78]="mahouya_scene",
[79]="ganon_demo_scene",
[80]="kinsuta_scene",
[81]="spot00_scene",
[82]="spot01_scene",
[83]="spot02_scene",
[84]="spot03_scene",
[85]="spot04_scene",
[86]="spot05_scene",
[87]="spot06_scene",
[88]="spot07_scene",
[89]="spot08_scene",
[90]="spot09_scene",
[91]="spot10_scene",
[92]="spot11_scene",
[93]="spot12_scene",
[94]="spot13_scene",
[95]="spot15_scene",
[96]="spot16_scene",
[97]="spot17_scene",
[98]="spot18_scene",
[99]="spot20_scene",
[100]="ganon_tou_scene",
[101]="test01_scene",
[102]="besitu_scene",
[103]="depth_test_scene",
[104]="syotes_scene",
[105]="syotes2_scene",
[106]="sutaru_scene",
[107]="hairal_niwa2_scene",
[108]="sasatest_scene",
[109]="testroom_scene",
-- reverse ref
ydan_scene={Id=0,Name="ydan",Card="g_pn_06",Rooms=12 },
ddan_scene={Id=1,Name="ddan",Card="g_pn_08",Rooms=17 },
bdan_scene={Id=2,Name="bdan",Card="g_pn_07",Rooms=16 },
Bmori1_scene={Id=3,Name="Bmori1",Card="g_pn_01",Rooms=23 },
HIDAN_scene={Id=4,Name="HIDAN",Card="g_pn_03",Rooms=27 },
MIZUsin_scene={Id=5,Name="MIZUsin",Card="g_pn_04",Rooms=23 },
jyasinzou_scene={Id=6,Name="jyasinzou",Card="g_pn_05",Rooms=29 },
HAKAdan_scene={Id=7,Name="HAKAdan",Card="g_pn_02",Rooms=23 },
HAKAdanCH_scene={Id=8,Name="HAKAdanCH",Card="g_pn_54",Rooms=7 },
ice_doukutu_scene={Id=9,Name="ice_doukutu",Card="g_pn_10",Rooms=12 },
ganon_scene={Id=10,Name="ganon",Card=null,Rooms=10 },
men_scene={Id=11,Name="men",Card="g_pn_11",Rooms=11 },
gerudoway_scene={Id=12,Name="gerudoway",Card="g_pn_49",Rooms=6 },
ganontika_scene={Id=13,Name="ganontika",Card="g_pn_09",Rooms=20 },
ganon_sonogo_scene={Id=14,Name="ganon_sonogo",Card=null,Rooms=5 },
ganontikasonogo_scene={Id=15,Name="ganontikasonogo",Card=null,Rooms=2 },
takaraya_scene={Id=16,Name="takaraya",Card="g_pn_51",Rooms=7 },
ydan_boss_scene={Id=17,Name="ydan_boss",Card=null,Rooms=2 },
ddan_boss_scene={Id=18,Name="ddan_boss",Card=null,Rooms=2 },
bdan_boss_scene={Id=19,Name="bdan_boss",Card=null,Rooms=2 },
moribossroom_scene={Id=20,Name="moribossroom",Card=null,Rooms=2 },
FIRE_bs_scene={Id=21,Name="FIRE_bs",Card=null,Rooms=2 },
MIZUsin_bs_scene={Id=22,Name="MIZUsin_bs",Card=null,Rooms=2 },
jyasinboss_scene={Id=23,Name="jyasinboss",Card=null,Rooms=4 },
HAKAdan_bs_scene={Id=24,Name="HAKAdan_bs",Card=null,Rooms=2 },
ganon_boss_scene={Id=25,Name="ganon_boss",Card=null,Rooms=1 },
ganon_final_scene={Id=26,Name="ganon_final",Card=null,Rooms=1 },
entra_scene={Id=27,Name="entra",Card=null,Rooms=1 },
entra_n_scene={Id=28,Name="entra_n",Card=null,Rooms=1 },
enrui_scene={Id=29,Name="enrui",Card=null,Rooms=1 },
market_alley_scene={Id=30,Name="market_alley",Card="g_pn_18",Rooms=1 },
market_alley_n_scene={Id=31,Name="market_alley_n",Card="g_pn_18",Rooms=1 },
market_day_scene={Id=32,Name="market_day",Card="g_pn_17",Rooms=1 },
market_night_scene={Id=33,Name="market_night",Card="g_pn_17",Rooms=1 },
market_ruins_scene={Id=34,Name="market_ruins",Card="g_pn_17",Rooms=1 },
shrine_scene={Id=35,Name="shrine",Card=null,Rooms=1 },
shrine_n_scene={Id=36,Name="shrine_n",Card=null,Rooms=1 },
shrine_r_scene={Id=37,Name="shrine_r",Card=null,Rooms=1 },
kokiri_home_scene={Id=38,Name="kokiri_home",Card=null,Rooms=1 },
kokiri_home3_scene={Id=39,Name="kokiri_home3",Card=null,Rooms=1 },
kokiri_home4_scene={Id=40,Name="kokiri_home4",Card=null,Rooms=1 },
kokiri_home5_scene={Id=41,Name="kokiri_home5",Card=null,Rooms=1 },
kakariko_scene={Id=42,Name="kakariko",Card=null,Rooms=1 },
kakariko3_scene={Id=43,Name="kakariko3",Card=null,Rooms=1 },
shop1_scene={Id=44,Name="shop1",Card="g_pn_23",Rooms=1 },
kokiri_shop_scene={Id=45,Name="kokiri_shop",Card="g_pn_19",Rooms=1 },
golon_scene={Id=46,Name="golon",Card="g_pn_20",Rooms=1 },
zoora_scene={Id=47,Name="zoora",Card="g_pn_21",Rooms=1 },
drag_scene={Id=48,Name="drag",Card="g_pn_24",Rooms=1 },
alley_shop_scene={Id=49,Name="alley_shop",Card="g_pn_24",Rooms=1 },
night_shop_scene={Id=50,Name="night_shop",Card="g_pn_56",Rooms=1 },
face_shop_scene={Id=51,Name="face_shop",Card="g_pn_50",Rooms=1 },
link_home_scene={Id=52,Name="link_home",Card=null,Rooms=1 },
impa_scene={Id=53,Name="impa",Card=null,Rooms=1 },
malon_stable_scene={Id=54,Name="malon_stable",Card="g_pn_48",Rooms=1 },
labo_scene={Id=55,Name="labo",Card=null,Rooms=1 },
hylia_labo_scene={Id=56,Name="hylia_labo",Card="g_pn_26",Rooms=1 },
tent_scene={Id=57,Name="tent",Card=null,Rooms=1 },
hut_scene={Id=58,Name="hut",Card="g_pn_25",Rooms=1 },
daiyousei_izumi_scene={Id=59,Name="daiyousei_izumi",Card="g_pn_13",Rooms=1 },
yousei_izumi_tate_scene={Id=60,Name="yousei_izumi_tate",Card="g_pn_45",Rooms=1 },
yousei_izumi_yoko_scene={Id=61,Name="yousei_izumi_yoko",Card="g_pn_13",Rooms=1 },
kakusiana_scene={Id=62,Name="kakusiana",Card=null,Rooms=14 },
hakaana_scene={Id=63,Name="hakaana",Card=null,Rooms=1 },
hakaana2_scene={Id=64,Name="hakaana2",Card=null,Rooms=1 },
hakaana_ouke_scene={Id=65,Name="hakaana_ouke",Card="g_pn_44",Rooms=3 },
syatekijyou_scene={Id=66,Name="syatekijyou",Card="g_pn_15",Rooms=1 },
tokinoma_scene={Id=67,Name="tokinoma",Card="g_pn_16",Rooms=2 },
kenjyanoma_scene={Id=68,Name="kenjyanoma",Card="g_pn_14",Rooms=1 },
hairal_niwa_scene={Id=69,Name="hairal_niwa",Card="g_pn_12",Rooms=1 },
hairal_niwa_n_scene={Id=70,Name="hairal_niwa_n",Card="g_pn_12",Rooms=1 },
hiral_demo_scene={Id=71,Name="hiral_demo",Card=null,Rooms=1 },
hakasitarelay_scene={Id=72,Name="hakasitarelay",Card="g_pn_57",Rooms=7 },
turibori_scene={Id=73,Name="turibori",Card="g_pn_46",Rooms=1 },
nakaniwa_scene={Id=74,Name="nakaniwa",Card="g_pn_12",Rooms=1 },
bowling_scene={Id=75,Name="bowling",Card="g_pn_47",Rooms=1 },
souko_scene={Id=76,Name="souko",Card=null,Rooms=3 },
miharigoya_scene={Id=77,Name="miharigoya",Card=null,Rooms=1 },
mahouya_scene={Id=78,Name="mahouya",Card="g_pn_24",Rooms=1 },
ganon_demo_scene={Id=79,Name="ganon_demo",Card=null,Rooms=1 },
kinsuta_scene={Id=80,Name="kinsuta",Card="g_pn_22",Rooms=1 },
spot00_scene={Id=81,Name="spot00",Card="g_pn_27",Rooms=1 },
spot01_scene={Id=82,Name="spot01",Card="g_pn_28",Rooms=1 },
spot02_scene={Id=83,Name="spot02",Card="g_pn_29",Rooms=2 },
spot03_scene={Id=84,Name="spot03",Card="g_pn_30",Rooms=2 },
spot04_scene={Id=85,Name="spot04",Card="g_pn_31",Rooms=3 },
spot05_scene={Id=86,Name="spot05",Card="g_pn_52",Rooms=1 },
spot06_scene={Id=87,Name="spot06",Card="g_pn_32",Rooms=1 },
spot07_scene={Id=88,Name="spot07",Card="g_pn_33",Rooms=2 },
spot08_scene={Id=89,Name="spot08",Card="g_pn_34",Rooms=1 },
spot09_scene={Id=90,Name="spot09",Card="g_pn_35",Rooms=1 },
spot10_scene={Id=91,Name="spot10",Card="g_pn_36",Rooms=10 },
spot11_scene={Id=92,Name="spot11",Card="g_pn_55",Rooms=1 },
spot12_scene={Id=93,Name="spot12",Card="g_pn_53",Rooms=2 },
spot13_scene={Id=94,Name="spot13",Card="g_pn_37",Rooms=2 },
spot15_scene={Id=95,Name="spot15",Card="g_pn_38",Rooms=1 },
spot16_scene={Id=96,Name="spot16",Card="g_pn_39",Rooms=1 },
spot17_scene={Id=97,Name="spot17",Card="g_pn_40",Rooms=2 },
spot18_scene={Id=98,Name="spot18",Card="g_pn_41",Rooms=4 },
spot20_scene={Id=99,Name="spot20",Card="g_pn_42",Rooms=1 },
ganon_tou_scene={Id=100,Name="ganon_tou",Card="g_pn_43",Rooms=1 },
test01_scene={Id=101,Name="test01",Card=null,Rooms=1 },
besitu_scene={Id=102,Name="besitu",Card=null,Rooms=1 },
depth_test_scene={Id=103,Name="depth_test",Card=null,Rooms=1 },
syotes_scene={Id=104,Name="syotes",Card=null,Rooms=1 },
syotes2_scene={Id=105,Name="syotes2",Card=null,Rooms=1 },
sutaru_scene={Id=106,Name="sutaru",Card=null,Rooms=1 },
hairal_niwa2_scene={Id=107,Name="hairal_niwa2",Card="g_pn_12",Rooms=1 },
sasatest_scene={Id=108,Name="sasatest",Card=null,Rooms=1 },
testroom_scene={Id=109,Name="testroom",Card=null,Rooms=5 },
}
function p.Id(f)
    local args = f.args or f
    local param = args[1]
    local scene = p.GetScene(param)
    
    if (not scene) then
    	return "<Invalid scene>"
	end
	mw.log(scene.Card)
	return string.format("[[%s]] ([[Scene]] %d, %s)",scene.File,scene.Id, scene.Description)
end

function p.GetScene(key)
	local tKey = tonumber(key)
	if (tKey) then
		tKey = t[tKey]
	end
	local r = t[tKey]
	if (r) then
		r["File"] = tKey
	    r["Description"] = descriptions.Description({tKey}) --this should never fail
	end
	return r	
end

function p.RoomsTable(name, rooms)
	local roomTable = '{| class="wikitable collapsible collapsed"\n!Rooms'
	for i = 0,rooms do
		roomTable = roomTable .. string.format("\n|-\n|[[%s_room_%d]]", name, i)
	end
	roomTable = roomTable .. "\n|}"
	return roomTable
end
return p