tbh
This commit is contained in:
parent
6b5f051b5a
commit
0b120eda74
2 changed files with 5 additions and 3 deletions
|
@ -8,9 +8,9 @@ pub enum Errorfr {
|
||||||
ItemJsonMissing,
|
ItemJsonMissing,
|
||||||
|
|
||||||
/// item config json is corrupt
|
/// 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
|
/// idmap is missing
|
||||||
#[error("Error 3: id_keys.json is missing")]
|
#[error("Error 3: id_keys.json is missing")]
|
||||||
|
|
|
@ -51,7 +51,7 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
configpath = configpathargs;
|
configpath = configpathargs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// newest json reading code
|
// load configs
|
||||||
let json_config: Jsonconfig = serde_json::from_reader(fs::File::open(configpath)
|
let json_config: Jsonconfig = serde_json::from_reader(fs::File::open(configpath)
|
||||||
.map_err(|_| Errorfr::ItemJsonMissing)?)
|
.map_err(|_| Errorfr::ItemJsonMissing)?)
|
||||||
.map_err(|_| Errorfr::ItemJsonCorrupt)?;
|
.map_err(|_| Errorfr::ItemJsonCorrupt)?;
|
||||||
|
@ -63,6 +63,8 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
.map_err(|_| Errorfr::ShinyJsonCorrupt)?;
|
.map_err(|_| Errorfr::ShinyJsonCorrupt)?;
|
||||||
// println!("{:?}",idsmap.get("airDamage"));
|
// println!("{:?}",idsmap.get("airDamage"));
|
||||||
|
|
||||||
|
|
||||||
|
// create necessary variables
|
||||||
let mut out = Vec::new();
|
let mut out = Vec::new();
|
||||||
let ver = TransformVersion::Version1;
|
let ver = TransformVersion::Version1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue