Crate sc2 [] [src]

StarCraft II API for Rust

this API is intended to provide functionality similar to that of Blizzard and Google's StarCraft II API

Structs

AbilityData

data about an ability

Action

an action (command or ability) applied to a unit or set of units

BuffData

buff data

ClientRequest

a request to send to the game instance

CtrlcBreakerCell

cell that stops the organelle upon Ctrl-C

Effect

visuals of a persistent ability on the map (eg. PsiStorm)

Error

The Error type.

FrameData

all game data passed to agents and observers

GameData

game data (may vary depending on version and DLC)

GamePorts

all port settings for a game

GameSettings

settings for a game

GameState

state of the game (changes every frame)

ImageData

data used to sample the current state of the map at certain points

LauncherCell

cell in charge of launching game instances and assigning ports

LauncherSettings

settings used to create a launcher

MapState

current state of the map

MeleeSettings

settings for the melee cell

PortSet

endpoint port settings

PowerSource

power source information for Protoss

Rect

generic structure to represent a 2D rectangle

Rect2

2D rectangle represented by two points

Score

score evaluated at the end of a game

TerrainInfo

terrain info

Unit

a unit (could be structure, a worker, or military)

UnitTypeData

data about a unit type

UpgradeData

upgrade data

Enums

Ability

list of known StarCraft II abilities

ActionTarget

action target

AgentCell

mediates interactions between the player and the game instance

Alliance

relationship to this player

Buff

list of known StarCraft II buffs

ClientResult

the result of a transaction with the game instance

Command

a command to issue to the game instance

ComputerCell

cell that acts as the built-in SC2 AI

DebugCommand

a debug command for the game

DebugTextTarget

target for debugging text

Difficulty

difficulty setting for built-in StarCraft II AI

DisplayType

whether the unit is shown on screen or not

ErrorKind

The kind of an error.

GameEvent

an event from the game

Map

different ways of specifying a map

MeleeCell

cell designed to pit two bots against each other in Sc2 games

MeleeSuite

suite of games to choose from when pitting bots against each other

Message

the messages that can be sent between Sc2 capable

PlayerSetup

settings for players

Race

race of the player

Role

defines the roles that govern how connections between cells are made

SpatialAction

feature layer action

UnitType

list of known StarCraft II unit types

Upgrade

a list of known StarCraft II upgrades

Visibility

visibility of a point on the terrain

Traits

ResultExt

Additional methods for Result, for easy interaction with this crate.

Type Definitions

Color

color type for debug commands

Eukaryote

type alias for an Sc2 Eukaryote

Organelle

type alias for an Sc2 Organelle

Point2

2D point used to specify location

Point3

3D point used to specify location

Result

Convenient wrapper around std::Result.

Soma

type alias for an Sc2 Soma

Tag

unique tag for a unit instance

Vector2

2D vector used to specify direction

Vector3

3D vector used to specify direction