Files
Bubberstation/code/game/objects/items
SkyratBot 6e3da1dc82 [MIRROR] Light Replacer Patches [MDB IGNORE] (#21692)
* 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
/🆑

* Light Replacer Patches

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2023-06-07 16:48:07 +02:00
..