Rotate DefaultGrid on round start (#4957)

* Rotate DefaultGrid on round start

Not ideal long-term but good for bugspotting short-term.

* Fix buckle test

Because gridtraversal was being triggered the pos was being fucked when moving back

* Fix buckle

* Buckle offset
This commit is contained in:
metalgearsloth
2021-10-25 15:22:57 +11:00
committed by GitHub
parent b60dea5c21
commit 0f513f64fb
5 changed files with 25 additions and 19 deletions

View File

@@ -103,7 +103,7 @@ namespace Content.IntegrationTests.Tests.Buckle
Assert.False(actionBlocker.CanMove(human));
Assert.False(actionBlocker.CanChangeDirection(human));
Assert.False(EffectBlockerSystem.CanFall(human));
Assert.That(human.Transform.WorldPosition, Is.EqualTo(chair.Transform.WorldPosition));
Assert.That((human.Transform.WorldPosition - chair.Transform.WorldPosition).Length, Is.LessThanOrEqualTo(buckle.BuckleOffset.Length));
// Side effects of buckling for the strap
Assert.That(strap.BuckledEntities, Does.Contain(human));
@@ -333,7 +333,7 @@ namespace Content.IntegrationTests.Tests.Buckle
Assert.True(buckle.Buckled);
// Move the buckled entity away
human.Transform.LocalPosition += (100, 0);
human.Transform.WorldPosition += (100, 0);
});
await WaitUntil(server, () => !buckle.Buckled, 10);
@@ -343,7 +343,7 @@ namespace Content.IntegrationTests.Tests.Buckle
await server.WaitAssertion(() =>
{
// Move the now unbuckled entity back onto the chair
human.Transform.LocalPosition -= (100, 0);
human.Transform.WorldPosition -= (100, 0);
// Buckle
Assert.True(buckle.TryBuckle(human, chair));