Fix SpawnAndDirtyAllEntities test (#15771)
This commit is contained in:
@@ -18,7 +18,8 @@ public sealed class StealthSystem : SharedStealthSystem
|
||||
base.Initialize();
|
||||
|
||||
_shader = _protoMan.Index<ShaderPrototype>("Stealth").InstanceUnique();
|
||||
SubscribeLocalEvent<StealthComponent, ComponentRemove>(OnRemove);
|
||||
SubscribeLocalEvent<StealthComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<StealthComponent, ComponentStartup>(OnStartup);
|
||||
SubscribeLocalEvent<StealthComponent, BeforePostShaderRenderEvent>(OnShaderRender);
|
||||
}
|
||||
|
||||
@@ -44,7 +45,7 @@ public sealed class StealthSystem : SharedStealthSystem
|
||||
if (!enabled)
|
||||
{
|
||||
if (component.HadOutline)
|
||||
AddComp<InteractionOutlineComponent>(uid);
|
||||
EnsureComp<InteractionOutlineComponent>(uid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,13 +56,12 @@ public sealed class StealthSystem : SharedStealthSystem
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit(EntityUid uid, StealthComponent component, ComponentInit args)
|
||||
private void OnStartup(EntityUid uid, StealthComponent component, ComponentStartup args)
|
||||
{
|
||||
base.OnInit(uid, component, args);
|
||||
SetShader(uid, component.Enabled, component);
|
||||
}
|
||||
|
||||
private void OnRemove(EntityUid uid, StealthComponent component, ComponentRemove args)
|
||||
private void OnShutdown(EntityUid uid, StealthComponent component, ComponentShutdown args)
|
||||
{
|
||||
SetShader(uid, false, component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user