-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Smoker quirk customisation does not update #83277
Labels
Bug
Correct Functionality
Comments
The other open issue unfortunately doesn't have "quirk" in the title or body so doesn't come up in search easily. Duplicate #82538 |
san7890
pushed a commit
that referenced
this issue
May 23, 2024
## About The Pull Request So the smoker quirk would always reset back to "Random" whichever preferences you selected, just in the menu. Looking into why this was happening, it seemed to be failing at the point where it deserializes and sanitizes your selected value, specifically at the point where it'd compare it to the list of possible preferences. This seemed to be because the value it got back from tgui had removed the `\improper` text macro, while the value in the list was saved with that text macro. It's not actually useful here, so we remove it using `format_text(...)` when setting up the list, and this makes it work again. We also split it off from the previous used proc used for setting up the list: ```dm /proc/setup_junkie_addictions(list/possible_addictions) . = possible_addictions for(var/datum/reagent/addiction as anything in .) . -= addiction .[addiction::name] = addiction ``` Because the smoker list doesn't actually use reagents. I'm surprised this successfully got the name values for the non-reagents in the first place. ## Why It's Good For The Game Fixes #83277. Fixes #82538. ## Changelog :cl: fix: Smoker quirk users can select a favourite brand again. /:cl:
Chowder-McArthor
pushed a commit
to Chowder-McArthor/desertbus13
that referenced
this issue
Jun 6, 2024
## About The Pull Request So the smoker quirk would always reset back to "Random" whichever preferences you selected, just in the menu. Looking into why this was happening, it seemed to be failing at the point where it deserializes and sanitizes your selected value, specifically at the point where it'd compare it to the list of possible preferences. This seemed to be because the value it got back from tgui had removed the `\improper` text macro, while the value in the list was saved with that text macro. It's not actually useful here, so we remove it using `format_text(...)` when setting up the list, and this makes it work again. We also split it off from the previous used proc used for setting up the list: ```dm /proc/setup_junkie_addictions(list/possible_addictions) . = possible_addictions for(var/datum/reagent/addiction as anything in .) . -= addiction .[addiction::name] = addiction ``` Because the smoker list doesn't actually use reagents. I'm surprised this successfully got the name values for the non-reagents in the first place. ## Why It's Good For The Game Fixes tgstation#83277. Fixes tgstation#82538. ## Changelog :cl: fix: Smoker quirk users can select a favourite brand again. /:cl:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reporting client version: 515.1637
Issue Summary
Round ID:
229017
Testmerges:
Reproduction:
(I thought this was already logged, apologies if so)
Set up your character preferences, select the smoker quirk, click the cog, change the setting. I'm not sure if there's a missing 'save/confirm' option here, seems the only way forward after this is to click outside the setting subwindow but if you then go back into the cog the setting still says random.
When messing on myself, at no point does my preference in my client/preferences/values ever change from /datum/preference/choiced/smoker = "Random" (not with the sub preference window open with a different choice or after clicking outside it)
The text was updated successfully, but these errors were encountered: