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] Fixes runtime from examining mod PCs #1787

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#724
Original PR: tgstation/tgstation#81200

About The Pull Request

It's a classic
image

EXAMINE_HINT(x) resolves to "<b>" + x + "</b>"

When placed in this line directly, you get:

["<b>" + HAS_TRAIT_FROM(...) ? "..." : "..." + "</b>"]

You see the issue, right?

This resolves as you would expect:
("<b>" + HAS_TRAIT_FROM(...)) ? ("...") : ("..." + "</b>")

Which, of course, runtimes as it's adding a string to an integer (0).

By pulling it out to its own var we can get around this:

["<b>" + frame_or_pc + "</b>"]

Changelog

🆑 Melbert
fix: Fixed examining modular PCs
/:cl:

* Fixes runtime from examining mod PCs (#81200)

## About The Pull Request

It's a classic

![image](https://github.com/tgstation/tgstation/assets/51863163/297cbecd-c32d-4c10-8c25-000d8a95310c)

`EXAMINE_HINT(x)` resolves to `"<b>" + x + "</b>"`

When placed in this line directly, you get: 

`["<b>" + HAS_TRAIT_FROM(...) ? "..." : "..." + "</b>"]`

You see the issue, right?

This resolves as you would expect: 
`("<b>" + HAS_TRAIT_FROM(...)) ? ("...") : ("..." + "</b>")`

Which, of course, runtimes as it's adding a string to an integer (0). 

By pulling it out to its own var we can get around this: 

`["<b>" + frame_or_pc + "</b>"]`

## Changelog

:cl: Melbert
fix: Fixed examining modular PCs
/:cl:

* Fixes runtime from examining mod PCs

---------

Co-authored-by: MrMelbert <[email protected]>
@ReezeBL ReezeBL merged commit e0c7799 into master Feb 6, 2024
23 checks passed
@ReezeBL ReezeBL deleted the upstream-mirror-724 branch February 6, 2024 07:49
AnywayFarus added a commit that referenced this pull request Feb 6, 2024
Iajret pushed a commit that referenced this pull request Apr 3, 2024
* TGUI: updated dependencies

* Fixing conflicts, lock file

---------

Co-authored-by: Jeremiah <[email protected]>
Co-authored-by: Mal <[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