diff options
author | nea <nea@nea.moe> | 2023-06-02 01:13:13 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-02 01:13:13 +0200 |
commit | edb31fe9a5f16f82f10897fc74ab5dd076e3ae36 (patch) | |
tree | 9736d3221b1a21eca440442b814b7652f05f2776 | |
parent | 60c5aed5c512fcff57f66b06f07303cbe0c3107e (diff) | |
download | neurepoparsing-edb31fe9a5f16f82f10897fc74ab5dd076e3ae36.tar.gz neurepoparsing-edb31fe9a5f16f82f10897fc74ab5dd076e3ae36.tar.bz2 neurepoparsing-edb31fe9a5f16f82f10897fc74ab5dd076e3ae36.zip |
Add misc.json
4 files changed, 86 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/repo/NEUConstants.java b/src/main/java/io/github/moulberry/repo/NEUConstants.java index ba71f9e..58b5688 100644 --- a/src/main/java/io/github/moulberry/repo/NEUConstants.java +++ b/src/main/java/io/github/moulberry/repo/NEUConstants.java @@ -20,7 +20,8 @@ public class NEUConstants implements IReloadable { EssenceCosts essenceCost; @Getter FairySouls fairySouls; - + @Getter + Misc misc; @Getter Leveling leveling; @@ -33,6 +34,7 @@ public class NEUConstants implements IReloadable { essenceCost = new EssenceCosts(repository.requireFile("constants/essencecosts.json").json(JsonObject.class)); fairySouls = new FairySouls(repository.gson, repository.requireFile("constants/fairy_souls.json").json(new TypeToken<Map<String, JsonElement>>() { })); + misc = repository.requireFile("constants/misc.json").json(Misc.class); leveling = repository.requireFile("constants/leveling.json").json(Leveling.class); } diff --git a/src/main/java/io/github/moulberry/repo/constants/Misc.java b/src/main/java/io/github/moulberry/repo/constants/Misc.java new file mode 100644 index 0000000..7f26633 --- /dev/null +++ b/src/main/java/io/github/moulberry/repo/constants/Misc.java @@ -0,0 +1,55 @@ +package io.github.moulberry.repo.constants; + +import com.google.gson.annotations.SerializedName; +import io.github.moulberry.repo.data.NEUItem; +import lombok.Getter; + +import java.util.List; +import java.util.Map; + +@Getter +public class Misc { + // TODO: (necessary?) + // - item types + // - tier colors + // - base stats + // - cosmetics info + // - features list + // - minion cost + /** + * A list of the cost to start a slayer of that tier. + */ + @SerializedName("slayer_cost") + List<String> slayerCost; + /** + * A map from {@code /locraw} mode name to a display name for that zone. + */ + @SerializedName("area_names") + Map<String, String> areaNames; + + /** + * A map from API rank names to their respective renderers. + */ + Map<String, RankData> ranks; + /** + * A list of dash-less UUIDs of users with rainbow names in the profile viewer. + */ + @SerializedName("special_bois") + List<String> rainbowNames; + /** + * A map from minion name without the {@code _TIER} postfix (e.g. {@code ACACIA_GENERATOR}) to the maximum level + * for that minion. + */ + @SerializedName("minions") + Map<String, Integer> maxMinionLevel; + /** + * The credit item for the NEU mod. + */ + NEUItem credits; + /** + * A list of talismans along with their upgrades. This list is not transitive (or rather talisman upgrades are + * transitive, but this list has already resolved these transitive upgrades). + */ + @SerializedName("talisman_upgrades") + Map<String, List<String>> talismanUpgrades; +} diff --git a/src/main/java/io/github/moulberry/repo/constants/RankData.java b/src/main/java/io/github/moulberry/repo/constants/RankData.java new file mode 100644 index 0000000..c73ac5e --- /dev/null +++ b/src/main/java/io/github/moulberry/repo/constants/RankData.java @@ -0,0 +1,21 @@ +package io.github.moulberry.repo.constants; + +import lombok.Value; +import org.jetbrains.annotations.Nullable; + +@Value +public class RankData { + /** + * A one character color code, as used by minecraft's {@code ยง}. + */ + String color; + /** + * The prefix tag, typically enclosed in brackets. + */ + String tag; + /** + * Extra pluses for the prefix tag, in a user speified color. + */ + @Nullable + String plus; +} diff --git a/src/test/java/TestMain.java b/src/test/java/TestMain.java index bbf6a7a..b877bf5 100644 --- a/src/test/java/TestMain.java +++ b/src/test/java/TestMain.java @@ -23,6 +23,13 @@ public class TestMain { .filter(it -> it instanceof NEUUnknownRecipe).map(it -> (NEUUnknownRecipe) it) .map(NEUUnknownRecipe::getType) .collect(Collectors.toSet())); + System.out.println("amount of people with rainbow names: " + repository.getConstants().getMisc().getRainbowNames().size()); + System.out.println("display name for dynamic zone: " + repository.getConstants().getMisc().getAreaNames().get("dynamic")); + System.out.println("max blaze minion level: " + repository.getConstants().getMisc().getMaxMinionLevel().get("BLAZE_GENERATOR")); + System.out.println("cost to start a T5 slayer quest: " + repository.getConstants().getMisc().getSlayerCost().get(4)); + System.out.println("tag for SUPERSTAR: " + repository.getConstants().getMisc().getRanks().get("SUPERSTAR").getTag()); + System.out.println("upgrades for CANDY_TALISMAN: " + repository.getConstants().getMisc().getTalismanUpgrades().get("CANDY_TALISMAN")); + System.out.println("lore size of credits book (approximate number of contributors): " + repository.getConstants().getMisc().getCredits().getLore().size()); System.out.println("pet mf (115): " + repository.getConstants().getBonuses().getPetRewards(115)); System.out.println("skill reward (combat 60): " + repository.getConstants().getBonuses().getAccumulativeLevelingRewards("skill_combat", 60)); System.out.println("parent of FLAWED_AMETHYST_GEM: " + repository.getConstants().getParents().getParent("FLAWED_AMETHYST_GEM")); |