1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
use crate::{constants::ReturnCode, objects::StructurePowerSpawn};

simple_accessors! {
    impl StructurePowerSpawn {
        pub fn power() -> u32 = power;
        pub fn power_capacity() -> u32 = powerCapacity;
    }
}

impl StructurePowerSpawn {
    // pub fn create_power_creep(&self, name: &str) -> ! {
    //     unimplemented!()
    // }

    pub fn process_power(&self) -> ReturnCode {
        js_unwrap! {@{self.as_ref()}.processPower()}
    }
}