diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6991f78..dd79208 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,7 +88,8 @@ jobs: matrix: rust: - stable - - nightly + # temporarily disabled due to https://github.com/rust-lang/rust-clippy/issues/12377 + #- nightly steps: - name: Checkout sources uses: actions/checkout@v2 diff --git a/src/constants.rs b/src/constants.rs index df5dfee..fbd701f 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -69,8 +69,9 @@ mod types; //pub mod look; // TODO: most/all of this is World specific //pub mod find; // TODO: most/all of this is World specific -pub use self::{small_enums::*, types::*, numbers::*}; -//pub use self::{extra::*, look::*, recipes::FactoryRecipe}; // TODO: most/all of this is World specific +pub use self::{numbers::*, small_enums::*, types::*}; +//pub use self::{extra::*, look::*, recipes::FactoryRecipe}; // TODO: most/all +// of this is World specific // pub use self::find::{FindConstant, Find, CREEPS, MY_CREEPS, HOSTILE_CREEPS, // SOURCES_ACTIVE, SOURCES, DROPPED_RESOURCES, STRUCTURES, MY_STRUCTURES, diff --git a/src/constants/numbers.rs b/src/constants/numbers.rs index e40ebb0..ee5d2fc 100644 --- a/src/constants/numbers.rs +++ b/src/constants/numbers.rs @@ -1,15 +1,14 @@ - pub const BODYPART_HITS: u32 = 100; -pub const RANGED_ATTACK_POWER: u32 = 10; +pub const RANGED_ATTACK_POWER: u32 = 10; -pub const RANGED_ATTACK_DISTANCE_RATE: &[f32;4] = &[1.0_f32, 1.0_f32, 0.4_f32, 0.1_f32]; +pub const RANGED_ATTACK_DISTANCE_RATE: &[f32; 4] = &[1.0_f32, 1.0_f32, 0.4_f32, 0.1_f32]; -pub const ATTACK_POWER: u32 = 30; +pub const ATTACK_POWER: u32 = 30; -pub const HEAL_POWER: u32 = 12; +pub const HEAL_POWER: u32 = 12; -pub const RANGED_HEAL_POWER: u32 = 4; +pub const RANGED_HEAL_POWER: u32 = 4; pub const CARRY_CAPACITY: u32 = 50; @@ -25,7 +24,14 @@ pub const HARVEST_POWER: u32 = 2; pub const BUILD_POWER: u32 = 5; -pub const OBSTACLE_OBJECT_TYPES: &[&str;6] = &["creep","tower","constructedWall","spawn","extension","link"]; +pub const OBSTACLE_OBJECT_TYPES: &[&str; 6] = &[ + "creep", + "tower", + "constructedWall", + "spawn", + "extension", + "link", +]; pub const TOWER_ENERGY_COST: u32 = 10; @@ -53,9 +59,9 @@ pub const MAX_CREEP_SIZE: u32 = 50; pub const CREEP_SPAWN_TIME: u32 = 3; -pub const RESOURCE_ENERGY: &str = "energy"; +pub const RESOURCE_ENERGY: &str = "energy"; -pub const RESOURCES_ALL: &[&str;1] = &[RESOURCE_ENERGY]; +pub const RESOURCES_ALL: &[&str; 1] = &[RESOURCE_ENERGY]; pub const SOURCE_ENERGY_REGEN: u32 = 10;