Files
Bubberstation/code/modules/paperwork
SkyratBot d2486864d3 [MIRROR] Robust Photocopiers + Adds the Access Request blank [MDB IGNORE] (#21928)
* Robust Photocopiers + Adds the Access Request blank (#76048)

## About The Pull Request
Currently, photocopiers parse the `blanks.json` file in `ui_data` and
send the entire thing to the client. Then, the client sends the entire
blank back to the server to commit it into the paper, in raw form. This
is a detriment to server performance. This PR puts paper blanks into a
global associative list that uses the `code` field as an index.

Printer toner color for some reason would check if the charges were
below 10, even though default cartridges only go up to 5. The value has
been changed to 2, which is still a high number. Toner cartridges are
scams.

Also photocopiers now have to hold actual paper and no longer
materialize it out of thin air. It's done similarly to paper bins, where
there is a starting integer value dictating how much paper is inside so
paper is lazily loaded into existence, as well as a paper stack list
that holds newly inserted paper. Photocopier paper starts out at 30 and
can go up to 60.

Additionally, the photocopier copying loop has been refactored to be a
lot more sane. The previous version ~~ab~~used timers for copying,
making a timer for each i interval to num_copies. I changed it to be a
proc that loops from i to num_copies, sleeping for a short amount of
time whilst playing a sound. This is a lot tidier and nicer since we
don't deal with timers, plus we get to play a printing sound too.
`make_thing_copy` now works by returning the copied object, or null if
something went wrong, so we know when to continue or exit.

This PR refactors UI code so entire blanks aren't sent to the client,
instead relying on the IDs for the blanks. Also, photocopiers now store
actual paper and also run out of it instead of materializing some out of
thin air.

Also, while I am already editing `blanks.json`, I added the Access
Request blank because people asked me to.

I can revert the config changes if it's too much of a hassle.

<details>
<summary>Screenshots/Me testing a printer for 5 minutes</summary>

![dreamseeker_gZ4Kl3QZbF](https://github.com/tgstation/tgstation/assets/47710522/b601b79a-1b2f-4d7f-b72a-f62dad217698)

https://github.com/tgstation/tgstation/assets/47710522/11c4b63b-7cfc-4425-96c6-970d4a5f51ca

https://github.com/tgstation/tgstation/assets/47710522/2f7a4a15-3400-49f3-9aca-c4d04c886bec

https://github.com/tgstation/tgstation/assets/47710522/14afe7d9-53ea-4d17-870f-1e90319284eb

</details>

<details>
<summary>Access Request form</summary>

![image](https://github.com/tgstation/tgstation/assets/47710522/0cf99542-24d1-41ca-8aa9-26bb201a79c0)

![image](https://github.com/tgstation/tgstation/assets/47710522/36418c42-eb82-4c13-ab65-08f6486cf613)

![image](https://github.com/tgstation/tgstation/assets/47710522/7acde2ff-040a-40bf-8898-398c2150655e)

</details>

## Why It's Good For The Game
Speeb. Also having photocopiers relying on an ingame stock of paper is
also very cool.

## Changelog
🆑 distributivgesetz
add: Photocopiers now use actual paper instead of materializing it out
of thin air.
add: Adds the "Access Request" form.
refactor: Greatly improve the reliability and performance of
photocopiers.
qol: Changed the blanks so they look nicer, whilst also fixing the
lawsuit request form.
qol: Nanotrasen's bureaucracy division has ""improved"" the quality of
their printer toner after many complaints from furious customers.
/🆑

* Robust Photocopiers + Adds the Access Request blank

---------

Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
2023-06-19 17:38:53 -04:00
..
2023-05-10 01:24:11 +00:00
2023-05-10 01:24:11 +00:00