Add-d-ds s-s-stut-ttering t-to the g-gam-me (#4901)

This commit is contained in:
Vera Aguilera Puerto
2021-10-17 01:23:31 +02:00
committed by GitHub
parent 50802b123f
commit 3001ea38cc
9 changed files with 132 additions and 4 deletions

View File

@@ -213,9 +213,11 @@ namespace Content.Shared.StatusEffect
Resolve(uid, ref alerts, false);
var state = status.ActiveEffects[key];
if (state.RelevantComponent != null)
// There are cases where a status effect component might be server-only, so TryGetRegistration...
if (state.RelevantComponent != null && _componentFactory.TryGetRegistration(state.RelevantComponent, out var registration))
{
var type = _componentFactory.GetRegistration(state.RelevantComponent).Type;
var type = registration.Type;
// Make sure the component is actually there first.
// Maybe a badmin badminned the component away,