Files
Bubberstation/code/modules/detectivework
SkyratBot 64a6b6bb27 [MIRROR] Refactors the detective scanner to fix potentially getting stuck in the 'scanning' state [MDB IGNORE] (#19309)
* Refactors the detective scanner to fix potentially getting stuck in the 'scanning' state (#73058)

## About The Pull Request

Detective scanners make use of a `scanning` boolean to determine whether
or not you can perform another action with it.
It gets set to `FALSE` in its procs, but if any of those procs runtime
for whatever reason this could lead to that never happening.

Which in turn leads to it getting stuck in the `scanning = TRUE` state
indefinitely.

---

This PR just moves the functions into wrapper functions so that should a
runtime occur, the boolean will still get set to `FALSE`. Also changed
the boolean's name from `scanning` to `scanner_busy` because it is also
used for the print function.

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/18241

## Why It's Good For The Game

Code resiliency

## Changelog

🆑
fix: fixes a potential bug that can cause the detective scanner to get
stuck in a scanning state indefinitely
/🆑

* Refactors the detective scanner to fix potentially getting stuck in the 'scanning' state

---------

Co-authored-by: Bloop <vinylspiders@gmail.com>
2023-02-12 22:18:03 -08:00
..