-
Notifications
You must be signed in to change notification settings - Fork 14
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
🚀 Better console color system #134
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi 👋🏻 Thanks you for your contributions. Here is a list of some changes i would like to see in a first review.
@@ -0,0 +1,53 @@ | |||
package io.github.syst3ms.skriptparser.expressions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was made basing myself on my other PR.
Not sure how should I do now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can delete the files locally and push the changes here. It will remove the files from the PR as Github compares with the latest commit in the master branch.
src/main/java/io/github/syst3ms/skriptparser/tags/TagColor.java
Outdated
Show resolved
Hide resolved
ITALIC("3", true, "o"), | ||
UNDERLINE("4", true, "n", "u"), | ||
STRICKTHROUGH("9", true, "m", "strike"), | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something wrong here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks line 46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't see what's wrong, is it the constant's name ?
It has been renamed by Mwexim
src/main/java/io/github/syst3ms/skriptparser/util/color/ConsoleColors.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/syst3ms/skriptparser/util/color/ConsoleColors.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great additions!
@Override | ||
public boolean init(String key, String[] parameters) { | ||
final Optional<ConsoleColors> optional; | ||
if (key.equalsIgnoreCase("color") && parameters.length != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should check for length 1.
@@ -24,7 +25,7 @@ public boolean init(String key, String[] parameters) { | |||
} | |||
|
|||
public String getValue(String affected) { | |||
return affected; | |||
return ConsoleColors.RESET + affected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this implementation is correct for now, it reminds me that a small overhaul of the tag system is needed in order to give addons the flexibility of changing the reset tag.
src/main/java/io/github/syst3ms/skriptparser/util/color/ConsoleColors.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/syst3ms/skriptparser/util/color/ConsoleColors.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/syst3ms/skriptparser/tags/TagColor.java
Outdated
Show resolved
Hide resolved
@@ -153,7 +153,7 @@ public static void printLogs(List<LogEntry> logs, Calendar time, boolean tipsEna | |||
for (LogEntry log : logs) { | |||
ConsoleColors color = ConsoleColors.WHITE; | |||
if (log.getType() == LogType.WARNING) { | |||
color = ConsoleColors.YELLOW; | |||
color = ConsoleColors.ORANGE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think change to orange is a good idea since yellow is in general associate with warning so it would imo create bad idea of warning for skript users that would next switch to another language
…eColors.java Co-authored-by: Mwexim <[email protected]>
Co-authored-by: Mwexim <[email protected]>
…eColors.java Co-authored-by: Mwexim <[email protected]>
👋 @ItsTheSky |
Hi! Sorry for taking so long to reply too 😭 |
I think the tag system needs a major overhaul, which is one of the reasons this pull request stays open currently. The code itself is good and if there would be any changes I'd want to make, I'd probably make a quick commit myself. If I ever get more time to work on this project, this should be handled rather quickly. |
These small changes allow better customization & organization of console colors.
Example code:
Output:
Main Changes:
orange_bright
could also be used asyellow
.