OSDN Git Service

分岐係数込みの判定式(33)の値が誤っていたので修正
[kcd/KCD.git] / KCD / MapInfoCommand.swift
1 //
2 //  MapInfoCommand.swift
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2017/01/14.
6 //  Copyright © 2017年 Hori,Masaki. All rights reserved.
7 //
8
9 import Cocoa
10
11 final class MapInfoCommand: JSONCommand {
12     
13     override class func canExecuteAPI(_ api: API) -> Bool {
14         
15         return api.endpoint == .mapInfo
16     }
17     
18     override func execute() {
19         
20         let store = ServerDataStore.oneTimeEditor()
21         store.sync {
22             
23             store.airBases().forEach(store.delete)
24             store.save()
25         }
26         
27         AirBaseMapper(apiResponse).commit()
28     }
29 }