(c445db0f5) Lazy load item & structure sprites (loaded automatically when switching to the sub editor or instantiating an item/structure, so should not cause any mid-game freezes).

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:09:32 +03:00
parent 66fa81bd3d
commit 1966bcb4ab
22 changed files with 133 additions and 584 deletions
@@ -276,9 +276,10 @@ namespace Barotrauma
}
StairDirection = Prefab.StairDirection;
SerializableProperties = SerializableProperty.GetProperties(this);
InitProjSpecific();
if (Prefab.Body)
{
Bodies = new List<Body>();
@@ -307,6 +308,8 @@ namespace Barotrauma
InsertToList();
}
partial void InitProjSpecific();
public override string ToString()
{
return Name;