diff --git a/Definition.cs b/Definition.cs new file mode 100644 index 0000000..40794c3 --- /dev/null +++ b/Definition.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using System.Linq; +using YamlDotNet.Serialization; + +namespace FastLink; + +public class Definition +{ + public string serverName = null!; + + public ushort port { get; set; } + + public string address { get; set; } = null!; + + public string password { get; set; } = ""; + + public static IEnumerable Parse(string yaml) => new DeserializerBuilder().IgnoreFields().Build().Deserialize>(yaml).Select(kv => + { + Definition def = kv.Value; + def.serverName = kv.Key; + return def; + }); + + public override string ToString() => $"Server(name={serverName},address={address},port={port})"; +} diff --git a/FastLink.csproj b/FastLink.csproj index 554d431..f288f1b 100644 --- a/FastLink.csproj +++ b/FastLink.csproj @@ -65,6 +65,9 @@ $(GamePath)\valheim_Data\Managed\publicized_assemblies\assembly_valheim_publicized.dll + + $(GamePath)\valheim_Data\Managed\publicized_assemblies\assembly_steamworks_publicized.dll + $(GamePath)\BepInEx\core\BepInEx.dll @@ -90,8 +93,12 @@ $(GamePath)\unstripped_corlib\UnityEngine.UI.dll + + packages\YamlDotNet.11.2.1\lib\net45\YamlDotNet.dll + + @@ -102,8 +109,19 @@ + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + +