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

[TG Mirror] Fixes source of tgui errors in accounts console [MDB IGNORE] #127

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#24412
Original PR: tgstation/tgstation#79048

About The Pull Request

It's possible to have bank accounts created with null jobs. This results in a runtime bluescreen that breaks the account management console for the whole round.

Not ideal

lKCRwKfZ6M

Code_85omxswUqx

The runtime comes from trying to access title from the null job datum in ui_data() which results in the ui data not being sent.

https://github.com/tgstation/tgstation/blob/c10bf15c4a9b71eec325ea2f201a68defb80943b/code/game/machinery/computer/accounting.dm#L22-L29


This PR just guards against that. Similar patterns can be seen everywhere else where this data is accessed.

For example

image

image

Why It's Good For The Game

More robust code, less console becoming unusable.

Changelog

🆑 vinylspiders
fix: fixes a tgui bluescreen bug with the bank account console that can occur when there is bad bank account data
/:cl:

… (#24412)

* Fixes source of tgui errors in accounts console (#79048)

## About The Pull Request

It's possible to have bank accounts created with `null` jobs. This
results in a runtime bluescreen that breaks the account management
console for the whole round.

<details><summary>Not ideal</summary>

![lKCRwKfZ6M](https://github.com/tgstation/tgstation/assets/13398309/e91fa68b-b1d2-437e-b77d-e7144618b2f8)

![Code_85omxswUqx](https://github.com/tgstation/tgstation/assets/13398309/c97d1ef2-4138-4cff-bdc5-0d9a1f185ba2)

</details>

The runtime comes from trying to access `title` from the null job datum
in `ui_data()` which results in the ui data not being sent.

https://github.com/tgstation/tgstation/blob/c10bf15c4a9b71eec325ea2f201a68defb80943b/code/game/machinery/computer/accounting.dm#L22-L29

---

This PR just guards against that. Similar patterns can be seen
everywhere else where this data is accessed.

<details><summary> For example</summary>

![image](https://github.com/tgstation/tgstation/assets/13398309/590adb03-9023-4661-93fd-ff68fb24b3f7)

![image](https://github.com/tgstation/tgstation/assets/13398309/0603a442-617f-4cb4-bc24-2561855a64d9)

</details>

## Why It's Good For The Game

More robust code, less console becoming unusable.

## Changelog

:cl:
fix: fixes a tgui bluescreen bug with the bank account console that can
occur when there is bad bank account data
/:cl:

* Fixes source of tgui errors in accounts console

---------

Co-authored-by: Bloop <[email protected]>
@AnywayFarus AnywayFarus merged commit e6b06e3 into master Oct 18, 2023
22 checks passed
@AnywayFarus AnywayFarus deleted the upstream-mirror-24412 branch October 18, 2023 06:41
FluffySSbot added a commit that referenced this pull request Oct 18, 2023
Iajret pushed a commit that referenced this pull request Dec 28, 2023
#127)

Makes the turbine core part remove references on deactivation (#80593)

## About The Pull Request
The delete the world test was showing that the turbine's non-core parts,
the compressor and outlet were causing runtimes, so I made the
deactivation of the core remove the references from the secondary
turbine parts
## Why It's Good For The Game
Less harddels means less lag, hopefully

No changelog since nothing player facing

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

Successfully merging this pull request may close these issues.

3 participants