unreachable! for debug entries

This commit is contained in:
Llywelwyn 2023-09-22 23:59:15 +01:00
parent b6abfbce4a
commit ae8f0d15a0

View file

@ -727,16 +727,13 @@ pub fn table_by_name(raws: &RawMaster, key: &str, optional_difficulty: Option<i3
return rt; return rt;
} }
} }
console::log( unreachable!(
format!( "Something went wrong when trying to spawn {} @ map difficulty {} [upper bound: {}, lower bound: {}].",
"DEBUGINFO: Something went wrong when trying to spawn {} @ map difficulty {} [upper bound: {}, lower bound: {}]. Returned debug entry.",
key, key,
difficulty, difficulty,
upper_bound, upper_bound,
lower_bound lower_bound
)
); );
return RandomTable::new().add("debug", 1);
} }
/*pub fn parse_dice_string(dice: &str) -> (i32, i32, i32) { /*pub fn parse_dice_string(dice: &str) -> (i32, i32, i32) {