Fix hardsuit helmet unequip (#7728)
This commit is contained in:
@@ -71,7 +71,10 @@ public sealed class ToggleableClothingSystem : EntitySystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnToggleableUnequip(EntityUid uid, ToggleableClothingComponent component, GotUnequippedEvent args)
|
private void OnToggleableUnequip(EntityUid uid, ToggleableClothingComponent component, GotUnequippedEvent args)
|
||||||
{
|
{
|
||||||
if (component.Container != null && component.Container.ContainedEntity != null && component.ClothingUid != null)
|
// If the attached clothing is not currently in the container, this just assumes that it is currently equipped.
|
||||||
|
// This should maybe double check that the entity currently in the slot is actually the attached clothing, but
|
||||||
|
// if its not, then something else has gone wrong already...
|
||||||
|
if (component.Container != null && component.Container.ContainedEntity == null && component.ClothingUid != null)
|
||||||
_inventorySystem.TryUnequip(args.Equipee, component.Slot, force: true);
|
_inventorySystem.TryUnequip(args.Equipee, component.Slot, force: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user