1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use {constants::ReturnCode, objects::StructurePowerSpawn};
simple_accessors! {
StructurePowerSpawn;
(power -> power -> u32),
(power_capacity -> powerCapacity -> u32),
}
impl StructurePowerSpawn {
// pub fn create_power_creep(&self, name: &str) -> ! {
// unimplemented!()
// }
pub fn process_power(&self) -> ReturnCode {
js_unwrap!{@{self.as_ref()}.processPower()}
}
}