Consolidate IConsolePrint functions and improve some of the messages - #9359
Merged
Merged
Conversation
rubidium42
force-pushed
the
console_simplification
branch
2 times, most recently
from
June 13, 2021 08:36
986d851 to
c40bad9
Compare
TrueBrain
reviewed
Jun 13, 2021
TrueBrain
left a comment
Member
There was a problem hiding this comment.
The first commit is ofc a big no-no, so if anyone during bisecting happens to go back to it, they can get some weird prints, I guess .. but from what I could tell, only in a handful of places, so you have to be really unlucky :P
There also really isn't another way to get where you wanted to go, so I think it is worth doing it like this :)
rubidium42
force-pushed
the
console_simplification
branch
from
June 13, 2021 12:00
c40bad9 to
f6afef6
Compare
If a command cannot be executed for whatever reason, it makes no sense to call it a warning. Something has been done wrong. Also make writing of these error message consistent while changing their "type".
Always start with a capital, do not add "ERROR: " in front of it.
Both did not support format parameters, so in many places IConsolePrint(CC_ERROR, "message") was used with a style different from what IConsoleError would do.
…ake them more uniform) and convert to fmt
Also make some strings more consistent with the rest of the console strings.
…messages more uniform
rubidium42
force-pushed
the
console_simplification
branch
from
June 13, 2021 13:04
f6afef6 to
9117efb
Compare
TrueBrain
approved these changes
Jun 13, 2021
TrueBrain
left a comment
Member
There was a problem hiding this comment.
For sure this is an improvement :) Other nitpicks can be dealt with another time :) Tnx a bunch for this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
Where to start?
Description
IConsoleWarning(in lieu ofIConsolePrint(CC_WARNING,.IConsoleError(in lieu ofIConsolePrint(CC_ERROR,.IConsoleHelp(in lieu ofIConsolePrint(CC_HELP,.CC_HELPto distinguish betweenCC_HELPandCC_WARNING.Feel free to propose other improvements to strings printed to the in-game console.
If this approach is taken over adding formatting functionality to IConsoleError/Warning, then this closes #8853 and closes #8894.
Limitations
None I think, unless someone did matching on colors of strings, or was actually parsing the strings... as then those might now be broken in some cases.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.