From 29cee96d3973750a784a0365885ad2ec65f8df0e Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Tue, 11 Jun 2019 21:03:17 -0400 Subject: [PATCH] Adjust settings for tphd path --- .vs/Switch_Toolbox/v15/.suo | Bin 1409024 -> 1418752 bytes Toolbox/GUI/Settings.cs | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index ab94e27c6eba91218eff0463877031ad1c6e4aa8..2a2394901da928ff528c5d95b5015e351420599f 100644 GIT binary patch delta 6884 zcma)A3tUxIx<6~}v(H)kJob6OK?DTEBLX2F5ET*efbTaD8kz6P%t%qu)DREqjOCaC z+xTo!Q=*NpK^_ikGHniynK@Qyj?;M2%eB%nbI8yfGriwFYOg!<``xX7)>_~C)>_|t zud{u=$-Wbl%X6cNPS;hZ(|wH?g8ik4Wr*d7=Mh6Ip6wD_X4L5j)9G@N5Qm6IBqLH0 z>#0unJH+!6c+V1VgWpLiX`w#4tTbLJGJLEI75XX5j3r8^;2C`9?%lhC@Sq>C4aIgk zuJ3{ETx>^U`zm4-!h#rxcmp9L;t|g&v-E@X+Dc`+-a{pwa!MaV3YF{n9^@&dtJp)_ zqu1#glq_)-`Ce%egQPEU)gHt%$~iHd?ZjRLLKCijP0!&<5nW5aG%7a?t7(p2Ss|>5 zzkzD{i%}PR@SMP7z`k~BdIh6J;*jAZHPoqbTJx5aciQu zzQ@VsIDrJ6g4lqFRsJURsn|cRDaTY#s_nEgx|kFxOHx;n1mq5(wP&kxE^I7$S&0uHWPL!>=sze6 zFNIGJ^t2IT1n%}3uAhTgfglJc(oztS2#OXB!dBz`cX+Uu)@qMHwMYtSv`5pX=!ks1 zQkecLl?u-%o-Ib7m;HJ;sl~U(z+ltJLTe7+vS11P};y)v0n-$K}!6k9*%ruTZH7J zh-~aXtW3M4$b+$0inuQ5bUvco8RAyl4@Wd*_CMUUQhuS^QIk$L4HvW^UP9y}{)pI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h zh}0B4;swthy;qq-PlWIgodeXk2Sf0FJsFqo5uY57qaKgr(Sj%W zSdpl^_oApLaDJ|ckFa`7K#cIX*C`NL<3zoEI)-dz5&uwB#=4VTzgT0f<~Y)Y!|y)Q z0S-l+uL*3Dqp-35%{f%KGTm=U5b3I?{$gn|scgt{dmu7YN3m$LQrR%UZHLHWYaXz! zA(b2xp_=y<1E#t+bBGk-`J8;#QFPp(pC|YZ(o;mrF8wbAswKVKSHHy3gB`sd2Od+hhvrH1I~|G`<466$1k1u-ffOblAzn=a!|9^WFaAg&_5L;M5L zg1CnG9%1oaNBW~RM%+Z$@P~2{xvHn?zw)^6UD%W88ViAw?ha1h?}CYPLEE4yt_RaBKJdgg9m2)&7C7cpSnZDyySM8vIl>j z@OdAB#^F-DC|($q|F{|QY=bTpS}$>Zru%)#^m!eo+0I_sFvsmTtJ-aYf@^FIOn;ka zif7ikhx9gEyqK&3*Cc5Et;-AHeeSVvZKm5P*6nvM#4lTab2q@m)1DPZ;f2+|R!0Ob zyBqLx^rPN>&{XPWkRFU#&8D8jUytyCtjw4+aXlC#lQM%RLs9{0zb5!V6r!C7J`f!q r1xfq7yCA&5Ge9(rkM`XMzO(LnQ7^}2-u^G4B7H;55wAHprq@3Kq0*Ov diff --git a/Toolbox/GUI/Settings.cs b/Toolbox/GUI/Settings.cs index 51a0337d..35bdd19b 100644 --- a/Toolbox/GUI/Settings.cs +++ b/Toolbox/GUI/Settings.cs @@ -625,7 +625,30 @@ namespace Toolbox return System.IO.File.Exists(RstbPath); } + private bool IsValidTPHDDirectory(string GamePath) + { + //This is the only file i care about + string DecompressedSizeList = System.IO.Path.Combine($"{GamePath}", "DecompressedSizeList.txt"); + string FileSizeList = System.IO.Path.Combine($"{GamePath}", "FileSizeList.txt"); + + return System.IO.File.Exists(DecompressedSizeList) && System.IO.File.Exists(FileSizeList); + } + private void chkTpFileTable_CheckedChanged(object sender, EventArgs e) { + if (!System.IO.Directory.Exists(Runtime.TpGamePath) || !IsValidTPHDDirectory(Runtime.TpGamePath)) + { + FolderSelectDialog sfd = new FolderSelectDialog(); + sfd.Title = "Select Modded Game Path!!!"; + if (sfd.ShowDialog() == DialogResult.OK) + { + if (!IsValidTPHDDirectory(sfd.SelectedPath)) + throw new Exception($"Invalid path choosen. Make sure you have atleast a FileSizeList.txt and DecompressedSizeList.txt file in the path!"); + + tpGamePathTB.Text = sfd.SelectedPath; + Runtime.TpGamePath = tpGamePathTB.Text; + } + } + Runtime.ResourceTables.TpTable = chkTpFileTable.Checked; } }