feat: Splits Server in Core and Application (#1806)

> [!Note]
> **Developer Note**
> Now developers will only need to build/run the Application project instead of everything.
> When adding new projects, make sure to: 
> 1. Add a reference to that project in the Application project.
> 2. Add the dll file to the Distribution/Data/assemblies.json file

### Summary
- Adds an application project
- Consolidates process restarts to use `Core.Kill(true)`
- Removes some old messaging, for example processor optimization
- Fixes missing build cleanup
This commit is contained in:
Kamron Batman 2024-05-30 23:34:03 -07:00 • committed by GitHub
parent e85c56ec2d
commit 60a3a6f501
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 572 additions and 585 deletions

View file

@ -5,16 +5,16 @@ using Server.Items;
using Server.Multis;
using Server.Network;
namespace UOContent.Tests
namespace UOContent.Tests;
public sealed class MoveBoatHS : Packet
{
public sealed class MoveBoatHS : Packet
public MoveBoatHS(
Mobile beholder, BaseBoat boat, Direction d,
int speed, PooledRefList<IEntity> ents, int xOffset,
int yOffset
) : base(0xF6)
{
public MoveBoatHS(
Mobile beholder, BaseBoat boat, Direction d,
int speed, PooledRefList<IEntity> ents, int xOffset,
int yOffset
) : base(0xF6)
{
EnsureCapacity(3 + 15 + ents.Count * 10);
Stream.Write(boat.Serial);
@ -40,12 +40,12 @@ namespace UOContent.Tests
Stream.Seek(16, SeekOrigin.Begin);
Stream.Write((short)count);
}
}
}
public sealed class DisplayBoatHS : Packet
public sealed class DisplayBoatHS : Packet
{
public DisplayBoatHS(Mobile beholder, BaseBoat boat) : base(0xF7)
{
public DisplayBoatHS(Mobile beholder, BaseBoat boat) : base(0xF7)
{
var ents = boat.GetMovingEntities(true);
EnsureCapacity(3 + 2 + 5 * 26);
@ -128,5 +128,4 @@ namespace UOContent.Tests
Stream.Seek(3, SeekOrigin.Begin);
Stream.Write((short)count);
}
}
}
}

View file

@ -6,14 +6,14 @@ using Server.Tests;
using Server.Tests.Network;
using Xunit;
namespace UOContent.Tests
namespace UOContent.Tests;
public class HousePacketTests
{
public class HousePacketTests
[Theory]
[InlineData(0x1001u)]
public void TestBeginHouseCustomization(uint serial)
{
[Theory]
[InlineData(0x1001u)]
public void TestBeginHouseCustomization(uint serial)
{
var expected = new BeginHouseCustomization((Serial)serial).Compile();
var ns = PacketTestUtilities.CreateTestNetState();
@ -23,10 +23,10 @@ namespace UOContent.Tests
AssertThat.Equal(result, expected);
}
[Theory]
[InlineData(0x1001u)]
public void TestEndHouseCustomization(uint serial)
{
[Theory]
[InlineData(0x1001u)]
public void TestEndHouseCustomization(uint serial)
{
var expected = new EndHouseCustomization((Serial)serial).Compile();
var ns = PacketTestUtilities.CreateTestNetState();
@ -36,11 +36,11 @@ namespace UOContent.Tests
AssertThat.Equal(result, expected);
}
[Theory]
[InlineData(0x1001u, 0)]
[InlineData(0x1001u, 100)]
public void TestDesignStateGeneral(uint serial, int revision)
{
[Theory]
[InlineData(0x1001u, 0)]
[InlineData(0x1001u, 100)]
public void TestDesignStateGeneral(uint serial, int revision)
{
var expected = new DesignStateGeneral((Serial)serial, revision).Compile();
var ns = PacketTestUtilities.CreateTestNetState();
@ -50,9 +50,9 @@ namespace UOContent.Tests
AssertThat.Equal(result, expected);
}
[Fact]
public void TestHouseDesignStateDetailed()
{
[Fact]
public void TestHouseDesignStateDetailed()
{
Serial serial = (Serial)0x40000001;
var revision = 10;
var tiles = new MultiTileEntry[250];
@ -76,5 +76,4 @@ namespace UOContent.Tests
AssertThat.Equal(actual, expected);
}
}
}
}