Updates to .NET Core 3.1 & Cleanup (#79)

This commit is contained in:
Kamron Batman 2020-01-19 12:47:34 -08:00 committed by GitHub
parent 57b14ad690
commit de74218b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 100 additions and 188 deletions

View file

@ -11,8 +11,8 @@ Some of the many high level goals include:
### Networking ### Networking
- [ ] Replace Packet classes with functions - [ ] Replace Packet classes with functions
- [ ] Improve asynchronous socket handling using Pipes - [X] Improve asynchronous socket handling using Pipes
- [ ] Improve socket handling (2-5x) and event loop using libuv - [X] Improve socket handling (2-5x) and event loop using libuv
### Administration ### Administration
- [ ] Move IP logging and account data to SQL - [ ] Move IP logging and account data to SQL
@ -37,7 +37,7 @@ Some of the many high level goals include:
- [ ] Create object pools for high availability items such as gold and reagents - [ ] Create object pools for high availability items such as gold and reagents
* For example, `new MandrakeRoot()` -> `ObjectPool.Get<Reagent>(ReagentType.MandrakeRoot)`. * For example, `new MandrakeRoot()` -> `ObjectPool.Get<Reagent>(ReagentType.MandrakeRoot)`.
* Pools should be elastic and adjust according to nominal usage. For example, if thousands of gold objects are created and destroyed in a small period of time, the pool should be expanded and replenished properly so it is never empty, or full. * Pools should be elastic and adjust according to nominal usage. For example, if thousands of gold objects are created and destroyed in a small period of time, the pool should be expanded and replenished properly so it is never empty, or full.
- [ ] Replace timer system with a [wheel](https://github.com/runuo/runuo/pull/42) implementation - [ ] Replace timer system with libuv implementation
- [X] Create `DefaultName` for mobiles - [X] Create `DefaultName` for mobiles
### Plugins (Separate Repos & Optional) ### Plugins (Separate Repos & Optional)

View file

@ -171,7 +171,7 @@ namespace Server.Misc
op.WriteLine("Server Crash Report"); op.WriteLine("Server Crash Report");
op.WriteLine("==================="); op.WriteLine("===================");
op.WriteLine(); op.WriteLine();
op.WriteLine("RunUO Version {0}.{1}, Build {2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision); op.WriteLine("ModernUO Version {0}.{1}, Build {2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision);
op.WriteLine("Operating System: {0}", Environment.OSVersion); op.WriteLine("Operating System: {0}", Environment.OSVersion);
op.WriteLine(".NET Framework: {0}", Environment.Version); op.WriteLine(".NET Framework: {0}", Environment.Version);
op.WriteLine("Time: {0}", DateTime.UtcNow); op.WriteLine("Time: {0}", DateTime.UtcNow);

View file

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using System.Net; using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using System.Net.Sockets; using System.Net.Sockets;
@ -39,9 +40,9 @@ namespace Server.Misc
*/ */
public static readonly string Address = null; public static readonly string Address = null;
public static readonly string ServerName = "RunUO TC"; public const string ServerName = "ModernUO TC";
public static readonly bool AutoDetect = true; public const bool AutoDetect = true;
private static IPAddress m_PublicAddress; private static IPAddress m_PublicAddress;
@ -120,65 +121,23 @@ namespace Server.Misc
} }
} }
private static bool HasPublicIPAddress() private static bool HasPublicIPAddress() =>
{ NetworkInterface.GetAllNetworkInterfaces().Select(adapter => adapter.GetIPProperties())
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); .Any(properties => properties.UnicastAddresses.Select(unicast => unicast.Address)
.Any(ip => !IPAddress.IsLoopback(ip) && ip.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork(ip)));
foreach (NetworkInterface adapter in adapters) // 10.0.0.0/8
{ // 172.16.0.0/12
IPInterfaceProperties properties = adapter.GetIPProperties(); // 192.168.0.0/16
// 169.254.0.0/16
foreach (IPAddressInformation unicast in properties.UnicastAddresses) // 100.64.0.0/10 RFC 6598
{ private static bool IsPrivateNetwork(IPAddress ip) =>
IPAddress ip = unicast.Address; ip.AddressFamily != AddressFamily.InterNetworkV6 &&
(Utility.IPMatch("192.168.*", ip) ||
if (!IPAddress.IsLoopback(ip) && ip.AddressFamily != AddressFamily.InterNetworkV6 && Utility.IPMatch("10.*", ip) ||
!IsPrivateNetwork(ip)) Utility.IPMatch("172.16-31.*", ip) ||
return true; Utility.IPMatch("169.254.*", ip) ||
} Utility.IPMatch("100.64-127.*", ip));
}
return false;
/*
IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );
IPAddress[] ips = iphe.AddressList;
for ( int i = 0; i < ips.Length; ++i )
{
if ( ips[i].AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork( ips[i] ) )
return true;
}
return false;
*/
}
private static bool IsPrivateNetwork(IPAddress ip)
{
// 10.0.0.0/8
// 172.16.0.0/12
// 192.168.0.0/16
// 169.254.0.0/16
// 100.64.0.0/10 RFC 6598
if (ip.AddressFamily == AddressFamily.InterNetworkV6)
return false;
if (Utility.IPMatch("192.168.*", ip))
return true;
if (Utility.IPMatch("10.*", ip))
return true;
if (Utility.IPMatch("172.16-31.*", ip))
return true;
if (Utility.IPMatch("169.254.*", ip))
return true;
if (Utility.IPMatch("100.64-127.*", ip))
return true;
return false;
}
private static IPAddress FindPublicAddress() private static IPAddress FindPublicAddress()
{ {
@ -194,7 +153,7 @@ namespace Server.Misc
StreamReader sr = new StreamReader(s); StreamReader sr = new StreamReader(s);
IPAddress ip = IPAddress.Parse(sr.ReadLine()); IPAddress ip = IPAddress.Parse(sr.ReadLine() ?? "");
sr.Close(); sr.Close();
s.Close(); s.Close();

View file

@ -2,30 +2,28 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
<PropertyGroup> <PropertyGroup>
<RootNamespace>Server</RootNamespace> <RootNamespace>Server</RootNamespace>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Scripts.CS</AssemblyName> <AssemblyName>Scripts.CS</AssemblyName>
<Authors>Kamron Batman</Authors>
<Company>ModernUO</Company>
<Product>ModernUO Scripts</Product>
<Copyright>2019-2020</Copyright>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<UseNETCoreGenerator>true</UseNETCoreGenerator> <UseNETCoreGenerator>true</UseNETCoreGenerator>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<WarningsAsErrors /> <WarningsAsErrors />
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<OutDir>..\..\Distribution\Assemblies</OutDir> <OutDir>..\..\Distribution\Assemblies</OutDir>
<OutputPath>..\..\Distribution\Assemblies</OutputPath> <OutputPath>..\..\Distribution\Assemblies</OutputPath>
<PublishDir>..\..\Distribution\Assemblies</PublishDir> <PublishDir>..\..\Distribution\Assemblies</PublishDir>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>true</Optimize>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutDir>..\..\Distribution\Assemblies</OutDir>
<OutputPath>..\..\Distribution\Assemblies</OutputPath>
<PublishDir>..\..\Distribution\Assemblies</PublishDir>
<WarningsAsErrors />
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="SpecialSystems\README.TXT" /> <Content Include="SpecialSystems\README.TXT" />
@ -37,6 +35,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MailKit" Version="2.4.1" /> <PackageReference Include="MailKit" Version="2.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -161,7 +161,7 @@ namespace Server.Misc
AddBackground(0, 0, 160, 120, 5054); AddBackground(0, 0, 160, 120, 5054);
AddButton(10, 10, 0xFB7, 0xFB9, 1); AddButton(10, 10, 0xFB7, 0xFB9, 1);
AddLabel(45, 10, 0x34, "RunUO"); AddLabel(45, 10, 0x34, "ModernUO");
AddButton(10, 35, 0xFB7, 0xFB9, 2); AddButton(10, 35, 0xFB7, 0xFB9, 2);
AddLabel(45, 35, 0x34, "List of skills"); AddLabel(45, 35, 0x34, "List of skills");

View file

@ -4125,10 +4125,7 @@ namespace Server
Spawner = null; Spawner = null;
} }
public virtual bool CheckSpellCast(ISpell spell) public virtual bool CheckSpellCast(ISpell spell) => true;
{
return true;
}
/// <summary> /// <summary>
/// Overridable. Virtual event invoked when the Mobile casts a <paramref name="spell" />. /// Overridable. Virtual event invoked when the Mobile casts a <paramref name="spell" />.
@ -4415,10 +4412,7 @@ namespace Server
} }
} }
public virtual bool CheckTarget(Mobile from, Target targ, object targeted) public virtual bool CheckTarget(Mobile from, Target targ, object targeted) => true;
{
return true;
}
public virtual void Use(Item item) public virtual void Use(Item item)
{ {
@ -4853,10 +4847,7 @@ namespace Server
StringBuilder sb = new StringBuilder(text.Length, text.Length); StringBuilder sb = new StringBuilder(text.Length, text.Length);
for (int i = 0; i < text.Length; ++i) for (int i = 0; i < text.Length; ++i)
if (text[i] != ' ') sb.Append(text[i] != ' ' ? GhostChars[Utility.Random(GhostChars.Length)] : ' ');
sb.Append(GhostChars[Utility.Random(GhostChars.Length)]);
else
sb.Append(' ');
text = sb.ToString(); text = sb.ToString();
context = m_GhostMutateContext; context = m_GhostMutateContext;
@ -4930,6 +4921,22 @@ namespace Server
YellHue = hue; YellHue = hue;
range = 18; range = 18;
break; break;
case MessageType.System:
break;
case MessageType.Label:
break;
case MessageType.Focus:
break;
case MessageType.Spell:
break;
case MessageType.Guild:
break;
case MessageType.Alliance:
break;
case MessageType.Command:
break;
case MessageType.Encoded:
break;
default: default:
type = MessageType.Regular; type = MessageType.Regular;
break; break;
@ -5069,10 +5076,7 @@ namespace Server
} }
} }
public static Mobile GetDamagerFrom(DamageEntry de) public static Mobile GetDamagerFrom(DamageEntry de) => de?.Damager;
{
return de?.Damager;
}
public Mobile FindMostRecentDamager(bool allowSelf) public Mobile FindMostRecentDamager(bool allowSelf)
{ {
@ -5097,10 +5101,7 @@ namespace Server
return null; return null;
} }
public Mobile FindLeastRecentDamager(bool allowSelf) public Mobile FindLeastRecentDamager(bool allowSelf) => GetDamagerFrom(FindLeastRecentDamageEntry(allowSelf));
{
return GetDamagerFrom(FindLeastRecentDamageEntry(allowSelf));
}
public DamageEntry FindLeastRecentDamageEntry(bool allowSelf) public DamageEntry FindLeastRecentDamageEntry(bool allowSelf)
{ {
@ -5125,10 +5126,7 @@ namespace Server
return null; return null;
} }
public Mobile FindMostTotalDamger(bool allowSelf) public Mobile FindMostTotalDamager(bool allowSelf) => GetDamagerFrom(FindMostTotalDamageEntry(allowSelf));
{
return GetDamagerFrom(FindMostTotalDamageEntry(allowSelf));
}
public DamageEntry FindMostTotalDamageEntry(bool allowSelf) public DamageEntry FindMostTotalDamageEntry(bool allowSelf)
{ {
@ -5150,10 +5148,7 @@ namespace Server
return mostTotal; return mostTotal;
} }
public Mobile FindLeastTotalDamger(bool allowSelf) public Mobile FindLeastTotalDamager(bool allowSelf) => GetDamagerFrom(FindLeastTotalDamageEntry(allowSelf));
{
return GetDamagerFrom(FindLeastTotalDamageEntry(allowSelf));
}
public DamageEntry FindLeastTotalDamageEntry(bool allowSelf) public DamageEntry FindLeastTotalDamageEntry(bool allowSelf)
{ {
@ -7238,11 +7233,11 @@ namespace Server
string val; string val;
if (prefix.Length > 0 && suffix.Length > 0) if (prefix.Length > 0 && suffix.Length > 0)
val = string.Concat(prefix, " ", name, " ", suffix); val = $"{prefix} {name} {suffix}";
else if (prefix.Length > 0) else if (prefix.Length > 0)
val = string.Concat(prefix, " ", name); val = $"{prefix} {name}";
else if (suffix.Length > 0) else if (suffix.Length > 0)
val = string.Concat(name, " ", suffix); val = $"{name} {suffix}";
else else
val = name; val = name;

View file

@ -1478,7 +1478,6 @@ namespace Server.Network
{ {
int packetID = pvSrc.ReadUInt16(); int packetID = pvSrc.ReadUInt16();
Console.WriteLine("Extended Packet: {0:X}", packetID);
PacketHandler ph = GetExtendedHandler(packetID); PacketHandler ph = GetExtendedHandler(packetID);
if (ph == null) if (ph == null)

View file

@ -7,36 +7,29 @@
</StartupObject> </StartupObject>
<AssemblyName>ModernUO</AssemblyName> <AssemblyName>ModernUO</AssemblyName>
<Win32Resource /> <Win32Resource />
<Version>0.1.2</Version> <Version>0.2.1</Version>
<Authors>Kamron Batman</Authors> <Authors>Kamron Batman</Authors>
<Company>ModernUO</Company> <Company>ModernUO</Company>
<Product>ModernUO</Product> <Product>ModernUO Server</Product>
<Copyright>2019</Copyright> <Copyright>2019-2020</Copyright>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<UseNETCoreGenerator>true</UseNETCoreGenerator> <UseNETCoreGenerator>true</UseNETCoreGenerator>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>8.0</LangVersion>
<PublishDir>..\..\Distribution</PublishDir>
<OutDir>..\..\Distribution</OutDir>
<OutputPath>..\..\Distribution</OutputPath>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<WarningsAsErrors />
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PublishDir>..\..\Distribution</PublishDir>
<OutDir>..\..\Distribution</OutDir>
<OutputPath>..\..\Distribution</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>8.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <Optimize>true</Optimize>
<WarningsAsErrors />
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PlatformTarget>x64</PlatformTarget>
<PublishDir>..\..\Distribution</PublishDir>
<OutDir>..\..\Distribution</OutDir>
<OutputPath>..\..\Distribution</OutputPath>
<LangVersion>8.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="Assemblies\libdrng.dll" Condition="'$(OS)' == 'Windows_NT'"> <Content Include="Assemblies\libdrng.dll" Condition="'$(OS)' == 'Windows_NT'">
@ -53,11 +46,11 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.1" />
<PackageReference Include="System.IO.Pipelines" Version="4.7.0" /> <PackageReference Include="System.IO.Pipelines" Version="4.7.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -71,10 +71,7 @@ namespace Server
if (!m_PrioritySet) if (!m_PrioritySet)
{ {
if (count == 1) m_Priority = ComputePriority(count == 1 ? delay : interval);
m_Priority = ComputePriority(delay);
else
m_Priority = ComputePriority(interval);
m_PrioritySet = true; m_PrioritySet = true;
} }
@ -130,13 +127,8 @@ namespace Server
public virtual bool DefRegCreation => true; public virtual bool DefRegCreation => true;
private static string FormatDelegate(Delegate callback) private static string FormatDelegate(Delegate callback) =>
{ callback == null ? "null" : $"{callback.Method.DeclaringType?.FullName ?? ""}.{callback.Method.Name}";
if (callback == null)
return "null";
return $"{callback.Method.DeclaringType?.FullName ?? ""}.{callback.Method.Name}";
}
public static void DumpInfo(TextWriter tw) public static void DumpInfo(TextWriter tw)
{ {

View file

@ -22,6 +22,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
@ -312,15 +313,13 @@ namespace Server
bytes[i] = (byte)part; bytes[i] = (byte)part;
} }
uint cidrPrefix = OrderedAddressValue(bytes); return IPMatchCIDR(OrderedAddressValue(bytes), ip, cidrLength);
return IPMatchCIDR(cidrPrefix, ip, cidrLength);
} }
public static bool IPMatchCIDR(IPAddress cidrPrefix, IPAddress ip, int cidrLength) public static bool IPMatchCIDR(IPAddress cidrPrefix, IPAddress ip, int cidrLength)
{ {
if (cidrPrefix == null || ip == null || cidrPrefix.AddressFamily == AddressFamily.InterNetworkV6 //Ignore IPv6 for now
) //Ignore IPv6 for now if (cidrPrefix == null || ip == null || cidrPrefix.AddressFamily == AddressFamily.InterNetworkV6)
return false; return false;
uint cidrValue = SwapUnsignedInt((uint)GetLongAddressValue(cidrPrefix)); uint cidrValue = SwapUnsignedInt((uint)GetLongAddressValue(cidrPrefix));
@ -517,26 +516,11 @@ namespace Server
int adx = Math.Abs(dx); int adx = Math.Abs(dx);
int ady = Math.Abs(dy); int ady = Math.Abs(dy);
if (adx >= ady * 3) if (adx >= ady * 3) return dx > 0 ? Direction.East : Direction.West;
{
if (dx > 0)
return Direction.East;
return Direction.West;
}
if (ady >= adx * 3) if (ady >= adx * 3) return dy > 0 ? Direction.South : Direction.North;
{
if (dy > 0)
return Direction.South;
return Direction.North;
}
if (dx > 0) if (dx > 0) return dy > 0 ? Direction.Down : Direction.Right;
{
if (dy > 0)
return Direction.Down;
return Direction.Right;
}
return dy > 0 ? Direction.Left : Direction.Up; return dy > 0 ? Direction.Left : Direction.Up;
} }
@ -779,27 +763,16 @@ namespace Server
m.FacialHairHue = m.Race.RandomHairHue(); m.FacialHairHue = m.Race.RandomHairHue();
} }
public static List<TOutput> CastListContravariant<TInput, TOutput>(List<TInput> list) where TInput : TOutput public static List<TOutput> CastListContravariant<TInput, TOutput>(List<TInput> list) where TInput : TOutput =>
{ list.ConvertAll(value => (TOutput)value);
return list.ConvertAll(value => (TOutput)value);
}
public static List<TOutput> CastListCovariant<TInput, TOutput>(List<TInput> list) where TOutput : TInput public static List<TOutput> CastListCovariant<TInput, TOutput>(List<TInput> list) where TOutput : TInput =>
{ list.ConvertAll(value => (TOutput)value);
return list.ConvertAll(value => (TOutput)value);
}
public static List<TOutput> SafeConvertList<TInput, TOutput>(List<TInput> list) where TOutput : class public static List<TOutput> SafeConvertList<TInput, TOutput>(List<TInput> list) where TOutput : class
{ {
List<TOutput> output = new List<TOutput>(list.Capacity); List<TOutput> output = new List<TOutput>(list.Capacity);
output.AddRange(list.OfType<TOutput>());
for (int i = 0; i < list.Count; i++)
{
TOutput t = list[i] as TOutput;
if (t != null)
output.Add(t);
}
return output; return output;
} }

1
Publish-Linux.sh Normal file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=Linux

1
Publish-OSX.sh Normal file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=OSX

1
Publish-Windows.cmd Normal file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=Windows

View file

@ -12,7 +12,7 @@ Ultima Online Server Emulator for the modern era!
- See [Goals](./GOALS.md) - See [Goals](./GOALS.md)
# Requirements to Compile # Requirements to Compile
- [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0) - [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1)
### Requirements to Run ### Requirements to Run
@ -23,7 +23,7 @@ Ultima Online Server Emulator for the modern era!
- `brew install zlib libuv` - `brew install zlib libuv`
- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng) - Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng)
### Building with .NET Core 3.0 SDK ### Building with .NET Core SDK
`dotnet publish /p:PublishProfile=[platform][-SelfContained]` `dotnet publish /p:PublishProfile=[platform][-SelfContained]`
- `platform` can be `Windows`, `Linux`, or `OSX` (capitalization matters) - `platform` can be `Windows`, `Linux`, or `OSX` (capitalization matters)
- Appending `-SelfContained` will export all .NET Core files required to run portably. - Appending `-SelfContained` will export all .NET Core files required to run portably.