removes componentdependencies (#6160)
This commit is contained in:
@@ -20,9 +20,7 @@ namespace Content.Server.Clothing.Components
|
||||
[ComponentReference(typeof(SharedMagbootsComponent))]
|
||||
public sealed class MagbootsComponent : SharedMagbootsComponent, IActivate
|
||||
{
|
||||
[ComponentDependency] private SharedItemComponent? _item = null;
|
||||
[ComponentDependency] private ItemActionsComponent? _itemActions = null;
|
||||
[ComponentDependency] private SpriteComponent? _sprite = null;
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
private bool _on;
|
||||
|
||||
@@ -40,10 +38,12 @@ namespace Content.Server.Clothing.Components
|
||||
EntitySystem.Get<MagbootsSystem>().UpdateMagbootEffects(container.Owner, Owner, true, this);
|
||||
}
|
||||
|
||||
_itemActions?.Toggle(ItemActionType.ToggleMagboots, On);
|
||||
if (_item != null)
|
||||
_item.EquippedPrefix = On ? "on" : null;
|
||||
_sprite?.LayerSetState(0, On ? "icon-on" : "icon");
|
||||
if(_entMan.TryGetComponent<ItemActionsComponent>(Owner, out var itemActions))
|
||||
itemActions.Toggle(ItemActionType.ToggleMagboots, On);
|
||||
if (_entMan.TryGetComponent<SharedItemComponent>(Owner, out var item))
|
||||
item.EquippedPrefix = On ? "on" : null;
|
||||
if(_entMan.TryGetComponent<SpriteComponent>(Owner, out var sprite))
|
||||
sprite.LayerSetState(0, On ? "icon-on" : "icon");
|
||||
OnChanged();
|
||||
Dirty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user