Trait screeps::prelude::SharedCreepProperties[][src]

pub unsafe trait SharedCreepProperties: RoomObjectProperties {
    fn cancel_order(&self, name: &str) -> ReturnCode { ... }
fn drop(&self, ty: ResourceType, amount: Option<u32>) -> ReturnCode { ... }
fn move_direction(&self, dir: Direction) -> ReturnCode { ... }
fn move_to_xy(&self, x: u32, y: u32) -> ReturnCode { ... }
fn move_to_xy_with_options<'a, F>(
        &self,
        x: u32,
        y: u32,
        move_options: MoveToOptions<'a, F>
    ) -> ReturnCode
    where
        F: FnMut(RoomName, CostMatrix<'a>) -> SingleRoomCostResult<'a> + 'a
, { ... }
fn move_to<T: ?Sized + HasPosition>(&self, target: &T) -> ReturnCode { ... }
fn move_to_with_options<'a, F, T: ?Sized>(
        &self,
        target: &T,
        move_options: MoveToOptions<'a, F>
    ) -> ReturnCode
    where
        T: HasPosition,
        F: FnMut(RoomName, CostMatrix<'a>) -> SingleRoomCostResult<'a> + 'a
, { ... }
fn move_by_path_serialized(&self, path: &str) -> ReturnCode { ... }
fn move_by_path_steps(&self, path: &[Step]) -> ReturnCode { ... }
fn move_by_path_search_result(&self, path: &SearchResults) -> ReturnCode { ... }
fn memory(&self) -> MemoryReference { ... }
fn my(&self) -> bool { ... }
fn name(&self) -> String { ... }
fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode { ... }
fn owner_name(&self) -> String { ... }
fn pickup(&self, target: &Resource) -> ReturnCode { ... }
fn say(&self, msg: &str, public: bool) -> ReturnCode { ... }
fn saying(&self) -> String { ... }
fn suicide(&self) -> ReturnCode { ... }
fn ticks_to_live(&self) -> Result<u32, ConversionError> { ... }
fn transfer_amount<T: ?Sized>(
        &self,
        target: &T,
        ty: ResourceType,
        amount: u32
    ) -> ReturnCode
    where
        T: Transferable
, { ... }
fn transfer_all<T: ?Sized>(
        &self,
        target: &T,
        ty: ResourceType
    ) -> ReturnCode
    where
        T: Transferable
, { ... }
fn withdraw_amount<T: ?Sized>(
        &self,
        target: &T,
        ty: ResourceType,
        amount: u32
    ) -> ReturnCode
    where
        T: Withdrawable
, { ... }
fn withdraw_all<T: ?Sized>(
        &self,
        target: &T,
        ty: ResourceType
    ) -> ReturnCode
    where
        T: Withdrawable
, { ... } }

Trait for all wrappers over Screeps JavaScript objects that are creeps or power creeps

Contracts

The reference returned by AsRef<Reference>::as_ref must reference a JavaScript object that an instance of Creep or PowerCreep

Provided methods

fn cancel_order(&self, name: &str) -> ReturnCode[src]

fn drop(&self, ty: ResourceType, amount: Option<u32>) -> ReturnCode[src]

fn move_direction(&self, dir: Direction) -> ReturnCode[src]

fn move_to_xy(&self, x: u32, y: u32) -> ReturnCode[src]

fn move_to_xy_with_options<'a, F>(
    &self,
    x: u32,
    y: u32,
    move_options: MoveToOptions<'a, F>
) -> ReturnCode where
    F: FnMut(RoomName, CostMatrix<'a>) -> SingleRoomCostResult<'a> + 'a, 
[src]

fn move_to<T: ?Sized + HasPosition>(&self, target: &T) -> ReturnCode[src]

fn move_to_with_options<'a, F, T: ?Sized>(
    &self,
    target: &T,
    move_options: MoveToOptions<'a, F>
) -> ReturnCode where
    T: HasPosition,
    F: FnMut(RoomName, CostMatrix<'a>) -> SingleRoomCostResult<'a> + 'a, 
[src]

fn move_by_path_serialized(&self, path: &str) -> ReturnCode[src]

fn move_by_path_steps(&self, path: &[Step]) -> ReturnCode[src]

fn move_by_path_search_result(&self, path: &SearchResults) -> ReturnCode[src]

fn memory(&self) -> MemoryReference[src]

fn my(&self) -> bool[src]

fn name(&self) -> String[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn owner_name(&self) -> String[src]

fn pickup(&self, target: &Resource) -> ReturnCode[src]

fn say(&self, msg: &str, public: bool) -> ReturnCode[src]

fn saying(&self) -> String[src]

fn suicide(&self) -> ReturnCode[src]

fn ticks_to_live(&self) -> Result<u32, ConversionError>[src]

fn transfer_amount<T: ?Sized>(
    &self,
    target: &T,
    ty: ResourceType,
    amount: u32
) -> ReturnCode where
    T: Transferable
[src]

fn transfer_all<T: ?Sized>(&self, target: &T, ty: ResourceType) -> ReturnCode where
    T: Transferable
[src]

fn withdraw_amount<T: ?Sized>(
    &self,
    target: &T,
    ty: ResourceType,
    amount: u32
) -> ReturnCode where
    T: Withdrawable
[src]

fn withdraw_all<T: ?Sized>(&self, target: &T, ty: ResourceType) -> ReturnCode where
    T: Withdrawable
[src]

Loading content...

Implementors

impl SharedCreepProperties for Creep[src]

impl SharedCreepProperties for PowerCreep[src]

Loading content...