Struct rust_sc2::debug::Debugger[][src]

pub struct Debugger { /* fields omitted */ }
Expand description

Helper struct for interacting with Debug API. Can be accessed through debug field of bot.

Implementations

impl Debugger[src]

pub fn draw_text_world(
    &mut self,
    text: &str,
    pos: Point3,
    color: Option<(u32, u32, u32)>,
    size: Option<u32>
)
[src]

Draws text in game world with 3d coordinates.

pub fn draw_text_screen(
    &mut self,
    text: &str,
    pos: Option<(f32, f32)>,
    color: Option<(u32, u32, u32)>,
    size: Option<u32>
)
[src]

Draws text in game window with 2d coordinates, where (0, 0) is left upper corner.

pub fn draw_line(
    &mut self,
    p0: Point3,
    p1: Point3,
    color: Option<(u32, u32, u32)>
)
[src]

Draws line in game world from p0 to p1.

pub fn draw_box(
    &mut self,
    p0: Point3,
    p1: Point3,
    color: Option<(u32, u32, u32)>
)
[src]

Draws box in game world with corners p0 and p1.

pub fn draw_cube(
    &mut self,
    pos: Point3,
    half_edge: f32,
    color: Option<(u32, u32, u32)>
)
[src]

Draws cube in game world with given half size of edge.

pub fn draw_sphere(
    &mut self,
    pos: Point3,
    radius: f32,
    color: Option<(u32, u32, u32)>
)
[src]

Draws sphere in game world with given radius.

pub fn create_units<'a, T>(&mut self, cmds: T) where
    T: IntoIterator<Item = &'a (UnitTypeId, Option<u32>, Point2, u32)>, 
[src]

Spawns units using given commands in format: (unit type, owner’s player id, position, count).

pub fn kill_units<'a, T: IntoIterator<Item = &'a u64>>(&mut self, tags: T)[src]

Kills units with given tags.

pub fn set_unit_values<'a, T>(&mut self, cmds: T) where
    T: IntoIterator<Item = &'a (u64, UnitValue, u32)>, 
[src]

Sets values for units using given commands in format: (unit tag, value type, value).

pub fn win_game(&mut self)[src]

Ends game with Victory for bot

pub fn end_game(&mut self)[src]

Ends game with Defeat for bot

pub fn show_map(&mut self)[src]

Disables fog of war, makes all map visible

pub fn control_enemy(&mut self)[src]

Gives ability to control enemy units

pub fn cheat_supply(&mut self)[src]

Disables supply usage

pub fn cheat_free_build(&mut self)[src]

Makes free all units, structures and upgrades

pub fn cheat_resources(&mut self)[src]

Gives 5000 minerals and gas to the bot

pub fn cheat_minerals(&mut self)[src]

Gives 5000 minerals to the bot

pub fn cheat_gas(&mut self)[src]

Gives 5000 gas to the bot

pub fn cheat_god(&mut self)[src]

Makes all bot’s units invincible and significantly increases their damage

pub fn cheat_cooldown(&mut self)[src]

Removes cooldown of abilities of bot’s units

pub fn cheat_tech_tree(&mut self)[src]

Removes all tech requirements for bot

pub fn cheat_upgrades(&mut self)[src]

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

pub fn cheat_fast_build(&mut self)[src]

Significantly increases speed of making units, structures and upgrades

Trait Implementations

impl Default for Debugger[src]

fn default() -> Debugger[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V