pub struct Creep(_);
Implementations
sourceimpl Creep
impl Creep
pub fn body(&self) -> Vec<Bodypart>
pub fn carry_total(&self) -> u32
pub fn carry_types(&self) -> Vec<ResourceType>
pub fn carry_of(&self, ty: ResourceType) -> u32
pub fn drop(&self, ty: ResourceType, amount: Option<u32>) -> ReturnCode
pub fn energy(&self) -> u32
pub fn owner_name(&self) -> String
pub fn cancel_order(&self, name: &str) -> ReturnCode
pub fn move_direction(&self, dir: Direction) -> ReturnCode
pub fn move_to_xy(&self, x: u32, y: u32) -> ReturnCode
pub fn move_to_xy_with_options<'a, F>(
&self,
x: u32,
y: u32,
move_options: MoveToOptions<'a, F>
) -> ReturnCodewhere
F: Fn(String, CostMatrix<'_>) -> Option<CostMatrix<'a>> + 'a,
pub fn move_to<T: HasPosition>(&self, target: &T) -> ReturnCode
pub fn move_to_with_options<'a, F, T: HasPosition>(
&self,
target: &T,
move_options: MoveToOptions<'a, F>
) -> ReturnCodewhere
F: Fn(String, CostMatrix<'_>) -> Option<CostMatrix<'a>> + 'a,
pub fn move_by_path_serialized(&self, path: &str) -> ReturnCode
pub fn move_by_path_steps(&self, path: &[Step]) -> ReturnCode
pub fn move_by_path_search_result(&self, path: &SearchResults) -> ReturnCode
pub fn memory(&self) -> MemoryReference
pub fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode
pub fn say(&self, msg: &str, public: bool) -> ReturnCode
pub fn sign_controller(
&self,
target: &StructureController,
text: &str
) -> ReturnCode
pub fn suicide(&self) -> ReturnCode
pub fn get_active_bodyparts(&self, ty: Part) -> u32
pub fn ranged_mass_attack(&self) -> ReturnCode
pub fn transfer_amount<T>(
&self,
target: &T,
ty: ResourceType,
amount: u32
) -> ReturnCodewhere
T: Transferable,
pub fn transfer_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: Transferable,
pub fn withdraw_amount<T>(
&self,
target: &T,
ty: ResourceType,
amount: u32
) -> ReturnCodewhere
T: Withdrawable,
pub fn withdraw_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: Withdrawable,
sourceimpl Creep
impl Creep
pub fn attack<T>(&self, target: &T) -> ReturnCodewhere
T: Attackable,
pub fn dismantle<T>(&self, target: &T) -> ReturnCodewhere
T: StructureProperties,
pub fn ranged_attack<T>(&self, target: &T) -> ReturnCodewhere
T: Attackable,
pub fn repair<T>(&self, target: &T) -> ReturnCodewhere
T: StructureProperties,
sourceimpl Creep
impl Creep
pub fn attack_controller(&self, target: &StructureController) -> ReturnCode
pub fn build(&self, target: &ConstructionSite) -> ReturnCode
pub fn claim_controller(&self, target: &StructureController) -> ReturnCode
pub fn generate_safe_mode(&self, target: &StructureController) -> ReturnCode
pub fn harvest(&self, target: &Source) -> ReturnCode
pub fn heal(&self, target: &Creep) -> ReturnCode
pub fn pickup(&self, target: &Resource) -> ReturnCode
pub fn ranged_heal(&self, target: &Creep) -> ReturnCode
pub fn reserve_controller(&self, target: &StructureController) -> ReturnCode
pub fn upgrade_controller(&self, target: &StructureController) -> ReturnCode
Trait Implementations
sourceimpl FromExpectedType<Reference> for Creep
impl FromExpectedType<Reference> for Creep
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl InstanceOf for Creep
impl InstanceOf for Creep
sourcefn instance_of(reference: &Reference) -> bool
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type
Self
.sourceimpl ReferenceType for Creep
impl ReferenceType for Creep
sourceunsafe fn from_reference_unchecked(reference: Reference) -> Self
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper.
Doesn’t do any type checking; highly unsafe to use! Read more
impl Eq for Creep
impl JsSerialize for Creep
impl Transferable for Creep
Auto Trait Implementations
impl RefUnwindSafe for Creep
impl Send for Creep
impl Sync for Creep
impl Unpin for Creep
impl UnwindSafe for Creep
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromExpectedType<Value> for Twhere
T: FromExpectedType<Reference>,
impl<T> FromExpectedType<Value> for Twhere
T: FromExpectedType<Reference>,
fn from_expected_type(v: Value) -> Result<T, ConversionError>
sourceimpl<T> HasPosition for Twhere
T: RoomObjectProperties,
impl<T> HasPosition for Twhere
T: RoomObjectProperties,
fn pos(&self) -> RoomPosition
sourceimpl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
impl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
sourcefn into_expected_type(self) -> Result<U, ConversionError>
fn into_expected_type(self) -> Result<U, ConversionError>
Casts this value as the target type, making the assumption that the types are correct. Read more