public bool Initialize(MapFile mf, EngineType et)
{
if (et == EngineType.AutoDetect)
{
Logger.Fatal("Engine type needs to be known by now!");
return(false);
}
Engine = et;
TheaterType = Theater.TheaterTypeFromString(mf.ReadString("Map", "Theater"));
FullSize = mf.FullSize;
LocalSize = mf.LocalSize;
_tiles = new TileLayer(FullSize.Size);
LoadAllObjects(mf);
if (!IgnoreLighting)
{
_lighting = mf.Lighting;
}
else
{
_lighting = new Lighting {
Level = 0.0
}
};
_wayPoints.AddRange(mf.Waypoints);
if (!LoadInis())
{
Logger.Fatal("Ini files couldn't be loaded");
return(false);
}
Logger.Info("Overriding rules.ini with map INI entries");
_rules.MergeWith(mf);
return(true);
}