Enum screeps::enums::MovableObject  
source · pub enum MovableObject {
    Creep(Creep),
    PowerCreep(PowerCreep),
}Variants§
Creep(Creep)
PowerCreep(PowerCreep)
Trait Implementations§
source§impl From<Creep> for MovableObject
 
impl From<Creep> for MovableObject
source§fn from(v: Creep) -> MovableObject
 
fn from(v: Creep) -> MovableObject
source§impl From<PowerCreep> for MovableObject
 
impl From<PowerCreep> for MovableObject
source§fn from(v: PowerCreep) -> MovableObject
 
fn from(v: PowerCreep) -> MovableObject
source§fn memory(&self) -> JsValue
 
fn memory(&self) -> JsValue
A shortcut to the part of the Memory tree used for this creep by
default
source§fn set_memory(&self, __enum_dispatch_arg_0: &JsValue)
 
fn set_memory(&self, __enum_dispatch_arg_0: &JsValue)
Sets a new value to the memory object shortcut for this creep.
source§fn ticks_to_live(&self) -> Option<u32>
 
fn ticks_to_live(&self) -> Option<u32>
The number of ticks the creep has left to live.
source§fn cancel_order(&self, __enum_dispatch_arg_0: &JsString) -> ReturnCode
 
fn cancel_order(&self, __enum_dispatch_arg_0: &JsString) -> ReturnCode
Cancel an a successfully called creep function from earlier in the tick,
with a JsString that must contain the JS version of the function
name.
source§fn drop(
    &self,
    __enum_dispatch_arg_0: ResourceType,
    __enum_dispatch_arg_1: Option<u32>
) -> ReturnCode
 
fn drop( &self, __enum_dispatch_arg_0: ResourceType, __enum_dispatch_arg_1: Option<u32> ) -> ReturnCode
Drop a resource on the ground from the creep’s Store.
source§fn move_direction(&self, __enum_dispatch_arg_0: Direction) -> ReturnCode
 
fn move_direction(&self, __enum_dispatch_arg_0: Direction) -> ReturnCode
Move one square in the specified direction.
source§fn move_by_path(&self, __enum_dispatch_arg_0: &JsValue) -> ReturnCode
 
fn move_by_path(&self, __enum_dispatch_arg_0: &JsValue) -> ReturnCode
Move the creep along a previously determined path returned from a pathfinding function, in array or serialized string form.
source§fn move_to<T>(&self, __enum_dispatch_arg_0: T) -> ReturnCodewhere
    T: HasPosition,
 
fn move_to<T>(&self, __enum_dispatch_arg_0: T) -> ReturnCodewhere T: HasPosition,
Move the creep toward the specified goal, either a RoomPosition or
RoomObject. Note that using this function will store data in
Memory.creeps[creep_name] and enable the default serialization
behavior of the Memory object, which may hamper attempts to directly
use RawMemory.
source§fn move_to_with_options<T, F>(
    &self,
    __enum_dispatch_arg_0: T,
    __enum_dispatch_arg_1: Option<MoveToOptions<F>>
) -> ReturnCodewhere
    T: HasPosition,
    F: FnMut(RoomName, CostMatrix) -> SingleRoomCostResult,
 
fn move_to_with_options<T, F>( &self, __enum_dispatch_arg_0: T, __enum_dispatch_arg_1: Option<MoveToOptions<F>> ) -> ReturnCodewhere T: HasPosition, F: FnMut(RoomName, CostMatrix) -> SingleRoomCostResult,
Move the creep toward the specified goal, either a RoomPosition or
RoomObject. Note that using this function will store data in
Memory.creeps[creep_name] and enable the default serialization
behavior of the Memory object, which may hamper attempts to directly
use RawMemory.
source§fn notify_when_attacked(&self, __enum_dispatch_arg_0: bool) -> ReturnCode
 
fn notify_when_attacked(&self, __enum_dispatch_arg_0: bool) -> ReturnCode
Whether to send an email notification when this creep is attacked.
source§fn pickup(&self, __enum_dispatch_arg_0: &Resource) -> ReturnCode
 
fn pickup(&self, __enum_dispatch_arg_0: &Resource) -> ReturnCode
Pick up a Resource in melee range (or at the same position as the
creep).
source§fn say(
    &self,
    __enum_dispatch_arg_0: &str,
    __enum_dispatch_arg_1: bool
) -> ReturnCode
 
fn say( &self, __enum_dispatch_arg_0: &str, __enum_dispatch_arg_1: bool ) -> ReturnCode
Display a string in a bubble above the creep next tick. 10 character limit.
source§fn suicide(&self) -> ReturnCode
 
fn suicide(&self) -> ReturnCode
Immediately kill the creep.
source§fn transfer<T>(
    &self,
    __enum_dispatch_arg_0: &T,
    __enum_dispatch_arg_1: ResourceType,
    __enum_dispatch_arg_2: Option<u32>
) -> ReturnCodewhere
    T: Transferable,
 
fn transfer<T>( &self, __enum_dispatch_arg_0: &T, __enum_dispatch_arg_1: ResourceType, __enum_dispatch_arg_2: Option<u32> ) -> ReturnCodewhere T: Transferable,
Transfer a resource from the creep’s store to Structure,
PowerCreep, or another Creep.