Adds style checking to CI, remove debug code
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-16 19:05:54 +02:00
parent bd646df225
commit 59cc150643
4 changed files with 9 additions and 7 deletions

View File

@@ -36,17 +36,12 @@ pub fn load_moves(path: &String, type_library: &TypeLibrary) -> MoveLibrary {
let mut file = File::open(path.to_string() + "Moves.json").unwrap();
let mut data = String::new();
file.read_to_string(&mut data).unwrap();
println!("1");
let json: Value = serde_json::from_str(&data).unwrap();
println!("a");
let data = json.as_object().unwrap().get("data").unwrap().as_array().unwrap();
println!("this");
let mut move_library = MoveLibrary::new(data.len());
println!("Heeere");
for move_data in data {
let move_data = move_data.as_object().unwrap();
let move_name = StringKey::new(move_data["name"].as_str().unwrap().clone());
println!("Loaded move {:?}", move_name);
let move_type = StringKey::new(move_data["type"].as_str().unwrap());
let move_type_id = type_library.get_type_id(&move_type);
let move_category = serde_json::from_value(move_data["category"].clone()).unwrap();