From deb174f3388adfc3d889c93d3308552fffbb7e1d Mon Sep 17 00:00:00 2001 From: endernon Date: Sun, 29 Dec 2024 19:28:50 +0000 Subject: [PATCH] fix a bug where its looking for ShinyStats.json instead of shiny_stats.json (blame clion refactoring) --- .gitignore | 2 +- README.md | 3 +-- config.md | 8 +++++++- config_singu.json | 1 + src/errorfr/mod.rs | 4 ++-- src/structures/mod.rs | 4 ++-- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7d37509..551c152 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,4 @@ product/ releases id_keys.json -ShinyStats.json +shiny_stats.json diff --git a/README.md b/README.md index a0ddda4..7d002d5 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ run `cargo install idmangler-cli`. ## Usage - Move the program to some folder along with config.json . Download these three files and place them next to the program: - https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json - - https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/ShinyStats.json - + - https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json - Open a terminal (Windows: use cmd or Powershell , Linux: use your preferred Terminal Emulator) - Use the command "cd DIRECTORY" (where DIRECTORY is where the program is stored) - read the provided config markdown file to understand how to edit config.json diff --git a/config.md b/config.md index e5cb3d7..45ec515 100644 --- a/config.md +++ b/config.md @@ -3,8 +3,14 @@ **Name** is stored as a String. It must be a valid Wynncraft item for it to display as intended. ## Shiny ID Inside the Shiny{} list, there will be two elements: "key" and "value". -The potential keys for any shiny value are listed here: https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/ShinyStats.json +The potential keys for any shiny value are listed here: https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json The value is the shown amount. +## Item type +WIP. This will support crafteds in the future, but for now you must have this: +``` + "item_type": "Gear" +``` + ## Powders ### Powder Limit diff --git a/config_singu.json b/config_singu.json index e234b76..5035b44 100644 --- a/config_singu.json +++ b/config_singu.json @@ -4,6 +4,7 @@ "There are also some values you cannot increase beyond a limit." ], "name":"Singularity", + "item_type": "Gear", "shiny": { "key": "playersKilled", "value": 9223372036854775807 diff --git a/src/errorfr/mod.rs b/src/errorfr/mod.rs index de69614..75d3fde 100644 --- a/src/errorfr/mod.rs +++ b/src/errorfr/mod.rs @@ -20,11 +20,11 @@ pub enum Errorfr { IDMapJsonCorrupt, /// shiny data json is missing - #[error("Error 2.2: ShinyStats.json is missing. \nYou should run \"--download ShinyStats\" or \"--download All\".")] + #[error("Error 2.2: shiny_stats.json is missing. \nYou should run \"--download ShinyStats\" or \"--download All\".")] ShinyJsonMissing, /// shiny data json is corrupt - #[error("Error 2.3: ShinyStats.json is corrupt. \nYou should run \"--download ShinyStats\" or \"--download All\".")] + #[error("Error 2.3: shiny_stats.json is corrupt. \nYou should run \"--download ShinyStats\" or \"--download All\".")] ShinyJsonCorrupt, /// could not download the file diff --git a/src/structures/mod.rs b/src/structures/mod.rs index ce694b8..0549f62 100644 --- a/src/structures/mod.rs +++ b/src/structures/mod.rs @@ -76,11 +76,11 @@ impl From for DownloadJsons { println!("download ID_KEYS"); DownloadJsons::IdKeys } - "ShinyStats" | "shinystats" | "ShinyStats.json" | "shinystats.json" => { + "shiny_stats" | "shinystats" | "shiny_stats.json" | "shinystats.json" => { println!("download SHINY_STATS"); DownloadJsons::ShinyStats } - "All" | "everything" | "both" => { + "all" | "everything" | "both" => { println!("download BOTH"); DownloadJsons::All }