Fixed IdCollision HandshakeResponse will not send

Added ConnectToHost auto try NetID feature
This commit is contained in:
kmyuhkyuk
2026-03-08 23:27:41 +08:00
parent b4403b4d16
commit ac1c274b02
3 changed files with 115 additions and 20 deletions
@@ -22,27 +22,9 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
public bool IsIPAndPort => IPAndPortRegex().IsMatch(Text);
public string? IPAddress
{
get
{
if (IsOnlyIP)
return Text;
public string? IPAddress => IsOnlyIP ? Text : IsIPAndPort ? Text.Split(':').First() : null;
return IsIPAndPort ? Text.Split(':').First() : null;
}
}
public ushort? Port
{
get
{
if (IsIPAndPort)
return Convert.ToUInt16(Text.Split(':').Last());
return null;
}
}
public ushort? Port => IsIPAndPort ? Convert.ToUInt16(Text.Split(':').Last()) : null;
public override void _Ready()
{