Skip to content

Commit

Permalink
Fix expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityDevTech committed Oct 2, 2024
1 parent 3e61822 commit 8403cb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/combat/goals/room_claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,15 @@ fn achieve_goal(goal_room: &RoomName, memory: &mut ScreepsMemory, cache: &mut Ro
let xy = new_xy(x, y);

let score = available_positions.get(xy);
let mut should_continue = false;

for exit in &xy_exits {
if exit.get_range_to(xy) <= 8 {
continue;
should_continue = true;
}
}

if score >= 7 {
if score >= 7 && !should_continue {
available_xy.push(xy);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub fn game_loop() {
memory.stats.cpu.rooms = game::cpu::get_used() - pre_room_cpu - cache.creep_cpu;
info!("[GOVERNMENT] Global government execution took {:.2} CPU for {} rooms.", game::cpu::get_used() - pre_room_cpu, game::rooms().keys().count());

if game::time() % 1500 == 0 {
if game::time() % 100 == 0 {
for room in memory.rooms.clone().keys() {
let groom = game::rooms().get(*room);

Expand Down

0 comments on commit 8403cb2

Please sign in to comment.