Add interaction tests for mousetraps (#35502)
* Add interaction tests for mousetraps * Silly yaml linter * review * fix debugging thing --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -169,6 +169,12 @@ public abstract partial class InteractionTest
|
||||
/// <param name="enableToggleable">Whether or not to automatically enable any toggleable items</param>
|
||||
protected async Task<NetEntity> PlaceInHands(EntitySpecifier entity, bool enableToggleable = true)
|
||||
{
|
||||
if (Hands == null)
|
||||
{
|
||||
Assert.Fail("No HandsComponent");
|
||||
return default;
|
||||
}
|
||||
|
||||
if (Hands.ActiveHandId == null)
|
||||
{
|
||||
Assert.Fail("No active hand");
|
||||
@@ -210,6 +216,12 @@ public abstract partial class InteractionTest
|
||||
{
|
||||
entity ??= Target;
|
||||
|
||||
if (Hands == null)
|
||||
{
|
||||
Assert.Fail("No HandsComponent");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Hands.ActiveHandId == null)
|
||||
{
|
||||
Assert.Fail("No active hand");
|
||||
@@ -860,7 +872,7 @@ public abstract partial class InteractionTest
|
||||
/// List of currently active DoAfters on the player.
|
||||
/// </summary>
|
||||
protected IEnumerable<Shared.DoAfter.DoAfter> ActiveDoAfters
|
||||
=> DoAfters.DoAfters.Values.Where(x => !x.Cancelled && !x.Completed);
|
||||
=> DoAfters?.DoAfters.Values.Where(x => !x.Cancelled && !x.Completed) ?? [];
|
||||
|
||||
#region Component
|
||||
|
||||
|
||||
Reference in New Issue
Block a user