#import "HMAnchorageRepairManager.h"
+#import "HMAppDelegate.h"
+
#import "HMServerDataStore.h"
#import "HMKCDeck+Extension.h"
#import "HMKCShipObject+Extensions.h"
[self buildMembers];
[self resetRepairTime];
+
+ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
+ [nc addObserver:self
+ selector:@selector(didRecivePortAPINotification:)
+ name:HMPortAPIRecieveNotification
+ object:nil];
}
return self;
}
// context:@"members"];
}
+- (void)didRecivePortAPINotification:(NSNotification *)notification
+{
+ NSDate *finishDate = [self.repairTime dateByAddingTimeInterval:20 * 60];
+ if([finishDate compare:[NSDate dateWithTimeIntervalSinceNow:0.0]] == NSOrderedAscending) {
+ [self resetRepairTime];
+ }
+}
+
- (NSArray *)repairShipIds
{
return @[@(19)];