Files
Bubberstation/code/modules/power
SyncIt21 abbb2d32e4 Light Replacer Patches (#75690)
## About The Pull Request
Fixes #75686. 

1. `/obj/machinery/light/attackby()` checks if it is attacked by a light
replacer and `/obj/item/lightreplacer/attackby()` checks if it is
attacking a light tube causing the same replace light action to be
performed twice and the error message to appear, so i removed the
attackby code from the light tube
2. `/obj/structure/floodlight_frame/attackby()` has the same problem as
well so i removed it's light replacer attackby code as well.
3. Now only the light replacer checks what target it's attacking in it's
`preattack()` & `after_attack()` code. also made sure to return `TRUE`
in it's `attackby()` code so it doesn't call `afterattack()`. It also
calls it's parent proc
4. did some other code clean such as replacing `can_use()` proc with
just `Use()` so it can perform both actions at once

## Changelog
🆑
fix: light replacer displaying error message after it finished replacing
the light
refactor: merged the `can_use()` proc with the `Use()` proc to perform
both actions at once
refactor: `/obj/item/lightreplacer/attackby()` returns TRUE to prevent
calling it's `after_attack()` code and calls it's parent proc
/🆑
2023-06-07 11:06:15 +12:00
..
2023-06-07 11:06:15 +12:00
2023-05-07 23:52:03 -07:00
2023-05-07 22:45:20 +00:00
2023-06-07 11:06:15 +12:00
2023-05-08 10:23:37 -07:00