pub unsafe trait RoomObjectProperties: AsRef<Reference> + HasPosition {
    fn room(&self) -> Option<Room> { ... }
    fn effects(&self) -> Vec<Effect> { ... }
}
Expand description

Trait for all wrappers over Screeps JavaScript objects extending the RoomObject class.

Contracts

The reference returned by AsRef<Reference>::as_ref must reference a JavaScript object extending the RoomObject class.

Provided Methods

The room that the object is in, or None if an object is a flag or a construction site and is placed in a room that is not visible to you.

Implementors