Core - Update AbstractModelContainer

This commit is contained in:
miku-666
2026-01-16 15:34:41 +01:00
parent 2a7885273a
commit 89d94489cd
2 changed files with 5 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ namespace PckStudio.Core.Model
private IDictionary<string, AbstractModel> _models = new Dictionary<string, AbstractModel>();
public AbstractModel GetModelByName(string name) => _models[name];
public bool AddModel(AbstractModel model)
{
if (model == null || _models.ContainsKey(model.Name))
@@ -32,7 +33,7 @@ namespace PckStudio.Core.Model
public bool RemoveModel(AbstractModel model) => model is not null && _models.Remove(model.Name);
public static AbstractModelContainer FromModelContainer(OMI.Formats.Model.ModelContainer models, ITryGet<string, Image> texture)
public static AbstractModelContainer FromModelContainer(ModelContainer models, ITryGet<string, Image> texture)
{
var abstractModelContainer = new AbstractModelContainer();
if (models is null)