Missing nullables (#8634)
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Server.Labels
|
||||
{
|
||||
_itemSlotsSystem.AddItemSlot(uid, component.Name, component.LabelSlot);
|
||||
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent appearance))
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
appearance.SetData(PaperLabelVisuals.HasLabel, false);
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.Labels
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EntityManager.TryGetComponent(item, out PaperComponent paper))
|
||||
if (!EntityManager.TryGetComponent(item, out PaperComponent? paper))
|
||||
// Assuming yaml has the correct entity whitelist, this should not happen.
|
||||
return;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.Labels
|
||||
if (args.Container.ID != label.LabelSlot.ID)
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent appearance))
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
appearance.SetData(PaperLabelVisuals.HasLabel, label.LabelSlot.HasItem);
|
||||
|
||||
Reference in New Issue
Block a user