This commit is contained in:
endernon 2024-11-05 19:47:47 +00:00
parent 6b5f051b5a
commit 0b120eda74
2 changed files with 5 additions and 3 deletions

View file

@ -8,9 +8,9 @@ pub enum Errorfr {
ItemJsonMissing,
/// item config json is corrupt
#[error("Error 2: item config json is corrupt, Reread config.md"
#[error("Error 2: item config json is corrupt, Reread config.md\n{:?}"
)]
ItemJsonCorrupt,
ItemJsonCorrupt(serde_json::Error),
/// idmap is missing
#[error("Error 3: id_keys.json is missing")]

View file

@ -51,7 +51,7 @@ fn cook() -> Result<(), Errorfr> {
configpath = configpathargs;
}
// newest json reading code
// load configs
let json_config: Jsonconfig = serde_json::from_reader(fs::File::open(configpath)
.map_err(|_| Errorfr::ItemJsonMissing)?)
.map_err(|_| Errorfr::ItemJsonCorrupt)?;
@ -63,6 +63,8 @@ fn cook() -> Result<(), Errorfr> {
.map_err(|_| Errorfr::ShinyJsonCorrupt)?;
// println!("{:?}",idsmap.get("airDamage"));
// create necessary variables
let mut out = Vec::new();
let ver = TransformVersion::Version1;