Skip to content

Commit f29ac7e

Browse files
committed
Added SFM, 2013 SP & MP, HL2 Update, HL2 ep1 & ep2, G String, ASW RD, FR
1 parent 1be1d68 commit f29ac7e

1 file changed

Lines changed: 163 additions & 3 deletions

File tree

‎SourceMultiToolCSharp/mainMenuForm.cs‎

Lines changed: 163 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ private void MainMenuForm_Load(object sender, EventArgs e)
6363
Directory = ""
6464
});
6565
listOfSourceGames.Add(new SourceGame
66+
{
67+
SteamName = "Alien Swarm Reactive Drop",
68+
ProperName = "Alien Swarm: Reactive Drop",
69+
SourceName = "reactivedrop",
70+
Installed = false,
71+
Directory = ""
72+
});
73+
listOfSourceGames.Add(new SourceGame
6674
{
6775
SteamName = "Contagion",
6876
ProperName = "Contagion",
@@ -119,6 +127,14 @@ private void MainMenuForm_Load(object sender, EventArgs e)
119127
Directory = ""
120128
});
121129
listOfSourceGames.Add(new SourceGame
130+
{
131+
SteamName = "FIREFIGHT RELOADED",
132+
ProperName = "FIREFIGHT RELOADED",
133+
SourceName = "firefightreloaded",
134+
Installed = false,
135+
Directory = ""
136+
});
137+
listOfSourceGames.Add(new SourceGame
122138
{
123139
SteamName = "Empires",
124140
ProperName = "Empires",
@@ -127,6 +143,14 @@ private void MainMenuForm_Load(object sender, EventArgs e)
127143
Directory = ""
128144
});
129145
listOfSourceGames.Add(new SourceGame
146+
{
147+
SteamName = "G String",
148+
ProperName = "G String",
149+
SourceName = "gstringv2",
150+
Installed = false,
151+
Directory = ""
152+
});
153+
listOfSourceGames.Add(new SourceGame
130154
{
131155
SteamName = "GarrysMod",
132156
ProperName = "Garry's Mod",
@@ -151,6 +175,22 @@ private void MainMenuForm_Load(object sender, EventArgs e)
151175
Directory = ""
152176
});
153177
listOfSourceGames.Add(new SourceGame
178+
{
179+
SteamName = "Half-Life 2",
180+
ProperName = "Half-Life 2 Episode 1",
181+
SourceName = "episodic",
182+
Installed = false,
183+
Directory = ""
184+
});
185+
listOfSourceGames.Add(new SourceGame
186+
{
187+
SteamName = "Half-Life 2",
188+
ProperName = "Half-Life 2 Episode 2",
189+
SourceName = "ep2",
190+
Installed = false,
191+
Directory = ""
192+
});
193+
listOfSourceGames.Add(new SourceGame
154194
{
155195
SteamName = "Half-Life 2 Deathmatch",
156196
ProperName = "Half-Life 2 Deathmatch",
@@ -159,6 +199,14 @@ private void MainMenuForm_Load(object sender, EventArgs e)
159199
Directory = ""
160200
});
161201
listOfSourceGames.Add(new SourceGame
202+
{
203+
SteamName = "Half-Life 2 Update",
204+
ProperName = "Half-Life 2 Update",
205+
SourceName = "hl2",
206+
Installed = false,
207+
Directory = ""
208+
});
209+
listOfSourceGames.Add(new SourceGame
162210
{
163211
SteamName = "insurgency2",
164212
ProperName = "Insurgency",
@@ -214,6 +262,31 @@ private void MainMenuForm_Load(object sender, EventArgs e)
214262
Installed = false,
215263
Directory = ""
216264
});
265+
266+
listOfSourceGames.Add(new SourceGame
267+
{
268+
SteamName = "Source SDK Base 2013 Multiplayer",
269+
ProperName = "Source SDK Base 2013 Multiplayer",
270+
SourceName = "hl2mp",
271+
Installed = false,
272+
Directory = ""
273+
});
274+
listOfSourceGames.Add(new SourceGame
275+
{
276+
SteamName = "Source SDK Base 2013 Singleplayer",
277+
ProperName = "Source SDK Base 2013 Singleplayer",
278+
SourceName = "hl2",
279+
Installed = false,
280+
Directory = ""
281+
});
282+
listOfSourceGames.Add(new SourceGame
283+
{
284+
SteamName = "SourceFilmmaker",
285+
ProperName = "Source Filmmaker",
286+
SourceName = "game",
287+
Installed = false,
288+
Directory = ""
289+
});
217290
listOfSourceGames.Add(new SourceGame
218291
{
219292
SteamName = "Team Fortress 2",
@@ -222,13 +295,18 @@ private void MainMenuForm_Load(object sender, EventArgs e)
222295
Installed = false,
223296
Directory = ""
224297
});
298+
225299
// Load in saved properties if still valid
226300
if (File.Exists(Properties.Settings.Default.mainSteamDir + "/Steam.exe"))
227301
{
228302
steam.MainSteamDir = Properties.Settings.Default.mainSteamDir;
229303
textSteamDirectory.Text = Properties.Settings.Default.mainSteamDir;
230304
FindSteamDirectories();
231305
}
306+
else
307+
{
308+
FindSteam();
309+
}
232310
}
233311

