Add tether gun (#16430)

This commit is contained in:
metalgearsloth
2023-05-18 11:36:06 +10:00
committed by GitHub
parent b386764639
commit 775258be52
28 changed files with 697 additions and 413 deletions

View File

@@ -157,6 +157,18 @@ public sealed partial class PowerCellSystem : SharedPowerCellSystem
return false;
}
/// <summary>
/// Whether the power cell has any power at all for the draw rate.
/// </summary>
public bool HasDrawCharge(EntityUid uid, PowerCellDrawComponent? battery = null,
PowerCellSlotComponent? cell = null, EntityUid? user = null)
{
if (!Resolve(uid, ref battery, ref cell, false))
return true;
return HasCharge(uid, float.MinValue, cell, user);
}
#endregion
public void SetPowerCellDrawEnabled(EntityUid uid, bool enabled, PowerCellDrawComponent? component = null)