Skip to content
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

[MIRROR] General code maintenance for smart fridge #643

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25020
Original PR: tgstation/tgstation#79623

About The Pull Request

  • Fixes #77805
  • Fixes #77593

Overall code optimizations for smart fridges. The gist of it includes.

  1. Converted UI to typescript
  2. Smart fridges won't be accepting items that are either abstract or holograms
  3. Autodoc for procs & vars
  4. Merged a lot of if statements into 1 ternary operation. Used is_type_in_list() in some places to reduce the redundant istype() checks
  5. Removed all single letter var names
  6. Moved all subtype specific vars and functions away from the parent fridge type. If we need a subtype to perform a certain operation the parent type should provide vars & procs to override and we should not be checking for child types inside the parent type. In this case it was overlays for the contents displayed on the fridge & examines

Qol improvements include.

  1. Added better examine & screen tips for fridge's
  2. Drying rack can now be deconstructed with a crowbar and not simply pried open with it.

Changelog

🆑 SyncIt21
fix: drying rack now shows correct examines & screen tips.
code: tone of code organization for smart fridges overall. changed ui to typescript.
qol: added more detailed examines & screen tips for smart fridges. drying racks can be dismantled with a crowbar and not simply pried open with it.
/:cl:

* General code maintenance for smart fridge

* Update smartfridge.dm

---------

Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: Bloop <[email protected]>
@Iajret Iajret merged commit 3cf89c1 into master Nov 15, 2023
24 checks passed
@Iajret Iajret deleted the upstream-mirror-25020 branch November 15, 2023 09:51
AnywayFarus added a commit that referenced this pull request Nov 15, 2023
Iajret pushed a commit that referenced this pull request Jan 27, 2024
* Minor code cleanup for PCM (#81092)

## About The Pull Request
- Shortened the description for readability. Makes sense to display
further details only when examining.
- Removed deprecated `content` tag from button elements in the UI
- Added more sanity checks when dealing with numbers inside `ui_act()`
- Make sure we don't insert hologram items
- Use `as anything` to speed up some for loops
- Capitalized some text inside examine

## Changelog
:cl:
spellcheck: shortened description for the PCM and capitalized some text
for its examines.
code: adds sanity checks and removed deprecated `content` tag from PCM
UI. Stops hologram items from being inserted.
/:cl:

* Minor code cleanup for PCM

---------

Co-authored-by: SyncIt21 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants