* Makes EnsureDirectory properly work for relative and absolute paths * Adds a `PathUtility.GetFullPath` which returns full paths for relative paths to `Core.BaseDirectory`. If the path is absolute, it will return as-is. * Moves EnsureDirectory to `PathUtility`. So `ScriptsHandler.EnsureDirectory` and `AssemblyHandler.EnsureDirectory` are now `PathUtility.EnsureDirectory` * Fixes crash guard so that it copies accounts properly. * Changes world save and auto archive to use a random folder name inside of the temp folder.
39 lines
863 B
C#
39 lines
863 B
C#
using System;
|
|
using System.Reflection;
|
|
using Server.Misc;
|
|
|
|
namespace Server.Tests
|
|
{
|
|
internal class ServerFixture : IDisposable
|
|
{
|
|
// Global setup
|
|
static ServerFixture()
|
|
{
|
|
Core.Assembly = Assembly.GetExecutingAssembly();
|
|
Core.LoopContext = new EventLoopContext();
|
|
Core.Expansion = Expansion.EJ;
|
|
|
|
// Load Configurations
|
|
ServerConfiguration.Load(true);
|
|
|
|
// Configure / Initialize
|
|
TestMapDefinitions.ConfigureTestMapDefinitions();
|
|
|
|
// Configure the world
|
|
World.Configure();
|
|
|
|
Timer.Init(0);
|
|
|
|
// Configure Races
|
|
RaceDefinitions.Configure();
|
|
|
|
// Load the world
|
|
World.Load();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Timer.Init(0);
|
|
}
|
|
}
|
|
}
|