screeps/objects/impls/
structure_keeper_lair.rs

1use wasm_bindgen::prelude::*;
2
3use crate::{
4    objects::{OwnedStructure, RoomObject, Structure},
5    prelude::*,
6};
7
8#[wasm_bindgen]
9extern "C" {
10    /// An object representing a [`StructureKeeperLair`], which regularly spawns
11    /// creeps to defend nearby resources.
12    ///
13    /// [Screeps documentation](https://docs.screeps.com/api/#StructureKeeperLair)
14    #[wasm_bindgen(extends = RoomObject, extends = Structure, extends = OwnedStructure)]
15    #[derive(Clone, Debug)]
16    pub type StructureKeeperLair;
17
18    /// The number of ticks until the [`StructureKeeperLair`] will spawn a new
19    /// creep.
20    ///
21    /// [Screeps documentation](https://docs.screeps.com/api/#StructureKeeperLair.ticksToSpawn)
22    #[wasm_bindgen(method, getter = ticksToSpawn)]
23    pub fn ticks_to_spawn(this: &StructureKeeperLair) -> u32;
24}
25
26impl Attackable for StructureKeeperLair {}