This commit is contained in:
JMARyA 2024-09-19 22:56:31 +02:00
parent 416c1f06c1
commit 055395337c
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 7 additions and 5 deletions

4
.gitignore vendored
View file

@ -1,3 +1,5 @@
/target
/db
/itemdb
/itemdb
/flows
/locations

View file

@ -34,8 +34,7 @@ pub async fn verify_integrity(
.1
.next
.as_ref()
.map(|x| flows.get(x).is_none())
.unwrap_or(false)
.map_or(false, |x| flows.get(x).is_none())
{
log::error!(
"Flow '{}' is referencing unknown flow '{}' as next step.",
@ -51,8 +50,7 @@ pub async fn verify_integrity(
.1
.parent
.as_ref()
.map(|x| flows.get(x).is_none())
.unwrap_or(false)
.map_or(false, |x| locations.get(x).is_none())
{
log::error!(
"Location '{}' is referencing an unknown location '{}' as parent.",
@ -66,6 +64,8 @@ pub async fn verify_integrity(
if tainted {
std::process::exit(1);
}
log::info!("Passed basic integrity check");
}
pub fn verify_item_variant_exists(item_variant: &str, id: &str, itemdb: &ItemDB) -> Option<bool> {