mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix comparing by name and not ID for entity prototype updates (#1578)
This commit is contained in:
@@ -441,9 +441,9 @@ namespace Robust.Shared.Prototypes
|
||||
return component == (Component) currentComponent;
|
||||
}
|
||||
|
||||
if (Name != entity.Prototype?.Name)
|
||||
if (ID != entity.Prototype?.ID)
|
||||
{
|
||||
Logger.Error($"Reloaded prototype used to update entity did not match entity's existing prototype: Expected '{entity.Prototype?.Name}', got '{Name}'");
|
||||
Logger.Error($"Reloaded prototype used to update entity did not match entity's existing prototype: Expected '{ID}', got '{entity.Prototype?.ID}'");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -469,11 +469,12 @@ namespace Robust.Shared.Prototypes
|
||||
factory) && Components.Keys.Contains(name))
|
||||
{
|
||||
ignoredComponents.Add(name);
|
||||
Logger.Debug(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
componentManager.RemoveComponent(entity.Uid, type);
|
||||
}
|
||||
|
||||
componentManager.CullRemovedComponents();
|
||||
|
||||
// Add new components
|
||||
|
||||
Reference in New Issue
Block a user