1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use wasm_bindgen::prelude::*;

use crate::objects::{OwnedStructure, RoomObject, Structure};

#[wasm_bindgen]
extern "C" {
    /// An object representing a [`StructureKeeperLair`], which regularly spawns
    /// creeps to defend nearby resources.
    ///
    /// [Screeps documentation](https://docs.screeps.com/api/#StructureKeeperLair)
    #[wasm_bindgen(extends = RoomObject, extends = Structure, extends = OwnedStructure)]
    #[derive(Clone, Debug)]
    pub type StructureKeeperLair;

    /// The number of ticks until the [`StructureKeeperLair`] will spawn a new
    /// creep.
    ///
    /// [Screeps documentation](https://docs.screeps.com/api/#StructureKeeperLair.ticksToSpawn)
    #[wasm_bindgen(method, getter = ticksToSpawn)]
    pub fn ticks_to_spawn(this: &StructureKeeperLair) -> u32;
}