Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
wahhh
Browse files Browse the repository at this point in the history
  • Loading branch information
AtlasTheProto committed Apr 24, 2020
1 parent a38554c commit efab938
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 36 deletions.
27 changes: 20 additions & 7 deletions bC7totif/MainForm.Designer.cs

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

55 changes: 33 additions & 22 deletions bC7totif/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,22 +299,7 @@ public static void doConvertAll()
}

}
/*
foreach (string dir in moveDirs)
{
try
{
Directory.Move("temp/Content/Textures/" + dir, outDir + "/" + dir);
consoleBuffer.Enqueue("Moved " + dir );
}
catch
{
consoleBuffer.Enqueue("Skipped moving " + dir + ", it may already exist");
}
}
*/

//Directory.Delete("temp");

MessageBox.Show("Finished!", "Conversion completed", MessageBoxButtons.OK, MessageBoxIcon.Information);
busy = false;

Expand All @@ -325,12 +310,12 @@ private void btnConvert_Click(object sender, EventArgs e)

if (!File.Exists(toolPath + "/texconv.exe"))
{
MessageBox.Show("Cannot find texconv.exe under tool directory.\n\nPlease ensure ModSDK is installed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Cannot find texconv.exe under tool directory.\n\nPlease ensure ModSDK is installed.", "Error (01)", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!Directory.Exists(gamePath))
{
MessageBox.Show("Game path is wrong.\n\nPlease ensure game is installed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Game path is wrong.\n\nPlease ensure game is installed.", "Error (02)", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

Expand All @@ -343,6 +328,7 @@ private void btnConvert_Click(object sender, EventArgs e)

private void performTestToolStripMenuItem_Click(object sender, EventArgs e)
{
// defunct
StartProcess(@"C:\WINDOWs\SYSTEM32\PING.exe", "google.com");
}

Expand All @@ -356,7 +342,7 @@ private void btnAdd_Click(object sender, EventArgs e)
var pth2 = pth1.Replace(gamePath + "\\", "\\");
if (pth2 == pth1)
{
MessageBox.Show("Path must be inside game directory.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Path must be inside game directory.", "Error (03)", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
lbfolderList.Items.Add(pth2);
Expand Down Expand Up @@ -392,17 +378,42 @@ private void LoadPresetsToolStripMenuItem_Click(object sender, EventArgs e)
var pth2 = pth1.Replace(gamePath + "\\", "\\");
if (pth2 == pth1)
{
consoleBuffer.Enqueue("Path must be inside game directory " + sparr[i]);
MessageBox.Show("Path must be inside game directory.", "Error (04)", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
lbfolderList.Items.Add(pth2);
}
} else
{
MessageBox.Show("presets.ini not found in application directory.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("presets.ini not found in application directory.", "Error (05)", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}


private void btnInsertPresets_Click(object sender, EventArgs e)
{
if (File.Exists("presets.ini"))
{

lbfolderList.Items.Clear();
var sparr = File.ReadAllLines("presets.ini");
for (int i = 0; i < sparr.Length; i++)
{
if (sparr[i] == null)
continue;
var pth1 = sparr[i];
var pth2 = pth1.Replace(gamePath + "\\", "\\");
if (pth2 == pth1)
{
MessageBox.Show("Preset Error: Path must be inside game directory.\n"+pth1+"\n"+pth2, "Error (06)", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
lbfolderList.Items.Add(pth2);
}
}
else
{
MessageBox.Show("presets.ini not found in application directory.", "Error (07)", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
Binary file modified bC7totif/bin/Debug/bulkTexConverter.exe
Binary file not shown.
13 changes: 6 additions & 7 deletions bC7totif/bin/Debug/presets.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Cubes
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Cubes\armor
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Physical_item
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Environment\Bushes
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Environment\Grass
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Models\Environment\Trees
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Textures\Voxels
Models\Cubes
Models\Cubes\armor
Models\Physical_item
Models\Environment\Bushes
Models\Environment\Grass
Models\Environment\Trees

0 comments on commit efab938

Please sign in to comment.