-
Notifications
You must be signed in to change notification settings - Fork 96
Add <gamemode> module #873
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
Conversation
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
We should expand on this and have more translatable gamemode titles, here are some others I have in mind:
|
Game names are all in singular, you still call it "Capture the wool" when there's 2 wools, |
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
New translatable gamemode titles are added (I call dibs on Pirate English and lolcat translations :P) |
Though, map tags were designed to replace game mode? Since it makes things more extensible? |
@Electroid map tags are automated, so they are automatically generated by what tags a map uses. |
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Can map tags not be defined in XML? This does seem like a duplicate of what map tags are for and support for translatable map tags already exist. Maybe they just need parsing and if exist override the auto-generated ones. |
This PR will |
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
The PR doesn't deal with the tags anymore. Thanks to some help with Pablete it's a bit better now. You can now use two gamemode types that will display on the scoreboard title. Now the documentation is just like how it is already described on the docs. <!--- DTC & CTW -->
<gamemode>dtc</gamemode>
<gamemode>ctw</gamemode> |
/** | ||
* Get a {@link Collection<Gamemode>} that represents this map's gamemodes. | ||
* | ||
* @return A component of gamemodes if defined or null. |
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.
* @return A component of gamemodes if defined or null. | |
* @return The list of defined gamemodes, empty list if none are defined. |
Don't lie in the javadocs, makes the APIs hard to use
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.
Doesn't look resolved
core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
/** | ||
* Get a {@link Collection<Gamemode>} that represents this map's gamemodes. | ||
* | ||
* @return A component of gamemodes if defined or null. |
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.
Doesn't look resolved
core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
Found what Pablo was talking about, it's TextFormatter.java I'll use this function soon. |
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
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.
The comment on getGamemodes is still wrong. It says it returns a component when it returns a list of gamemodes
Signed-off-by: Patrick <cowinkkeydinkinc@gmail.com>
32e41ac
to
98fc003
Compare
@Pablete1234 @Electroid Ready to merge! |
This re-adds the
<gamemode>
module back to PGM (if it ever was there). It works similar to how it is already described in the docs, as I noticed that there is no code in PGM that uses the tags. You can't do that weird adding thing it talks about. This uses the translatable objective names so maps that are based around "Attack & Defend" like BoomBox or a "Scorebox" like Zap and Miner Sixty Niner, or maps with monument mode trickery no longer need to use the untranslatable<game>
tag.<game>
was known asgamemode
in the code so this was changed togame
. No new translatable components were added.