Skip to content

Commit

Permalink
roomIntel bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bencbartlett committed Feb 8, 2019
1 parent 0e38a88 commit 7e37389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/declarations/memory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ interface RoomMemory {
avoid?: boolean;
src?: SavedSource[];
ctrl?: SavedController | undefined;
mnrl: SavedMineral | undefined;
mnrl?: SavedMineral | undefined;
SKlairs?: SavedRoomObject[];
importantStructs?: {
// Positions of important structures relevant to sieges
Expand Down
3 changes: 3 additions & 0 deletions src/intel/RoomIntel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ export class RoomIntel {
}

static getSafetyData(roomName: string): SafetyData {
if (!Memory.rooms[roomName]) {
Memory.rooms[roomName] = {};
}
if (!Memory.rooms[roomName].safety) {
Memory.rooms[roomName].safety = {
safeFor : 0,
Expand Down

0 comments on commit 7e37389

Please sign in to comment.