(1968ab79f) v0.9.9.1

This commit is contained in:
Joonas Rikkonen
2020-04-30 14:09:23 +03:00
parent ac37a3b0e4
commit ce4ccd99ac
23 changed files with 131 additions and 55 deletions
@@ -166,6 +166,11 @@ namespace Barotrauma
private set;
}
public List<Entity> EntitiesBeforeGenerate { get; private set; } = new List<Entity>();
public int EntityCountBeforeGenerate { get; private set; }
public int EntityCountAfterGenerate { get; private set; }
public float Difficulty
{
get;
@@ -281,8 +286,11 @@ namespace Barotrauma
public void Generate(bool mirror)
{
if (loaded != null) loaded.Remove();
if (loaded != null) { loaded.Remove(); }
loaded = this;
EntitiesBeforeGenerate = GetEntityList();
EntityCountBeforeGenerate = EntitiesBeforeGenerate.Count();
levelObjectManager = new LevelObjectManager();
@@ -759,6 +767,8 @@ namespace Barotrauma
DebugConsole.NewMessage("Generated level with the seed " + seed + " (type: " + generationParams.Name + ")", Color.White);
}
EntityCountAfterGenerate = Entity.GetEntityList().Count();
//assign an ID to make entity events work
ID = FindFreeID();
}