Add arguments to part and mechanism event methods (#2293)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Body.Mechanism;
|
||||
using Content.Shared.GameObjects.Components.Body.Part;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Body.Mechanism
|
||||
@@ -9,26 +7,5 @@ namespace Content.Client.GameObjects.Components.Body.Mechanism
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedMechanismComponent))]
|
||||
[ComponentReference(typeof(IMechanism))]
|
||||
public class MechanismComponent : SharedMechanismComponent
|
||||
{
|
||||
protected override void OnAddedToPart()
|
||||
{
|
||||
base.OnAddedToPart();
|
||||
|
||||
if (Owner.TryGetComponent(out ISpriteComponent? sprite))
|
||||
{
|
||||
sprite.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRemovedFromPart(IBodyPart old)
|
||||
{
|
||||
base.OnRemovedFromPart(old);
|
||||
|
||||
if (Owner.TryGetComponent(out ISpriteComponent? sprite))
|
||||
{
|
||||
sprite.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
public class MechanismComponent : SharedMechanismComponent { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user