-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Jsonify radiation widget #55079
Jsonify radiation widget #55079
Conversation
58d4021
to
676e31e
Compare
I can see that it would be complicated trying to get a stored item value like radiation out of an NPC talker condition... The badge itself only accumulates radiation when it's being worn, as I learned when implementing #53915. Having the sidebar show personal radiation (but only while wearing the badge) may be a little unrealistic, but probably more useful to the player. Without testing it, I would guess there's a chance of a discrepancy between sidebar badge color and the displayed color on the description of the badge itself - if the character is exposed to radiation for a while before unwrapping and wearing the badge, their personal radiation would be higher than the badge's. |
That's true, |
676e31e
to
c16ed9e
Compare
c16ed9e
to
1650291
Compare
Summary
None
Purpose of change
This marks the beginning of the Great Widget Migration, where text widget functions will be migrated to conditional clauses, a.k.a. purely JSON definitions.
Describe the solution
display
functions related to the old radiation badge widgetFor other areas using
display::rad_badge_color_name
, I've moved that function tooutput.cpp
since it's more of a general thing now and no longer serves a purpose for drawing widgets.Describe alternatives you've considered
Testing
Radiation badge unit tests are still working as before.
Also, manual testing:
Additional context
Since individual items can't be tracked with conditions (not sure if that's even possible given how it works), I'm tracking the player's rads instead of the rads on the badge itself. It shouldn't make much of a difference since the player has to be wearing/wielding the badge for it to show up in the sidebar.