Allow specific entities to bypass DoAfter delays (#17349)

* Allow specific entities to bypass DoAfter delays

This adds the InstantDoAfters tag to the admin ghost for mappers.

* Add specific player prototype for InteractionTest
This commit is contained in:
Vordenburg
2023-06-15 15:18:38 -04:00
committed by GitHub
parent 23b6d87a79
commit f8888b0960
4 changed files with 39 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ namespace Content.IntegrationTests.Tests.Interaction;
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)]
public abstract partial class InteractionTest
{
protected virtual string PlayerPrototype => "AdminObserver";
protected virtual string PlayerPrototype => "MobInteractionTestObserver";
protected PairTracker PairTracker = default!;
protected TestMapData MapData = default!;
@@ -118,7 +118,36 @@ public abstract partial class InteractionTest
[SetUp]
public virtual async Task Setup()
{
PairTracker = await PoolManager.GetServerClient(new PoolSettings());
const string TestPrototypes = @"
- type: entity
id: MobInteractionTestObserver
name: observer
noSpawn: true
save: false
description: Boo!
components:
- type: Access
groups:
- AllAccess
- type: Body
prototype: Aghost
- type: DoAfter
- type: Ghost
canInteract: true
- type: Hands
- type: Mind
- type: Stripping
- type: Tag
tags:
- CanPilot
- BypassInteractionRangeChecks
- type: Thieving
stripTimeReduction: 9999
stealthy: true
- type: UserInterface
";
PairTracker = await PoolManager.GetServerClient(new PoolSettings{ExtraPrototypes = TestPrototypes});
// server dependencies
SEntMan = Server.ResolveDependency<IEntityManager>();