Spawn Room Detection

This commit is contained in:
2025-07-07 20:05:13 -03:00
parent 4f28d240e0
commit c2a9df5e77
9 changed files with 225 additions and 61 deletions

View File

@@ -1,3 +1,5 @@
import { CreepDestination } from "types/creeps";
import { SourcePositionMatrix, SourceSpotStatus } from "./types/source";
import SpawnHandler from "spawnHandler";
declare global {
@@ -11,8 +13,8 @@ declare global {
*/
interface SourceState {
id: string;
spots: SourcePositionMatrix;
pos: RoomPosition;
maxHarvesters: number|null;
currentHarvesters: number;
}
@@ -30,7 +32,9 @@ declare global {
interface CreepMemory {
role: string;
room: string;
spawnId: string;
working: boolean;
destination?: CreepDestination;
}
// Syntax for adding proprties to `global` (ex "global.log")