Power Cell Refactor (#5943)

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2022-01-05 17:20:25 +13:00
committed by GitHub
parent 4eddefdda1
commit 0aa4f9efbe
37 changed files with 673 additions and 987 deletions

View File

@@ -23,9 +23,6 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private StatusControl? _statusControl;
[DataField("cellSlot", required: true)]
public ItemSlot CellSlot = default!;
/// <summary>
/// Count of bullets in the magazine.
/// </summary>
@@ -35,18 +32,6 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
[ViewVariables]
public (int count, int max)? MagazineCount { get; private set; }
protected override void Initialize()
{
base.Initialize();
EntitySystem.Get<ItemSlotsSystem>().AddItemSlot(Owner, $"{Name}-powercell-container", CellSlot);
}
protected override void OnRemove()
{
base.OnRemove();
EntitySystem.Get<ItemSlotsSystem>().RemoveItemSlot(Owner, CellSlot);
}
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
base.HandleComponentState(curState, nextState);