Clean up all missing EntitySystem proxy method uses (#38353)
This commit is contained in:
@@ -120,7 +120,7 @@ namespace Content.Shared.StatusEffect
|
||||
if (HasComp<T>(uid))
|
||||
return true;
|
||||
|
||||
EntityManager.AddComponent<T>(uid);
|
||||
AddComp<T>(uid);
|
||||
status.ActiveEffects[key].RelevantComponent = Factory.GetComponentName<T>();
|
||||
return true;
|
||||
|
||||
@@ -136,10 +136,10 @@ namespace Content.Shared.StatusEffect
|
||||
if (TryAddStatusEffect(uid, key, time, refresh, status))
|
||||
{
|
||||
// If they already have the comp, we just won't bother updating anything.
|
||||
if (!EntityManager.HasComponent(uid, Factory.GetRegistration(component).Type))
|
||||
if (!HasComp(uid, Factory.GetRegistration(component).Type))
|
||||
{
|
||||
var newComponent = (Component) Factory.GetComponent(component);
|
||||
EntityManager.AddComponent(uid, newComponent);
|
||||
AddComp(uid, newComponent);
|
||||
status.ActiveEffects[key].RelevantComponent = component;
|
||||
}
|
||||
return true;
|
||||
@@ -279,7 +279,7 @@ namespace Content.Shared.StatusEffect
|
||||
&& Factory.TryGetRegistration(state.RelevantComponent, out var registration))
|
||||
{
|
||||
var type = registration.Type;
|
||||
EntityManager.RemoveComponent(uid, type);
|
||||
RemComp(uid, type);
|
||||
}
|
||||
|
||||
if (proto.Alert != null)
|
||||
|
||||
Reference in New Issue
Block a user