Add some tests and fix some miscellaneous bugs (#22836)

* Add some tests and fix some bugs

* Add more helper methods

* remove submodule

* fix merge

* also fix DirtyAll()

* poke
This commit is contained in:
Leon Friedrich
2023-12-27 18:05:20 -05:00
committed by GitHub
parent 44adc32613
commit 35ba42af9c
14 changed files with 292 additions and 37 deletions

View File

@@ -5,12 +5,12 @@ using Content.Client.Construction;
using Content.Client.Examine;
using Content.IntegrationTests.Pair;
using Content.Server.Body.Systems;
using Content.Server.Hands.Systems;
using Content.Server.Stack;
using Content.Server.Tools;
using Content.Shared.Body.Part;
using Content.Shared.DoAfter;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Server.Item;
using Content.Shared.Mind;
@@ -66,6 +66,9 @@ public abstract partial class InteractionTest
/// </summary>
protected NetEntity Player;
protected EntityUid SPlayer => ToServer(Player);
protected EntityUid CPlayer => ToClient(Player);
protected ICommonSession ClientSession = default!;
protected ICommonSession ServerSession = default!;
@@ -81,6 +84,9 @@ public abstract partial class InteractionTest
/// </remarks>
protected NetEntity? Target;
protected EntityUid? STarget => ToServer(Target);
protected EntityUid? CTarget => ToClient(Target);
/// <summary>
/// When attempting to start construction, this is the client-side ID of the construction ghost.
/// </summary>
@@ -93,7 +99,7 @@ public abstract partial class InteractionTest
protected IPrototypeManager ProtoMan = default!;
protected IGameTiming STiming = default!;
protected IComponentFactory Factory = default!;
protected SharedHandsSystem HandSys = default!;
protected HandsSystem HandSys = default!;
protected StackSystem Stack = default!;
protected SharedInteractionSystem InteractSys = default!;
protected Content.Server.Construction.ConstructionSystem SConstruction = default!;
@@ -152,7 +158,7 @@ public abstract partial class InteractionTest
ProtoMan = Server.ResolveDependency<IPrototypeManager>();
Factory = Server.ResolveDependency<IComponentFactory>();
STiming = Server.ResolveDependency<IGameTiming>();
HandSys = SEntMan.System<SharedHandsSystem>();
HandSys = SEntMan.System<HandsSystem>();
InteractSys = SEntMan.System<SharedInteractionSystem>();
ToolSys = SEntMan.System<ToolSystem>();
ItemToggleSys = SEntMan.System<SharedItemToggleSystem>();