pub struct Debugger { /* private fields */ }
Expand description
Helper struct for interacting with Debug API.
Can be accessed through debug
field of bot.
Implementations§
Source§impl Debugger
impl Debugger
Sourcepub fn draw_text_world(
&mut self,
text: &str,
pos: Point3,
color: Option<(u32, u32, u32)>,
size: Option<u32>,
)
pub fn draw_text_world( &mut self, text: &str, pos: Point3, color: Option<(u32, u32, u32)>, size: Option<u32>, )
Draws text in game world with 3d coordinates.
Sourcepub fn draw_text_screen(
&mut self,
text: &str,
pos: Option<(f32, f32)>,
color: Option<(u32, u32, u32)>,
size: Option<u32>,
)
pub fn draw_text_screen( &mut self, text: &str, pos: Option<(f32, f32)>, color: Option<(u32, u32, u32)>, size: Option<u32>, )
Draws text in game window with 2d coordinates, where (0, 0) is left upper corner.
Sourcepub fn draw_line(
&mut self,
p0: Point3,
p1: Point3,
color: Option<(u32, u32, u32)>,
)
pub fn draw_line( &mut self, p0: Point3, p1: Point3, color: Option<(u32, u32, u32)>, )
Draws line in game world from p0
to p1
.
Sourcepub fn draw_box(
&mut self,
p0: Point3,
p1: Point3,
color: Option<(u32, u32, u32)>,
)
pub fn draw_box( &mut self, p0: Point3, p1: Point3, color: Option<(u32, u32, u32)>, )
Draws box in game world with corners p0
and p1
.
Sourcepub fn draw_cube(
&mut self,
pos: Point3,
half_edge: f32,
color: Option<(u32, u32, u32)>,
)
pub fn draw_cube( &mut self, pos: Point3, half_edge: f32, color: Option<(u32, u32, u32)>, )
Draws cube in game world with given half size of edge.
Sourcepub fn draw_sphere(
&mut self,
pos: Point3,
radius: f32,
color: Option<(u32, u32, u32)>,
)
pub fn draw_sphere( &mut self, pos: Point3, radius: f32, color: Option<(u32, u32, u32)>, )
Draws sphere in game world with given radius.
Sourcepub fn create_units<'a, T>(&mut self, cmds: T)
pub fn create_units<'a, T>(&mut self, cmds: T)
Spawns units using given commands in format: (unit type, owner’s player id, position, count).
Sourcepub fn kill_units<'a, T: IntoIterator<Item = &'a u64>>(&mut self, tags: T)
pub fn kill_units<'a, T: IntoIterator<Item = &'a u64>>(&mut self, tags: T)
Kills units with given tags.
Sourcepub fn set_unit_values<'a, T>(&mut self, cmds: T)
pub fn set_unit_values<'a, T>(&mut self, cmds: T)
Sets values for units using given commands in format: (unit tag, value type, value).
Sourcepub fn control_enemy(&mut self)
pub fn control_enemy(&mut self)
Gives ability to control enemy units
Sourcepub fn cheat_supply(&mut self)
pub fn cheat_supply(&mut self)
Disables supply usage
Sourcepub fn cheat_free_build(&mut self)
pub fn cheat_free_build(&mut self)
Makes free all units, structures and upgrades
Sourcepub fn cheat_resources(&mut self)
pub fn cheat_resources(&mut self)
Gives 5000 minerals and gas to the bot
Sourcepub fn cheat_minerals(&mut self)
pub fn cheat_minerals(&mut self)
Gives 5000 minerals to the bot
Sourcepub fn cheat_god(&mut self)
pub fn cheat_god(&mut self)
Makes all bot’s units invincible and significantly increases their damage
Sourcepub fn cheat_cooldown(&mut self)
pub fn cheat_cooldown(&mut self)
Removes cooldown of abilities of bot’s units
Sourcepub fn cheat_tech_tree(&mut self)
pub fn cheat_tech_tree(&mut self)
Removes all tech requirements for bot
Sourcepub fn cheat_upgrades(&mut self)
pub fn cheat_upgrades(&mut self)
First use: researches all upgrades for units and sets level 1 of damage and armor upgrades
Second use: sets level 2 of damage and armor upgrades
Third use: sets level 3 of damage and armor upgrades
Fourth use: disables all upgrades researched with this command
Sourcepub fn cheat_fast_build(&mut self)
pub fn cheat_fast_build(&mut self)
Significantly increases speed of making units, structures and upgrades