Inline Prototype

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:13:58 +01:00
parent cd43196ea8
commit 70bbd8c502
18 changed files with 54 additions and 38 deletions

View File

@@ -32,7 +32,7 @@ namespace Content.Server.Administration.Commands
foreach (var entity in entityManager.GetEntities())
{
if (checkPrototype && entity.Prototype != prototype || entity.Prototype == null)
if (checkPrototype && IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityPrototype != prototype || IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityPrototype == null)
{
continue;
}
@@ -41,7 +41,7 @@ namespace Content.Server.Administration.Commands
foreach (var component in entity.GetAllComponents())
{
if (entity.Prototype.Components.ContainsKey(component.Name))
if (IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityPrototype.Components.ContainsKey(component.Name))
continue;
entityManager.RemoveComponent(entity.Uid, component);