Fixes spray painters consuming double ammo when painting pipes by CawsForConcern · Pull Request #2199 · ss14Starlight/space-station-14 (original) (raw)

Short description

Fixes a bug introduced in #1553 where the function OnPipeInteract() was calling .TryUseCharges() which made it consume a paint charge when you started painting a pipe.

After the doAfter finished, the function OnPipeDoAfter(), would call .TryUseCharges() again and consume a second paint charge.

Note: I reverted the code for OnPipeInteract() to upstream, hence why there's no Starlight comments there. I've adjusted the Starlight comments as needed in OnPipeDoAfter()

Why we need to add this

Spray painting pipes is intended to cost 1 paint, not 2. I was wondering why I ran out of paint so quickly when painting pipes in Atmospherics.

Media (Video/Screenshots)

2025-11-13.20-59-22.mp4

fig 1. - Fixes shown:

Checks

Changelog

🆑 CawsForConcern