Adds style checking to CI, remove debug code
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
bd646df225
commit
59cc150643
|
@ -35,3 +35,10 @@ steps:
|
||||||
- cargo llvm-cov nextest --color=always
|
- cargo llvm-cov nextest --color=always
|
||||||
depends_on:
|
depends_on:
|
||||||
- test-debug-linux
|
- test-debug-linux
|
||||||
|
- name: check-style
|
||||||
|
image: deukhoofd/linux64builder
|
||||||
|
failure: ignore
|
||||||
|
commands:
|
||||||
|
- cargo fmt --all -- --check
|
||||||
|
depends_on:
|
||||||
|
- test-debug-linux
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
pub mod battle_stat_calculator;
|
pub mod battle_stat_calculator;
|
||||||
pub mod damage_library;
|
pub mod damage_library;
|
||||||
pub mod dynamic_library;
|
pub mod dynamic_library;
|
||||||
pub mod script_resolver;
|
|
||||||
pub mod misc_library;
|
pub mod misc_library;
|
||||||
|
pub mod script_resolver;
|
||||||
|
|
|
@ -7,5 +7,5 @@ pub mod damage_source;
|
||||||
pub mod executing_move;
|
pub mod executing_move;
|
||||||
pub mod learned_move;
|
pub mod learned_move;
|
||||||
pub mod pokemon;
|
pub mod pokemon;
|
||||||
pub mod pokemon_party;
|
|
||||||
pub mod pokemon_builder;
|
pub mod pokemon_builder;
|
||||||
|
pub mod pokemon_party;
|
||||||
|
|
|
@ -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 file = File::open(path.to_string() + "Moves.json").unwrap();
|
||||||
let mut data = String::new();
|
let mut data = String::new();
|
||||||
file.read_to_string(&mut data).unwrap();
|
file.read_to_string(&mut data).unwrap();
|
||||||
println!("1");
|
|
||||||
let json: Value = serde_json::from_str(&data).unwrap();
|
let json: Value = serde_json::from_str(&data).unwrap();
|
||||||
println!("a");
|
|
||||||
let data = json.as_object().unwrap().get("data").unwrap().as_array().unwrap();
|
let data = json.as_object().unwrap().get("data").unwrap().as_array().unwrap();
|
||||||
println!("this");
|
|
||||||
let mut move_library = MoveLibrary::new(data.len());
|
let mut move_library = MoveLibrary::new(data.len());
|
||||||
println!("Heeere");
|
|
||||||
for move_data in data {
|
for move_data in data {
|
||||||
let move_data = move_data.as_object().unwrap();
|
let move_data = move_data.as_object().unwrap();
|
||||||
let move_name = StringKey::new(move_data["name"].as_str().unwrap().clone());
|
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 = StringKey::new(move_data["type"].as_str().unwrap());
|
||||||
let move_type_id = type_library.get_type_id(&move_type);
|
let move_type_id = type_library.get_type_id(&move_type);
|
||||||
let move_category = serde_json::from_value(move_data["category"].clone()).unwrap();
|
let move_category = serde_json::from_value(move_data["category"].clone()).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue