Add buildable plastic flaps (#6583)
Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user