-
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
Make ability to remove vehicle parts more obvious #40087
Make ability to remove vehicle parts more obvious #40087
Conversation
Good work - this part of the UI has confused me as well. Thanks for including before and after screenshots too; those make it a lot easier to see what has changed in-game. I see a lot of unrelated If you didn't make those changes yourself, it is possible your editor/IDE may be doing it automatically. Unfortunately, these reformattings make it harder to see what part of the code you've actually changed, which is the reason for the |
Thanks for your help! I don't think my editor (Atom) caused the problem, I ran into the astyle issue and ran |
You need to run astyle with |
|
Sorry for the inconsistency. I took the screenshots before and after I changed it. Before I added the changes, I spawned in a test character with a screwdriver and mechanics, so skills & tools were green. Afterwards, I forgot to change anything & left my character as-is. Then, to demonstrate color when all conditions unfulfilled, I debugged his strength to 0. It's just inconsistency on my part, w.r.t the skills & tools I used to demonstrate. The only change in code was under the Additional Requirements section of the interface, so the only meaningful distinction in the screenshot is in that one line of text below additional requirements. |
To be more specific about the solution: look at lines 1758 and 1759. For aid_color: if a sufficient tool for LIFTING is present, its color is set to green. If not, it checks if your character (or character+npc) have sufficient strength. If strength requirement is met, its text is set to grey. If not, text is set to red. Similarly for str_color. This is the same convention used for crafting and installing. by having the text be greyed out, the game lets you know "you lack this thing, but that's okay." red is saved for when both lifting and strength requirements are not met, i.e. "things are not okay." |
Summary
Purpose of change
I've seen newer players get confused when trying to remove parts from a vehicle. In OR statements (i.e. lifting 1 OR strength 1), the only colors for the requirements were red or green. So if you didn't have a forklift but weren't severely cripped, LIFTING would be red while STRENGTH would be green.
However, when installing parts, or crafting stuff, the text is red when all requirements are unfulfilled, and grey/green when some requirements are unfulfilled/fulfilled (respectively.) Thus some people, when they see red, think they aren't fulfilling that requirement & they'll build a forklift.
This change is to keep the interface consistent and resolve some confusion.
Describe the solution
Change the code so OR statements in the additional requirements, when removing stuff from a vehicle, follow the same color scheme that the install menu and crafting menu do.
(AFAIK these OR statements only appear under "additional requirements". If I'm wrong please let me know!)
Describe alternatives you've considered
Not changing the color scheme.
Testing
I tried removing a seatbelt before and after my changes. Color scheme was satisfactorily changed.
BEFORE:
AFTER:
AFTER: ALL UNFULFILLED
Additional context
To clarify:
Here at the conditions for skill/tool required & additional requirements:
Do you have the skills? Y: green, N: red
Do you have the tools? Y: green, N:red
Additional requirements:
Say the first requirement is P , second is Q. Both boolean.
P ^ Q -> Green & green
!P ^ !Q -> Red & Red
P ^ !Q -> Green & Grey
!P ^ Q -> Grey & Green
Ignore any inconsistencies w.r.t tools/skills required in screenshots above.