234312

@@ -351,6 +429,7 @@ private void buttonHammer_Click(object sender, EventArgs e)
351429
switch (gameName)
352430
{
353431
case "Alien Swarm":
432+
case "Alien Swarm: Reactive Drop":
354433
case "Counter-Strike Global Offensive":
355434
case "Dino D-Day":
356435
case "Left 4 Dead 2":
@@ -372,6 +451,27 @@ private void buttonHammer_Click(object sender, EventArgs e)
372451
return;
373452
}
374453
break;
454+
case "Source Filmmaker":
455+
if (!File.Exists(directory + "\\game\\bin\\hammer.exe"))
456+
{
457+
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\game\\bin\\hammer.exe", directory), "ERROR 002", MessageBoxButtons.OK, MessageBoxIcon.Warning);
458+
return;
459+
}
460+
break;
461+
case "G String":
462+
if (!File.Exists(directory + "\\bin\\hammer.exe"))
463+
{
464+
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\game\\bin\\hammer.exe \n\n G String doesn't have it!", directory), "ERROR 002", MessageBoxButtons.OK, MessageBoxIcon.Warning);
465+
return;
466+
}
467+
break;
468+
case "Half-Life 2 Update":
469+
if (!File.Exists(directory + "\\bin\\hammer.exe"))
470+
{
471+
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\game\\bin\\hammer.exe \n\n Half-Life 2 Update doesn't have it!", directory), "ERROR 002", MessageBoxButtons.OK, MessageBoxIcon.Warning);
472+
return;
473+
}
474+
break;
375475
default:
376476
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\bin\\hammer.exe", directory), "ERROR 002", MessageBoxButtons.OK, MessageBoxIcon.Warning);
377477
return;
@@ -384,6 +484,8 @@ private void buttonHammer_Click(object sender, EventArgs e)
384484
hammer.StartInfo.Arguments = "/c cd /d " + directory + "\\sdk\\bin && start \"\" hammer.exe -nop4";
385485
else if (gameName == "Pirates, Vikings, and Knights II")
386486
hammer.StartInfo.Arguments = "/c cd /d " + directory + "\\sdkbase_pvkii\\bin && start \"\" hammer.exe -nop4";
487+
else if (gameName == "Source Filmmaker")
488+
hammer.StartInfo.Arguments = "/c cd /d " + directory + "\\game\\bin && start \"\" hammer.exe -nop4";
387489
else
388490
hammer.StartInfo.Arguments = "/c cd /d " + directory + "\\bin && start \"\" hammer.exe -nop4";
389491
hammer.Start();
@@ -399,6 +501,7 @@ private void ButtonModelViewer_Click(object sender, EventArgs e)
399501
switch (gameName)
400502
{
401503
case "Alien Swarm":
504+
case "Alien Swarm: Reactive Drop":
402505
case "Counter-Strike Global Offensive":
403506
case "Dino D-Day":
404507
case "Left 4 Dead 2":
@@ -409,19 +512,40 @@ private void ButtonModelViewer_Click(object sender, EventArgs e)
409512
case "No More Room In Hell":
410513
if (!File.Exists(directory + "\\sdk\\bin\\hlmv.exe"))
411514
{
412-
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\sdk\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
515+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\sdk\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
413516
return;
414517
}
415518
break;
416519
case "Pirates, Vikings, and Knights II":
417520
if (!File.Exists(directory + "\\sdkbase_pvkii\\bin\\hlmv.exe"))
418521
{
419-
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\sdkbase_pvkii\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
522+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\sdkbase_pvkii\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
523+
return;
524+
}
525+
break;
526+
case "Source Filmmaker":
527+
if (!File.Exists(directory + "\\game\\bin\\hlmv.exe"))
528+
{
529+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\game\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
420530
return;
421531
}
422532
break;
533+
case "G String":
534+
if (!File.Exists(directory + "\\bin\\hlmv.exe"))
535+
{
536+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\game\\bin\\hlmv.exe \n\n Thats ok though we will use 2013 MP or 2013 SP. ", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
537+
538+
}
539+
break;
540+
case "Half-Life 2 Update":
541+
if (!File.Exists(directory + "\\bin\\hlmv.exe"))
542+
{
543+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\game\\bin\\hlmv.exe \n\n Thats ok though we will use 2013 MP or 2013 SP. ", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
544+
545+
}
546+
break;
423547
default:
424-
MessageBox.Show(String.Format("No Hammer install could be found at {0}\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
548+
MessageBox.Show(String.Format("No Model Viewer install could be found at {0}\\bin\\hlmv.exe", directory), "ERROR 003", MessageBoxButtons.OK, MessageBoxIcon.Warning);
425549
return;
426550
}
427551
}
@@ -432,6 +556,42 @@ private void ButtonModelViewer_Click(object sender, EventArgs e)
432556
modelviewer.StartInfo.Arguments = "/c cd /d " + directory + "\\sdk\\bin && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
433557
else if (gameName == "Pirates, Vikings, and Knights II")
434558
modelviewer.StartInfo.Arguments = "/c cd /d " + directory + "\\sdkbase_pvkii\\bin && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
559+
else if (gameName == "Source Filmmaker")
560+
modelviewer.StartInfo.Arguments = "/c cd /d " + directory + "\\game\\bin && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\\usermod" + "\"";
561+
else if (gameName == "G String")
562+
{
563+
if (comboBoxGames.Items.Contains("Source SDK Base 2013 Singleplayer"))
564+
{
565+
string mpdirectory = listOfSourceGames.First(item => item.ProperName == "Source SDK Base 2013 Singleplayer").Directory;
566+
modelviewer.StartInfo.Arguments = "/c cd /d " + "\"" + mpdirectory + "\\bin" + "\"" + " && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
567+
}
568+
else if (comboBoxGames.Items.Contains("Source SDK Base 2013 Multiplayer"))
569+
{
570+
string mpdirectory = listOfSourceGames.First(item => item.ProperName == "Source SDK Base 2013 Multiplayer").Directory;
571+
modelviewer.StartInfo.Arguments = "/c cd /d " + "\"" + mpdirectory + "\\bin" + "\"" + " && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
572+
}
573+
else
574+
{
575+
MessageBox.Show(String.Format("2013 MP or 2013 SP wasn't found please install one of these. ", directory), "ERROR 005", MessageBoxButtons.OK, MessageBoxIcon.Warning);
576+
}
577+
}
578+
else if (gameName == "Half-Life 2 Update")
579+
{
580+
if (comboBoxGames.Items.Contains("Source SDK Base 2013 Singleplayer"))
581+
{
582+
string mpdirectory = listOfSourceGames.First(item => item.ProperName == "Source SDK Base 2013 Singleplayer").Directory;
583+
modelviewer.StartInfo.Arguments = "/c cd /d " + "\"" + mpdirectory + "\\bin" + "\"" + " && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
584+
}
585+
else if (comboBoxGames.Items.Contains("Source SDK Base 2013 Multiplayer"))
586+
{
587+
string mpdirectory = listOfSourceGames.First(item => item.ProperName == "Source SDK Base 2013 Multiplayer").Directory;
588+
modelviewer.StartInfo.Arguments = "/c cd /d " + "\"" + mpdirectory + "\\bin" + "\"" + " && start \"\" hlmv.exe -game \"" + directory + "\\" + sourcename + "\"";
589+
}
590+
else
591+
{
592+
MessageBox.Show(String.Format("2013 MP or 2013 SP wasn't found please install one of these. ", directory), "ERROR 005", MessageBoxButtons.OK, MessageBoxIcon.Warning);
593+
}
594+
}
435595
else
436596
modelviewer.StartInfo.Arguments = "/c cd /d " + directory + "\\bin && start \"\" hlmv.exe -game \""+directory+"\\"+sourcename+"\"";
437597
modelviewer.Start();

0 commit comments

Comments
 (0)