Add buildable plastic flaps (#6583)

Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
Fishfish458
2022-02-21 23:01:58 -06:00
committed by GitHub
parent 8d111c8959
commit df53d50721
19 changed files with 159 additions and 33 deletions

View File

@@ -7,6 +7,8 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using Robust.Shared.Physics;
using Content.Shared.Physics;
namespace Content.Shared.Standing
{
@@ -62,6 +64,14 @@ namespace Content.Shared.Standing
// Seemed like the best place to put it
appearance?.SetData(RotationVisuals.RotationState, RotationState.Horizontal);
if (TryComp(uid, out FixturesComponent? fixtureComponent))
{
foreach (var fixture in fixtureComponent.Fixtures.Values)
{
fixture.CollisionMask &= ~(int) CollisionGroup.VaultImpassable;
}
}
// Currently shit is only downed by server but when it's predicted we can probably only play this on server / client
// > no longer true with door crushing. There just needs to be a better way to handle audio prediction.
if (playSound)
@@ -97,6 +107,15 @@ namespace Content.Shared.Standing
RaiseLocalEvent(uid, new StoodEvent(), false);
appearance?.SetData(RotationVisuals.RotationState, RotationState.Vertical);
if (TryComp(uid, out FixturesComponent? fixtureComponent))
{
foreach (var fixture in fixtureComponent.Fixtures.Values)
{
fixture.CollisionMask |= (int) CollisionGroup.VaultImpassable;
}
}
return true;
}
}