diff --git a/App.config b/App.config
index 81ba35b..47481be 100644
--- a/App.config
+++ b/App.config
@@ -38,6 +38,9 @@
+
+
+
\ No newline at end of file
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index 9ba80eb..ba15cb0 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -43,6 +43,9 @@ private void InitializeComponent()
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
+ this.CollectionIDBox = new System.Windows.Forms.TextBox();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.maxplayers)).BeginInit();
this.SuspendLayout();
//
@@ -62,14 +65,15 @@ private void InitializeComponent()
//
// mapselect
//
+ this.mapselect.AllowDrop = true;
this.mapselect.Enabled = false;
this.mapselect.Font = new System.Drawing.Font("Arial Narrow", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.mapselect.FormattingEnabled = true;
this.mapselect.Location = new System.Drawing.Point(213, 98);
this.mapselect.Name = "mapselect";
this.mapselect.Size = new System.Drawing.Size(132, 23);
this.mapselect.TabIndex = 2;
this.mapselect.SelectedIndexChanged += new System.EventHandler(this.MapChanged);
+ this.mapselect.TextChanged += new System.EventHandler(this.MapChanged);
//
// label1
//
@@ -89,7 +93,7 @@ private void InitializeComponent()
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.Font = new System.Drawing.Font("Arial Narrow", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.White;
- this.button1.Location = new System.Drawing.Point(0, 289);
+ this.button1.Location = new System.Drawing.Point(0, 296);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(357, 64);
this.button1.TabIndex = 4;
@@ -146,12 +150,13 @@ private void InitializeComponent()
//
// gameselect
//
- this.gameselect.FormattingEnabled = true;
+ this.gameselect.AllowDrop = true;
this.gameselect.Location = new System.Drawing.Point(213, 30);
this.gameselect.Name = "gameselect";
this.gameselect.Size = new System.Drawing.Size(121, 23);
this.gameselect.TabIndex = 8;
this.gameselect.SelectedIndexChanged += new System.EventHandler(this.GamemodeChanged);
+ this.gameselect.TextChanged += new System.EventHandler(this.GamemodeChanged);
//
// label3
//
@@ -168,7 +173,7 @@ private void InitializeComponent()
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.White;
- this.label4.Location = new System.Drawing.Point(12, 243);
+ this.label4.Location = new System.Drawing.Point(10, 275);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(119, 15);
this.label4.TabIndex = 10;
@@ -176,7 +181,7 @@ private void InitializeComponent()
//
// button2
//
- this.button2.Location = new System.Drawing.Point(12, 261);
+ this.button2.Location = new System.Drawing.Point(12, 249);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 11;
@@ -281,12 +286,41 @@ private void InitializeComponent()
this.label11.Size = new System.Drawing.Size(150, 1);
this.label11.TabIndex = 22;
//
+ // CollectionIDBox
+ //
+ this.CollectionIDBox.Location = new System.Drawing.Point(212, 233);
+ this.CollectionIDBox.Name = "CollectionIDBox";
+ this.CollectionIDBox.Size = new System.Drawing.Size(100, 20);
+ this.CollectionIDBox.TabIndex = 24;
+ this.CollectionIDBox.TextChanged += new System.EventHandler(this.CollectionIDBoxChanged);
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.ForeColor = System.Drawing.Color.White;
+ this.label12.Location = new System.Drawing.Point(215, 215);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(120, 15);
+ this.label12.TabIndex = 23;
+ this.label12.Text = "Workshop Collection ID:";
+ //
+ // label13
+ //
+ this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+ this.label13.Location = new System.Drawing.Point(194, 263);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(150, 1);
+ this.label13.TabIndex = 25;
+ //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
- this.ClientSize = new System.Drawing.Size(357, 353);
+ this.ClientSize = new System.Drawing.Size(357, 360);
+ this.Controls.Add(this.label13);
+ this.Controls.Add(this.CollectionIDBox);
+ this.Controls.Add(this.label12);
this.Controls.Add(this.label11);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
@@ -344,6 +378,9 @@ private void InitializeComponent()
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.TextBox CollectionIDBox;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label13;
}
}
diff --git a/MainForm.cs b/MainForm.cs
index 1edb632..8b9c54b 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -12,6 +12,7 @@ public partial class MainForm : Form
public string LANEnabled = "";
public string Password = "";
public string SteamToken = "";
+ public string CollectionID = "";
public MainForm()
{
@@ -29,12 +30,14 @@ public MainForm()
mapselect.SelectedItem = Settings.Map;
passwordBox.Text = Settings.Password;
TokenEnable.Checked = Settings.TokenEnabled;
+ CollectionIDBox.Text = Settings.CollectionID;
mapselect.Enabled = consolecheck.Checked;
lancheck.Enabled = consolecheck.Checked;
maxplayers.Enabled = consolecheck.Checked;
gameselect.Enabled = consolecheck.Checked;
passwordBox.Enabled = consolecheck.Checked;
+ CollectionIDBox.Enabled = consolecheck.Checked;
StringBuilder path = new StringBuilder( label4.Text );
path.Append( Properties.Settings.Default.FilePath );
@@ -90,6 +93,8 @@ private void ConsoleCheck( object sender, EventArgs e )
lancheck.Enabled = consolecheck.Checked;
maxplayers.Enabled = consolecheck.Checked;
gameselect.Enabled = consolecheck.Checked;
+ passwordBox.Enabled = consolecheck.Checked;
+ CollectionIDBox.Enabled = consolecheck.Checked;
Properties.Settings.Default.Console = consolecheck.Checked;
}
@@ -100,12 +105,12 @@ private void MaxPlayersChanged( object sender, EventArgs e )
private void MapChanged( object sender, EventArgs e )
{
- Properties.Settings.Default.Map = mapselect.SelectedItem.ToString();
+ Properties.Settings.Default.Map = mapselect.Text;
}
private void GamemodeChanged( object sender, EventArgs e )
{
- Properties.Settings.Default.Gamemode = gameselect.SelectedItem.ToString();
+ Properties.Settings.Default.Gamemode = gameselect.Text;
}
private void ChangePathClick( object sender, EventArgs e )
@@ -174,7 +179,7 @@ private void StartButtonClick( object sender, EventArgs e )
UseShellExecute = true,
WorkingDirectory = Properties.Settings.Default.FilePath,
FileName = Properties.Settings.Default.FilePath + @"\srcds.exe",
- Arguments = "+gamemode " + gameselect.Text.ToString() + ConsoleEnabled + LANEnabled + "+map " + mapselect.Text.ToString() + " +maxplayers " + maxplayers.Value + " +r_hunkalloclightmaps 0" + Password + SteamToken,
+ Arguments = "+gamemode " + gameselect.Text.ToString() + ConsoleEnabled + LANEnabled + "+map " + mapselect.Text.ToString() + " +maxplayers " + maxplayers.Value + " +r_hunkalloclightmaps 0" + Password + SteamToken + CollectionID,
};
try
@@ -188,5 +193,16 @@ private void StartButtonClick( object sender, EventArgs e )
if ( launcherror == DialogResult.OK ) Close();
}
}
+
+ private void CollectionIDBoxChanged( object sender, EventArgs e )
+ {
+ Properties.Settings.Default.CollectionID = CollectionIDBox.Text;
+ if ( string.IsNullOrWhiteSpace( CollectionIDBox.Text ) )
+ {
+ CollectionID = "";
+ return;
+ }
+ CollectionID = " +host_workshop_collection " + CollectionIDBox.Text;
+ }
}
}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index afcae97..c100c02 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration( "" )]
[assembly: AssemblyCompany( "" )]
[assembly: AssemblyProduct( "CityRP-Server-Launcher-UI" )]
-[assembly: AssemblyCopyright( "Copyright © 2020" )]
+[assembly: AssemblyCopyright( "Copyright © LambdaGaming 2021" )]
[assembly: AssemblyTrademark( "" )]
[assembly: AssemblyCulture( "" )]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion( "1.0.0.0" )]
-[assembly: AssemblyFileVersion( "1.0.0.0" )]
+[assembly: AssemblyVersion( "1.3" )]
+[assembly: AssemblyFileVersion( "1.3" )]
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
index 5eee735..b6da761 100644
--- a/Properties/Settings.Designer.cs
+++ b/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace GMod_Server_Launcher_Console.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -130,5 +130,17 @@ public string TokenPath {
this["TokenPath"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string CollectionID {
+ get {
+ return ((string)(this["CollectionID"]));
+ }
+ set {
+ this["CollectionID"] = value;
+ }
+ }
}
}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
index 8924535..e3581c1 100644
--- a/Properties/Settings.settings
+++ b/Properties/Settings.settings
@@ -29,5 +29,8 @@
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 046a37b..05b0327 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,22 @@
# Garry's Mod Server Launcher GUI With Console Support
- This is meant to act as a replacement launcher for hosts who want to use the full console while also wanting to choose the map the server starts on, since the normal server GUI doesn't include that feature.
+ This is a replacement launcher for hosts who want to use the server's console mode while also wanting the full options that the normal GUI provides.
![](https://raw.githubusercontent.com/LambdaGaming/GMod-Server-Launcher-Console/master/reference.PNG)
## Features:
-
- - Prompts the user to select the file path that contains the server exe if the path is not found.
- - Console mode toggle. Disables all other options if disabled since the main server GUI will take over at that point and ignore all launch arguments.
- - Map selection that gets the names of maps inside the garrymod/maps server folder.
- - Support for the new Steam server tokens requirement so the server isn't stuck at the bottom of the server browser.
- - Gamemode selection that gets the names of gamemodes inside the garrysmod/gamemodes server folder.
- - LAN mode toggle.
- - Max players selection.
- - Password option.
- - All settings mentioned above are saved when the app closes and will be automatically set when the app is reopened.
-
+- Prompts the user to select the file path that contains the server exe if the path is not found.
+- Console mode toggle. Disables all other options if disabled since the main server GUI will take over at that point and ignore all launch arguments.
+- Map selection that gets the names of maps inside the garrymod/maps server folder. The map name can also be manually entered into the text box if the map is in a different location.
+- Support for the new Steam server tokens requirement so the server isn't stuck at the bottom of the server browser.
+- Gamemode selection that gets the names of gamemodes inside the garrysmod/gamemodes server folder.
+- LAN mode toggle.
+- Max players selection.
+- Password option.
+- Steam workshop collection option.
+- All settings mentioned above are saved when the program closes and will be automatically set when the program is reopened.
## Working with more than one server:
- If you need this program to run more than one server, you can copy the exe and rename it to something else to generate a new config, allowing you to basically have an unlimited number of configs for the same program.
-
-## Extra Builds:
- I have a separate repository for the launchers that I personally use. These are not very customizable and the the configs are all hard-coded, but feel free to use them if you'd like. [Click here to go to the repository.](https://github.com/LambdaGaming/GMod-Server-Launcher-Console-Extra)
+ If you need this program to run more than one server, you can copy the exe and rename it to something else to generate a new config.
# Issues & Pull Requests
If you would like to contribute to this repository by creating an issue or pull request, please refer to the [contributing guidelines.](https://lambdagaming.github.io/contributing.html)
diff --git a/reference.PNG b/reference.PNG
index b571d01..92e4071 100644
Binary files a/reference.PNG and b/reference.PNG differ