mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-03 04:49:26 +00:00
* 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>  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>    </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>