Trait screeps::objects::HasStore

source ·
pub unsafe trait HasStore: RoomObjectProperties {
    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) -> u32 { ... }
}
Expand description

Trait for all wrappers over Screeps JavaScript objects with a store property.

Contracts

The JavaScript object referenced by the return of AsRef<Reference>::as_ref must have a store property. Additionally, if it does not have a storeCapacity property, HasStore::store_capacity must be overridden.

The store property must be a dict from string resource types to integers.

If present, the storeCapacity property must be an integer.

Provided Methods

Implementors