Skip to content

Commit

Permalink
Comment out things causing build errors.
Browse files Browse the repository at this point in the history
(screeps_timing_annotate)
  • Loading branch information
InfinityDevTech committed May 30, 2024
1 parent 9b41bec commit 65c03c8
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 64 deletions.
121 changes: 61 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ wasm-opt = ["-O4", "--disable-sign-ext"]

[features]
default = ["profile"]
profile = ["screeps-timing", "screeps-timing-annotate"]
# "screeps-timing-annotate"
profile = ["screeps-timing"]

sim = ["screeps-game-api/sim"]
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pub fn init() {
}

#[wasm_bindgen]
#[cfg_attr(feature = "profile", screeps_timing_annotate::timing)]
// , screeps_timing_annotate::timing
#[cfg(feature = "profile")]
pub fn game_loop() {
#[cfg(feature = "profile")]
{
Expand Down Expand Up @@ -75,7 +76,7 @@ pub fn game_loop() {
{
let trace = screeps_timing::stop_trace();

if let Some(trace_output) = serde_json::to_string(&trace).ok() {
if let Ok(trace_output) = serde_json::to_string(&trace) {
info!("{}", trace_output);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/room/cache/structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl RoomStructureCache {
};

if let Some(controller) = room.controller() {
let containers = controller.pos().find_in_range(find::STRUCTURES, 1);
let containers = controller.pos().find_in_range(find::STRUCTURES, 2);
let container = containers
.iter()
.find(|c| matches!(c, StructureObject::StructureContainer(_)));
Expand Down

0 comments on commit 65c03c8

Please sign in to comment.