Skip to content

Commit

Permalink
Fixed issue with new dlc not loading
Browse files Browse the repository at this point in the history
Apparently paradox changed a bit the way dlc data is stored or they just forgot to add quotes to the last dlc path file and that bricked a bit the launcher:

- Fixed dlc load for No step back (Requested by: #8 )
  • Loading branch information
Xferno2 committed Nov 24, 2021
1 parent caf331b commit e5ace7d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
1 change: 0 additions & 1 deletion Hoi4 Launcher/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions Hoi4 Launcher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void SerializeConfig(object x)
var dlc = new dlcModel();
var x = File.ReadLines(dlcFullPath);
dlc.name = x.First().Split('"')[1].Replace('"', ' ');
dlc.path = x.ElementAt(1).Split('"')[1].Replace('"', ' ').Split('.').First() + ".dlc";
dlc.path = x.ElementAt(1).Split('=')[1].Replace('"', ' ').Replace(" ", "").Split('.').First() + ".dlc";
var party = x.ElementAt(x.Count() - 2).Split('=')[1].Replace(" ", "");
if (party == "yes")
{ dlc._3rdparty = true; userControl11._3rdParty = true; }
Expand Down Expand Up @@ -506,7 +506,7 @@ private void button1_Click(object sender, EventArgs e)
Logger("I'm clear button and I've been clicked");
//categoriesBox.DroppedDown = false;
textBox2.Text = "";
categoriesBox.SelectedIndex = 0;
categoriesBox.SelectedIndex = -1;
}

private void button2_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -555,11 +555,6 @@ private void list_mods_CellContentClick(object sender, DataGridViewCellEventArgs

}

private void userControl12_Load(object sender, EventArgs e)
{

}

private void panel1_Paint(object sender, PaintEventArgs e)
{

Expand Down
10 changes: 0 additions & 10 deletions Hoi4 Launcher/Parser/modParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ public bool createDescriptorFile(string path, string savePath, string id)
{
try
{
//using (ZipArchive archive = ZipFile.OpenRead(zipFile.FullName))
//{
// ZipArchiveEntry descriptor = archive.GetEntry("descriptor.mod");
// descriptor.ExtractToFile(@"descriptor.mod");
// var textStream = descriptor.Open();
// StreamReader reader = new StreamReader(textStream);
// var descriptorFile = editDescriptor(reader.ReadToEnd(), zipFile.FullName);
// System.IO.File.WriteAllLines(savePath + "\\ugc_" + id + ".mod", descriptorFile);
//}

using (Stream stream = File.OpenRead(zipFile.FullName))
using (var reader = ReaderFactory.Open(stream))
{
Expand Down

0 comments on commit e5ace7d

Please sign in to comment.