Skip to content

Commit

Permalink
Check for anchor and minor optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
PotentiallyTom committed Sep 22, 2024
1 parent 434702b commit 5cc3e0d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public sealed class GasVentPumpSystem : EntitySystem
[Dependency] private readonly SharedToolSystem _toolSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;
// [Dependency] private readonly TransformSystem _transformSystem = default!;
public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -341,8 +342,9 @@ private void OnWeldChanged(EntityUid uid, GasVentPumpComponent component, ref We
private void OnInteractUsing(EntityUid uid, GasVentPumpComponent component, InteractUsingEvent args)
{
if (args.Handled
|| !_toolSystem.HasQuality(args.Used, "Screwing")
|| component.UnderPressureLockout == false
|| !_toolSystem.HasQuality(args.Used, "Screwing")
|| (!CompOrNull<TransformComponent>(uid)?.Anchored ?? false) // If component doesn't exist continue, else check for anchor, stops it from eating the deconstruction screwdrivering
)
{
return;
Expand Down

0 comments on commit 5cc3e0d

Please sign in to comment.