Speed Boots [Tier 3 Civ-Service] (#21438)
* Speed Boots * validate * monkey
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.PowerCell;
|
||||
using Content.Shared.PowerCell.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
@@ -15,6 +16,29 @@ public sealed class PowerCellSystem : SharedPowerCellSystem
|
||||
SubscribeLocalEvent<PowerCellVisualsComponent, AppearanceChangeEvent>(OnPowerCellVisualsChange);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool HasActivatableCharge(EntityUid uid, PowerCellDrawComponent? battery = null, PowerCellSlotComponent? cell = null,
|
||||
EntityUid? user = null)
|
||||
{
|
||||
if (!Resolve(uid, ref battery, ref cell, false))
|
||||
return true;
|
||||
|
||||
return battery.CanUse;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool HasDrawCharge(
|
||||
EntityUid uid,
|
||||
PowerCellDrawComponent? battery = null,
|
||||
PowerCellSlotComponent? cell = null,
|
||||
EntityUid? user = null)
|
||||
{
|
||||
if (!Resolve(uid, ref battery, ref cell, false))
|
||||
return true;
|
||||
|
||||
return battery.CanDraw;
|
||||
}
|
||||
|
||||
private void OnPowerCellVisualsChange(EntityUid uid, PowerCellVisualsComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (args.Sprite == null)
|
||||
|
||||
Reference in New Issue
Block a user