pub struct Creep(_);
Implementations
sourceimpl Creep
impl Creep
pub fn body(&self) -> Vec<Bodypart>
pub fn sign_controller(
&self,
target: &StructureController,
text: &str
) -> 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: ?Sized + Transferable,
pub fn transfer_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: ?Sized + Transferable,
pub fn withdraw_amount<T>(
&self,
target: &T,
ty: ResourceType,
amount: u32
) -> ReturnCodewhere
T: ?Sized + Withdrawable,
pub fn withdraw_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: ?Sized + Withdrawable,
sourceimpl Creep
impl Creep
pub fn attack<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + Attackable,
pub fn dismantle<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + StructureProperties,
pub fn harvest<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + Harvestable,
pub fn heal<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + SharedCreepProperties,
pub fn ranged_attack<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + Attackable,
pub fn ranged_heal<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + SharedCreepProperties,
pub fn repair<T>(&self, target: &T) -> ReturnCodewhere
T: ?Sized + 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 move_pulled_by(&self, target: &Creep) -> ReturnCode
pub fn pull(&self, target: &Creep) -> ReturnCode
pub fn reserve_controller(&self, target: &StructureController) -> ReturnCode
pub fn upgrade_controller(&self, target: &StructureController) -> ReturnCode
Trait Implementations
sourceimpl Attackable for Creep
impl Attackable for Creep
sourceimpl FromExpectedType<Reference> for Creep
impl FromExpectedType<Reference> for Creep
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl HasId for Creep
impl HasId for Creep
sourcefn untyped_id(&self) -> RawObjectId
fn untyped_id(&self) -> RawObjectId
Retrieves this object’s id as an untyped, packed value. Read more
sourceimpl HasStore for Creep
impl HasStore for Creep
fn store_total(&self) -> u32
fn store_types(&self) -> Vec<ResourceType>
fn store_of(&self, ty: ResourceType) -> u32
fn energy(&self) -> u32
fn store_capacity(&self, resource: Option<ResourceType>) -> u32
fn store_free_capacity(&self, resource: Option<ResourceType>) -> i32
fn store_used_capacity(&self, resource: Option<ResourceType>) -> u32
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 PartialEq<Creep> for Creep
impl PartialEq<Creep> for Creep
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
sourceimpl RoomObjectProperties for Creep
impl RoomObjectProperties for Creep
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>
) -> ReturnCodewhere
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>(
&self,
target: &T,
move_options: MoveToOptions<'a, F>
) -> ReturnCodewhere
T: ?Sized + 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>(
&self,
target: &T,
ty: ResourceType,
amount: u32
) -> ReturnCodewhere
T: ?Sized + Transferable,
fn transfer_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: ?Sized + Transferable,
fn withdraw_amount<T>(
&self,
target: &T,
ty: ResourceType,
amount: u32
) -> ReturnCodewhere
T: ?Sized + Withdrawable,
fn withdraw_all<T>(&self, target: &T, ty: ResourceType) -> ReturnCodewhere
T: ?Sized + Withdrawable,
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,
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