Better RoomRunner

This commit is contained in:
2025-07-15 19:36:25 -03:00
parent fb689cc300
commit be66fe0822
7 changed files with 212 additions and 155 deletions

View File

@@ -0,0 +1,8 @@
export const getRoomCreeps = (room: Room): Record<string, CreepMemory> => {
return Object.keys(Memory.creeps)
.filter(name => Memory.creeps[name].room === room.name)
.reduce((creeps: Record<string, CreepMemory>, creepName: string) => {
creeps[creepName] = Memory.creeps[creepName];
return creeps;
}, {});
};