-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robust Photocopiers + Adds the Access Request blank #76048
Robust Photocopiers + Adds the Access Request blank #76048
Conversation
i'm considering reworking |
HoP-bros WE ARE SO BACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a refactor so congratulations on all the extra work you can do while you touch up this file to make it more robust. most of it is the same nit though
…lank (#6314) Original PR: tgstation/tgstation#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 :cl: 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. /:cl: --------- Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
Hey, so last time i tried HoP, this PR just basically didn't look like it was added, what the hell is going on with that |
About The Pull Request
Currently, photocopiers parse the
blanks.json
file inui_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 thecode
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
abused 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.
Screenshots/Me testing a printer for 5 minutes
2023-06-16.00-05-20-1.mp4
2023-06-16.00-05-20-2.mp4
2023-06-16.00-05-20-3.mp4
Access Request form
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.
/:cl: