Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions COTLMP.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36310.24
# Visual Studio Version 18
VisualStudioVersion = 18.5.11723.231
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COTLMP", "COTLMP\COTLMP.csproj", "{75CAB2D0-F823-DEFE-5EF0-A25BC117280F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COTLMPServer", "COTLMPServer\COTLMPServer.csproj", "{9476AA40-C94F-43C7-BF81-9427F4329E8F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DedicatedServer", "COTLMPServer\DedicatedServer\DedicatedServer.csproj", "{1D6C6C2A-38F4-4574-918D-24A33F1FB8C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{9476AA40-C94F-43C7-BF81-9427F4329E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9476AA40-C94F-43C7-BF81-9427F4329E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9476AA40-C94F-43C7-BF81-9427F4329E8F}.Release|Any CPU.Build.0 = Release|Any CPU
{1D6C6C2A-38F4-4574-918D-24A33F1FB8C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D6C6C2A-38F4-4574-918D-24A33F1FB8C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D6C6C2A-38F4-4574-918D-24A33F1FB8C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D6C6C2A-38F4-4574-918D-24A33F1FB8C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions COTLMP/COTLMP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
https://nuget.samboy.dev/v3/index.json
</RestoreAdditionalProjectSources>
<RootNamespace>COTLMP</RootNamespace>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions COTLMPServer/COTLMPServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
30 changes: 30 additions & 0 deletions COTLMPServer/DedicatedServer/Cli.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* PROJECT: Cult of the Lamb Multiplayer Mod
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Core dedicated server CLI parser
* COPYRIGHT: Copyright 2026 GeoB99 <geobman1999@gmail.com>
*/

/* IMPORTS ********************************************************************/

using System;
using CommandLine;

/* CLASSES & CODE *************************************************************/

namespace COTLMPServer.DedicatedServer
{
internal static class Cli
{
public static void Initialize(string[] Arguments)
{
CommandLine.Parser.Default.ParseArguments<DedicatedServerOptions>(Arguments)
.WithParsed<DedicatedServerOptions>(Options =>
{
// TODO
});
}
}
}

/* EOF */
20 changes: 20 additions & 0 deletions COTLMPServer/DedicatedServer/DedicatedServer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<AssemblyTitle>CultOfTheLambServer</AssemblyTitle>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<AssemblyName>CultOfTheLambServer</AssemblyName>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\COTLMPServer.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
36 changes: 36 additions & 0 deletions COTLMPServer/DedicatedServer/DedicatedServerOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* PROJECT: Cult of the Lamb Multiplayer Mod
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Dedicated server command line options
* COPYRIGHT: Copyright 2026 GeoB99 <geobman1999@gmail.com>
*/

/* IMPORTS ********************************************************************/

using System;
using CommandLine;

/* CLASSES & CODE *************************************************************/

namespace COTLMPServer.DedicatedServer
{
internal class DedicatedServerOptions
{
[Value(0, Required = true, HelpText = "Port number used to create and estabilish server connection.")]
public ushort PortNumber { get; set; }

[Option('n', "Name", Required = true, HelpText = "The name of the server used to setup the dedicated server.")]
public string ServerName { get; set; }

[Option('c', "Count", Required = true, HelpText = "Number of allowed players to join the server.")]
public uint MaxPlayers { get; set; }

[Option('p', "Password", Required = false, HelpText = "(Optional) Setup a password to protect the server from players joining your server.")]
public string Password { get; set; }

[Option('g', "Game", Required = false, HelpText = "(Optional) The game-mode to use when creating the server. Default = Standard.")]
public string GameMode { get; set; }
}
}

/* EOF */
25 changes: 25 additions & 0 deletions COTLMPServer/DedicatedServer/Launcher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* PROJECT: Cult of the Lamb Multiplayer Mod
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Main entry point dedicated server launcher
* COPYRIGHT: Copyright 2026 GeoB99 <geobman1999@gmail.com>
*/

/* IMPORTS ********************************************************************/

using System;

/* CLASSES & CODE *************************************************************/

namespace COTLMPServer.DedicatedServer
{
internal static class Launcher
{
public static void Main(string[] args)
{
COTLMPServer.DedicatedServer.Cli.Initialize(args);
}
}
}

/* EOF */
Loading