Skip to content

Commit

Permalink
Named version of create_construction_site. Fixes #62
Browse files Browse the repository at this point in the history
  • Loading branch information
ASalvail committed Sep 29, 2018
1 parent caf4830 commit c84e80c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions screeps-game-api/src/objects/impls/room_position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ impl RoomPosition {
)
}

pub fn create_named_construction_site(&self, ty: StructureType, name: &str) -> ReturnCode {
js_unwrap!(
@{self.as_ref()}.createConstructionSite(__structure_type_num_to_str(@{ty as i32}),
@{name})
)
}

pub fn create_flag(&self, name: &str, main_color: Color, secondary_color: Color) -> ReturnCode {
// TODO: determine if ERR_NOT_IN_RANGE is the best choice here
(js! {
Expand Down

0 comments on commit c84e80c

Please sign in to comment.