AppearanceComponent API Changes (#5446)

This commit is contained in:
Acruid
2021-11-22 23:22:59 -08:00
committed by GitHub
parent c8acba0ba7
commit fa0ec5cbd9
116 changed files with 87 additions and 97 deletions

View File

@@ -20,7 +20,7 @@ namespace Content.Shared.Storage.EntitySystems
private void InitLayers(EntityUid uid, ItemMapperComponent component, ComponentInit args)
{
if (component.Owner.TryGetComponent(out SharedAppearanceComponent? appearanceComponent))
if (component.Owner.TryGetComponent(out AppearanceComponent? appearanceComponent))
{
var list = new List<string>(component.MapLayers.Keys);
appearanceComponent.SetData(StorageMapVisuals.InitLayers, new ShowLayerData(list));
@@ -30,7 +30,7 @@ namespace Content.Shared.Storage.EntitySystems
private void MapperEntityRemoved(EntityUid uid, ItemMapperComponent itemMapper,
EntRemovedFromContainerMessage args)
{
if (itemMapper.Owner.TryGetComponent(out SharedAppearanceComponent? appearanceComponent)
if (itemMapper.Owner.TryGetComponent(out AppearanceComponent? appearanceComponent)
&& TryGetLayers(args, itemMapper, out var containedLayers))
{
appearanceComponent.SetData(StorageMapVisuals.LayerChanged, new ShowLayerData(containedLayers));
@@ -40,7 +40,7 @@ namespace Content.Shared.Storage.EntitySystems
private void MapperEntityInserted(EntityUid uid, ItemMapperComponent itemMapper,
EntInsertedIntoContainerMessage args)
{
if (itemMapper.Owner.TryGetComponent(out SharedAppearanceComponent? appearanceComponent)
if (itemMapper.Owner.TryGetComponent(out AppearanceComponent? appearanceComponent)
&& TryGetLayers(args, itemMapper, out var containedLayers))
{
appearanceComponent.SetData(StorageMapVisuals.LayerChanged, new ShowLayerData(containedLayers));