diff --git a/Config.cs b/Config.cs index e175e62..d7e4d44 100644 --- a/Config.cs +++ b/Config.cs @@ -13,5 +13,8 @@ public class Config : IConfig public bool Debug { get; set; } = false; + public float Distance { get; set; } = 10.0f; + + public float HintDuration { get; set; } = 3f; } } diff --git a/ElevatorBC.cs b/ElevatorBC.cs index 1a23f35..a8709a7 100644 --- a/ElevatorBC.cs +++ b/ElevatorBC.cs @@ -18,7 +18,7 @@ public class ElevatorBC : Plugin public override string Name => "ElevatorBC"; - public override Version Version => new Version(1,0,0); + public override Version Version => new Version(1,1,0); public override string Prefix => "elevatorbc"; public override void OnEnabled() @@ -38,9 +38,9 @@ public void On914Activating(ActivatingEventArgs ev) { foreach (Player ply in Player.List) { - if (Vector3.Distance(ply.Position, Exiled.API.Features.Scp914.Transform.position) < 10.0f) + if (Vector3.Distance(ply.Position, Exiled.API.Features.Scp914.Transform.position) < Config.Distance) { - ply.ShowHint(Translation.Scp914Message.Replace("%NAME%", ev.Player.DisplayNickname).Replace("%MODE%",Exiled.API.Features.Scp914.KnobStatus.ToString())); + ply.ShowHint(Translation.Scp914Message.Replace("%NAME%", ev.Player.DisplayNickname).Replace("%MODE%",Exiled.API.Features.Scp914.KnobStatus.ToString()), Config.HintDuration); } } } @@ -49,9 +49,9 @@ public void OnPlayerInteractElevator(InteractingElevatorEventArgs ev) foreach (Player ply in Player.List) { - if (Vector3.Distance(ply.Position, ev.Elevator.gameObject.transform.position) < 10.0f) + if (Vector3.Distance(ply.Position, ev.Elevator.gameObject.transform.position) < Config.Distance) { - ply.ShowHint(Translation.ElevatorMessage.Replace("%NAME%", ev.Player.DisplayNickname)); + ply.ShowHint(Translation.ElevatorMessage.Replace("%NAME%", ev.Player.DisplayNickname), Config.HintDuration); } }