feat(mosstank): add VTank-style automation PoC
This commit is contained in:
parent
f6fe0f2a4f
commit
4e6e9bc9d9
212 changed files with 49462 additions and 416 deletions
|
|
@ -8,6 +8,31 @@ namespace AcDream.Core.Net.Tests.Messages;
|
|||
|
||||
public sealed class InventoryActionsTests
|
||||
{
|
||||
[Fact]
|
||||
public void CreateTinkeringToolMatchesRetailToolThenPackableGuidList()
|
||||
{
|
||||
byte[] body = InventoryActions.BuildCreateTinkeringTool(
|
||||
7u,
|
||||
0x50000010u,
|
||||
[0x50000020u, 0x50000030u]);
|
||||
|
||||
Assert.Equal(28, body.Length);
|
||||
Assert.Equal(InventoryActions.GameActionEnvelope,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body));
|
||||
Assert.Equal(7u,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(4)));
|
||||
Assert.Equal(InventoryActions.CreateTinkeringToolOpcode,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(8)));
|
||||
Assert.Equal(0x50000010u,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(12)));
|
||||
Assert.Equal(2u,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(16)));
|
||||
Assert.Equal(0x50000020u,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(20)));
|
||||
Assert.Equal(0x50000030u,
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(body.AsSpan(24)));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildStackableMerge_CarriesBothGuidsAndAmount()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue