OSDN Git Service

HMStart2Commandから直接呼ぶようにした
authormasakih <masakih@users.sourceforge.jp>
Thu, 23 Feb 2017 13:26:46 +0000 (22:26 +0900)
committermasakih <masakih@users.sourceforge.jp>
Thu, 23 Feb 2017 13:26:46 +0000 (22:26 +0900)
12 files changed:
KCD.xcodeproj/project.pbxproj
KCD/HMMaserShipCommand.swift [deleted file]
KCD/HMMasterFurnitureCommand.swift [deleted file]
KCD/HMMasterMapAreaCommand.swift [deleted file]
KCD/HMMasterMapCellCommand.swift [deleted file]
KCD/HMMasterMapInfoCommand.swift [deleted file]
KCD/HMMasterMissionCommand.swift [deleted file]
KCD/HMMasterSTypeCommand.swift [deleted file]
KCD/HMMasterSlotItemCommand.swift [deleted file]
KCD/HMMasterSlotItemEquipTypeCommand.swift [deleted file]
KCD/HMMasterUseItemCommand.swift [deleted file]
KCD/HMStart2Command.swift

index f75dc68..63dffad 100644 (file)
                F44BC7191E29D9DC004644E3 /* HMMemberDeckCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7181E29D9DC004644E3 /* HMMemberDeckCommand.swift */; };
                F44BC71B1E29DCB4004644E3 /* HMMemberKDockCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71A1E29DCB4004644E3 /* HMMemberKDockCommand.swift */; };
                F44BC71D1E29DF32004644E3 /* HMMemberNDockCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71C1E29DF32004644E3 /* HMMemberNDockCommand.swift */; };
-               F44BC71F1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */; };
-               F44BC7211E29E82B004644E3 /* HMMasterMissionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */; };
-               F44BC7231E29E8E6004644E3 /* HMMasterFurnitureCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */; };
-               F44BC7251E29EC26004644E3 /* HMMasterSlotItemCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */; };
-               F44BC7271E29ED87004644E3 /* HMMasterUseItemCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */; };
-               F44BC7291E2A0842004644E3 /* HMMasterMapCellCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */; };
-               F44BC72B1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */; };
-               F44BC72D1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */; };
-               F44BC72F1E2A0B75004644E3 /* HMMaserShipCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */; };
-               F44BC7311E2A247F004644E3 /* HMMasterSTypeCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */; };
                F44BC7331E2A25E4004644E3 /* HMStart2Command.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */; };
                F44BC7351E2A295E004644E3 /* HMSetActionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7341E2A295E004644E3 /* HMSetActionCommand.swift */; };
                F44BC7371E2A4258004644E3 /* HMSetPlaneCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44BC7361E2A4258004644E3 /* HMSetPlaneCommand.swift */; };
                F44BC7181E29D9DC004644E3 /* HMMemberDeckCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberDeckCommand.swift; sourceTree = "<group>"; };
                F44BC71A1E29DCB4004644E3 /* HMMemberKDockCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberKDockCommand.swift; sourceTree = "<group>"; };
                F44BC71C1E29DF32004644E3 /* HMMemberNDockCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMemberNDockCommand.swift; sourceTree = "<group>"; };
-               F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSlotItemEquipTypeCommand.swift; sourceTree = "<group>"; };
-               F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMissionCommand.swift; sourceTree = "<group>"; };
-               F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterFurnitureCommand.swift; sourceTree = "<group>"; };
-               F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSlotItemCommand.swift; sourceTree = "<group>"; };
-               F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterUseItemCommand.swift; sourceTree = "<group>"; };
-               F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapCellCommand.swift; sourceTree = "<group>"; };
-               F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapInfoCommand.swift; sourceTree = "<group>"; };
-               F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterMapAreaCommand.swift; sourceTree = "<group>"; };
-               F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMaserShipCommand.swift; sourceTree = "<group>"; };
-               F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMMasterSTypeCommand.swift; sourceTree = "<group>"; };
                F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMStart2Command.swift; sourceTree = "<group>"; };
                F44BC7341E2A295E004644E3 /* HMSetActionCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSetActionCommand.swift; sourceTree = "<group>"; };
                F44BC7361E2A4258004644E3 /* HMSetPlaneCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSetPlaneCommand.swift; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                F44BC7321E2A25E4004644E3 /* HMStart2Command.swift */,
-                               F44BC7301E2A247F004644E3 /* HMMasterSTypeCommand.swift */,
-                               F44BC72E1E2A0B75004644E3 /* HMMaserShipCommand.swift */,
-                               F44BC72C1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift */,
-                               F44BC72A1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift */,
-                               F44BC7281E2A0842004644E3 /* HMMasterMapCellCommand.swift */,
-                               F44BC7261E29ED87004644E3 /* HMMasterUseItemCommand.swift */,
-                               F44BC7241E29EC26004644E3 /* HMMasterSlotItemCommand.swift */,
-                               F44BC7221E29E8E6004644E3 /* HMMasterFurnitureCommand.swift */,
-                               F44BC7201E29E82B004644E3 /* HMMasterMissionCommand.swift */,
-                               F44BC71E1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift */,
                        );
                        name = MasterUpdateCommand;
                        sourceTree = "<group>";
                                F4FC3E8C1E43660400E41228 /* HMKCGuardEscaped.swift in Sources */,
                                F490977B1E19C3910085A45D /* HMSuppliesView.swift in Sources */,
                                F4AA59341E1D2512001667AF /* HMSlotItemShortNameTransformer.swift in Sources */,
-                               F44BC7311E2A247F004644E3 /* HMMasterSTypeCommand.swift in Sources */,
                                F44BC6E11E2304E3004644E3 /* HMSlotDepriveUnsetCommand.swift in Sources */,
                                F44BC73B1E2A5C34004644E3 /* HMMapInfoCommand.swift in Sources */,
                                F4AA593E1E1E0BFB001667AF /* HMDamageValueTransformer.swift in Sources */,
                                F44BC6E51E23082B004644E3 /* HMCombinedCommand.swift in Sources */,
                                F4AA59401E1E23EC001667AF /* HMHistoryMarkTransformer.swift in Sources */,
                                F44BC7131E28FDC4004644E3 /* HMMemberShipCommand.swift in Sources */,
-                               F44BC7291E2A0842004644E3 /* HMMasterMapCellCommand.swift in Sources */,
                                F49097831E19F7760085A45D /* HMStrengthenListItemCellView.swift in Sources */,
                                F495462E1B1894DD00E0D8D0 /* Bookmark.xcdatamodeld in Sources */,
                                F44BC7091E279C41004644E3 /* HMKenzoMarkCommand.swift in Sources */,
                                F4D05BC81E0C0DA100688D66 /* HMAirBaseWindowController.swift in Sources */,
                                F4A0D70D1E2FA34400224DCE /* HMCombinedBattleCommand.swift in Sources */,
                                F44BC70D1E27B601004644E3 /* HMMemberShip3Command.swift in Sources */,
-                               F44BC7251E29EC26004644E3 /* HMMasterSlotItemCommand.swift in Sources */,
                                F42A8FE41E41FD6F0099DC1D /* HMDropShipHistory.swift in Sources */,
                                F42A8FDC1E40B9FE0099DC1D /* HMKCSlotItemObject.swift in Sources */,
                                F4D05BE11E0FAB8E00688D66 /* HMShipViewController.swift in Sources */,
                                F45F3BE31E06A60A0009434E /* HMUpgradableShipsWindowController.swift in Sources */,
                                F4E5FF121E17D6850026868C /* HMGameViewController.swift in Sources */,
                                F42A8FE61E420A360099DC1D /* HMKaihatuHistory.swift in Sources */,
-                               F44BC7231E29E8E6004644E3 /* HMMasterFurnitureCommand.swift in Sources */,
                                F4AA592E1E1D1D4D001667AF /* HMSokuTransformer.swift in Sources */,
                                F4AA594A1E1E4863001667AF /* HMMapWindowController.swift in Sources */,
                                F4FC3E961E46AC3000E41228 /* HMTSVSupport.swift in Sources */,
                                F44BC7191E29D9DC004644E3 /* HMMemberDeckCommand.swift in Sources */,
                                F490977F1E19ED400085A45D /* HMStrengthenListItemView.swift in Sources */,
                                F42A8FDE1E40C6DF0099DC1D /* HMKCQuest.swift in Sources */,
-                               F44BC7211E29E82B004644E3 /* HMMasterMissionCommand.swift in Sources */,
                                F4B15CBD1E21BA870078CFFC /* CommandRegister.swift in Sources */,
                                F45FBB921E129BAE000E72B9 /* HMFleetViewController.swift in Sources */,
                                F4AA59501E1E4D18001667AF /* HMShipWindowController.swift in Sources */,
                                F42CFE181E3C12AA000B4F9B /* HMScreenshotInformation.swift in Sources */,
-                               F44BC72B1E2A09B9004644E3 /* HMMasterMapInfoCommand.swift in Sources */,
                                F44BC7371E2A4258004644E3 /* HMSetPlaneCommand.swift in Sources */,
                                F42CFE281E3D9A02000B4F9B /* HMKCMasterMapInfo.swift in Sources */,
                                F4AA594C1E1E497C001667AF /* HMEquipmentWindowController.swift in Sources */,
                                F46F104918ABAC910063E503 /* KCD.xcdatamodeld in Sources */,
                                F44BC7111E27C61A004644E3 /* HMMemberSlotItemCommand.swift in Sources */,
                                F44BC6FD1E250B2A004644E3 /* HMGetShipCommand.swift in Sources */,
-                               F44BC71F1E29E740004644E3 /* HMMasterSlotItemEquipTypeCommand.swift in Sources */,
                                F4D05BDF1E0F8B6900688D66 /* HMPowerUpSupportViewController.swift in Sources */,
                                F44BC6F31E23D32B004644E3 /* HMRealPowerUpCommand.swift in Sources */,
                                F4E5FF021E150A850026868C /* HMAncherageRepairTimerViewController.swift in Sources */,
                                F42A8FD01E3DB49A0099DC1D /* HMKCMasterSlotItemObject.swift in Sources */,
                                F49097851E1A15AF0085A45D /* HMSlotItemLevelView.swift in Sources */,
                                F44BC6C31E221865004644E3 /* HMAirCorpsSupplyCommand.swift in Sources */,
-                               F44BC72D1E2A0AA0004644E3 /* HMMasterMapAreaCommand.swift in Sources */,
                                F44BC6D51E226308004644E3 /* HMNyukyoSpeedChangeCommand.swift in Sources */,
                                F47C3EA81E5F06E700D97449 /* MasterSlotItemEquipTypeMapper.swift in Sources */,
                                F4AA59361E1D36C5001667AF /* HMQuestProgressTransformer.swift in Sources */,
                                F491A4BE1E4E0C5000D1E067 /* CustomHTTPProtocol.swift in Sources */,
-                               F44BC72F1E2A0B75004644E3 /* HMMaserShipCommand.swift in Sources */,
-                               F44BC7271E29ED87004644E3 /* HMMasterUseItemCommand.swift in Sources */,
                                F4FC3E8E1E4368BB00E41228 /* HMKCManagedObject.swift in Sources */,
                                F4A0D7171E2FB7E000224DCE /* HMCompositCommand.swift in Sources */,
                                F44BC7011E251408004644E3 /* HMDestroyItem2Command.swift in Sources */,
diff --git a/KCD/HMMaserShipCommand.swift b/KCD/HMMaserShipCommand.swift
deleted file mode 100644 (file)
index 73dfd78..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-//  HMMaserShipCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMaserShipCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_ship"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterShip")
-        MasterShipMapper(apiResponse).commit()
-    }
-    
-    override func handleExtraValue(_ value: Any, forKey key: String, to object: NSManagedObject) -> Bool {
-        if key != "api_stype" { return false }
-        
-        guard let sType = value as? Int
-            else {
-                print("HMMaserShipCommand: value is not Int")
-                return false
-        }
-        guard let masterShip = object as? HMKCMasterShipObject
-            else {
-                print("HMMaserShipCommand: object is not HMKCMasterShipObject")
-                return false
-        }
-        setStype(sType, to: masterShip)
-        return true
-    }
-    
-    private lazy var masterSTypes: [HMKCMasterSType] = {
-        return HMServerDataStore.default.sortedMasterSTypesById()
-    }()
-    
-    private func setStype(_ stypeID: Int, to masterShip: HMKCMasterShipObject) {
-        if masterShip.stype.id == stypeID { return }
-        guard let stype = masterSTypes.binarySearch(comparator: { $0.id ==? stypeID })
-            else { return print("HMMaserShipCommand: Can not find MasterSType") }
-        guard let moc = masterShip.managedObjectContext,
-            let masterSType = moc.object(with: stype.objectID) as? HMKCMasterSType
-            else { return print("HMMaserShipCommand: Can not convert to current moc object masterSType") }
-        masterShip.stype = masterSType
-    }
-}
diff --git a/KCD/HMMasterFurnitureCommand.swift b/KCD/HMMasterFurnitureCommand.swift
deleted file mode 100644 (file)
index a851503..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//  HMMasterFurnitureCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterFurnitureCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_furniture"
-    }
-    override var ignoreKeys: [String] {
-        return ["api_season"]
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterFurniture")
-        MasterFurnitureMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterMapAreaCommand.swift b/KCD/HMMasterMapAreaCommand.swift
deleted file mode 100644 (file)
index a3da520..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterMapAreaCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterMapAreaCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_maparea"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterMapArea")
-        MasterMapAreaMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterMapCellCommand.swift b/KCD/HMMasterMapCellCommand.swift
deleted file mode 100644 (file)
index a285420..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-//  HMMasterMapCellCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterMapCellCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_mapcell"
-    }
-    override var ignoreKeys: [String] {
-        return ["api_req_shiptype", "api_link_no"]
-    }
-    
-    override func execute() {
-        commitJSON(toEntityNamed: "MasterMapCell")
-    }
-}
diff --git a/KCD/HMMasterMapInfoCommand.swift b/KCD/HMMasterMapInfoCommand.swift
deleted file mode 100644 (file)
index 0548385..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterMapInfoCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterMapInfoCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_mapinfo"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterMapInfo")
-        MasterMapInfoMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterMissionCommand.swift b/KCD/HMMasterMissionCommand.swift
deleted file mode 100644 (file)
index 656265c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterMissionCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterMissionCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_mission"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterMission")
-        MasterMissionMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterSTypeCommand.swift b/KCD/HMMasterSTypeCommand.swift
deleted file mode 100644 (file)
index 1a05ef6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//  HMMasterSTypeCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterSTypeCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_stype"
-    }
-    override var ignoreKeys: [String] {
-        return ["api_equip_type"]
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterSType")
-        MasterSTypeMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterSlotItemCommand.swift b/KCD/HMMasterSlotItemCommand.swift
deleted file mode 100644 (file)
index 9bc4c3a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterSlotItemCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterSlotItemCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_slotitem"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterSlotItem")
-        MasterSlotItemMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterSlotItemEquipTypeCommand.swift b/KCD/HMMasterSlotItemEquipTypeCommand.swift
deleted file mode 100644 (file)
index de3bf02..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterSlotItemEquipTypeCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterSlotItemEquipTypeCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_slotitem_equiptype"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterSlotItemEquipType")
-        MasterSlotItemEquipTypeMapper(apiResponse).commit()
-    }
-}
diff --git a/KCD/HMMasterUseItemCommand.swift b/KCD/HMMasterUseItemCommand.swift
deleted file mode 100644 (file)
index 2b60035..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  HMMasterUseItemCommand.swift
-//  KCD
-//
-//  Created by Hori,Masaki on 2017/01/14.
-//  Copyright © 2017年 Hori,Masaki. All rights reserved.
-//
-
-import Cocoa
-
-class HMMasterUseItemCommand: HMJSONCommand {
-    override var dataKey: String {
-        return "api_data.api_mst_useitem"
-    }
-    
-    override func execute() {
-//        commitJSON(toEntityNamed: "MasterUseItem")
-        MasterUseItemMapper(apiResponse).commit()
-    }
-}
index 2a55671..ef09d11 100644 (file)
@@ -8,24 +8,21 @@
 
 import Cocoa
 
-class HMStart2Command: HMCompositCommand {
-    required init(apiResponse: HMAPIResponse) {
-        super.init(apiResponse: apiResponse, commandList:
-            [
-                HMMasterMapAreaCommand(apiResponse: apiResponse),
-                HMMasterMapInfoCommand(apiResponse: apiResponse),
-                HMMasterSTypeCommand(apiResponse: apiResponse),
-                HMMaserShipCommand(apiResponse: apiResponse),
-                HMMasterMissionCommand(apiResponse: apiResponse),
-                HMMasterFurnitureCommand(apiResponse: apiResponse),
-                HMMasterSlotItemEquipTypeCommand(apiResponse: apiResponse),
-                HMMasterSlotItemCommand(apiResponse: apiResponse),
-                HMMasterUseItemCommand(apiResponse: apiResponse),
-            ]
-        )
-    }
+class HMStart2Command: HMJSONCommand {
     override class func canExecuteAPI(_ api: String) -> Bool {
         if api == "/kcsapi/api_start2" { return true }
         return false
     }
+    
+    override func execute() {
+        MasterMapAreaMapper(apiResponse).commit()
+        MasterMapInfoMapper(apiResponse).commit()
+        MasterSTypeMapper(apiResponse).commit()
+        MasterShipMapper(apiResponse).commit()
+        MasterMissionMapper(apiResponse).commit()
+        MasterFurnitureMapper(apiResponse).commit()
+        MasterSlotItemEquipTypeMapper(apiResponse).commit()
+        MasterSlotItemMapper(apiResponse).commit()
+        MasterUseItemMapper(apiResponse).commit()
+    }
 }