Adds settings (#126)

This commit is contained in:
Kamron Batman 2020-05-02 23:41:30 -07:00 • committed by GitHub
parent 8028a85ffe
commit f336a56364
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 229 additions and 99 deletions

View file

@ -5,9 +5,7 @@ namespace Server
{
public class PathFollower
{
// Should we use pathfinding? 'false' for not
private static readonly bool Enabled = true;
private static bool Enabled;
private static readonly TimeSpan RepathDelay = TimeSpan.FromSeconds(2.0);
private readonly Mobile m_From;
@ -16,6 +14,11 @@ namespace Server
private Point3D m_Next, m_LastGoalLoc;
private MovementPath m_Path;
public static void Initialize()
{
Enabled = ServerConfiguration.GetOrUpdateSetting("pathfinding.enabled", true);
}
public PathFollower(Mobile from, IPoint3D goal)
{
m_From = from;