Fix small misc. turnstile issues (#36893)
* Fix small misc. turnstile issues * more missing things * quieter
This commit is contained in:
@@ -61,7 +61,13 @@ public sealed partial class TurnstileComponent : Component
|
||||
/// Sound to play when the turnstile denies entry
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public SoundSpecifier? DenySound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
|
||||
public SoundSpecifier? DenySound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg")
|
||||
{
|
||||
Params = new()
|
||||
{
|
||||
Volume = -7,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -120,8 +120,12 @@ public abstract partial class SharedTurnstileSystem : EntitySystem
|
||||
var approachAngle = (pos - otherPos).ToAngle();
|
||||
var rotateAngle = rot.ToWorldVec().ToAngle();
|
||||
|
||||
var dif = Math.Min(Math.Abs(approachAngle.Theta - rotateAngle.Theta), Math.Abs(rotateAngle.Theta - approachAngle.Theta));
|
||||
return dif < Math.PI / 4;
|
||||
var diff = Math.Abs(approachAngle - rotateAngle);
|
||||
diff %= MathHelper.TwoPi;
|
||||
if (diff > Math.PI)
|
||||
diff = MathHelper.TwoPi - diff;
|
||||
|
||||
return diff < Math.PI / 4;
|
||||
}
|
||||
|
||||
protected virtual void PlayAnimation(EntityUid uid, string stateId)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
suffix: Genpop Enter
|
||||
components:
|
||||
- type: AccessReader
|
||||
access: [["GenpopEnter"]]
|
||||
access: [["GenpopEnter"], ["Security"]]
|
||||
|
||||
- type: entity
|
||||
id: TurnstileGenpopLeave
|
||||
@@ -92,4 +92,4 @@
|
||||
suffix: Genpop Leave
|
||||
components:
|
||||
- type: AccessReader
|
||||
access: [["GenpopLeave"]]
|
||||
access: [["GenpopLeave"], ["Security"]]
|
||||
|
||||
Reference in New Issue
Block a user