Mortician's Menagerie (#2391)
* Body bags! * Morgue Trays and the Crematorium! Reorganised body bags to be under Morgue, not Medical * Fix. Things outside of EntityStorageComponents now use the Try*Storage() not just *Storage() methods - Allows mobs to be trapped in a morgue/crematorium whose tray can't open. * Fix tests. Modernise component dependency and nullability. * Update Content.Server/GameObjects/Components/Morgue/MorgueTrayComponent.cs Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.GameObjects.Components.Storage;
|
||||
using Content.Shared.GameObjects.Components.Storage;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
@@ -74,9 +74,12 @@ namespace Content.Client.GameObjects.Components.Storage
|
||||
}
|
||||
}
|
||||
|
||||
if (component.TryGetData(StorageVisuals.Welded, out bool weldedVal))
|
||||
if (component.TryGetData(StorageVisuals.CanWeld, out bool canWeld) && canWeld)
|
||||
{
|
||||
sprite.LayerSetVisible(StorageVisualLayers.Welded, weldedVal);
|
||||
if (component.TryGetData(StorageVisuals.Welded, out bool weldedVal))
|
||||
{
|
||||
sprite.LayerSetVisible(StorageVisualLayers.Welded, weldedVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user