OSDN Git Service

ソースコードを整形
authormasakih <masakih@users.sourceforge.jp>
Sat, 5 Aug 2017 10:41:30 +0000 (19:41 +0900)
committermasakih <masakih@users.sourceforge.jp>
Sat, 5 Aug 2017 10:41:30 +0000 (19:41 +0900)
KCD/KenzoMarkCommand.swift
KCD/MapStartCommand.swift
KCD/QuestListCommand.swift

index d0a4aed..ec8d0ae 100644 (file)
@@ -71,9 +71,7 @@ final class KenzoMarkCommand: JSONCommand {
                                            kDockId: kdockId,
                                            shipId: shipId) {
             
-            return (kenzoMark.flagShipLv,
-                    kenzoMark.flagShipName,
-                    kenzoMark.commanderLv)
+            return (kenzoMark.flagShipLv, kenzoMark.flagShipName, kenzoMark.commanderLv)
         }
         
         return (-1, "", -1)
index cd432d3..5b9cde5 100644 (file)
@@ -20,7 +20,7 @@ final class MapStartCommand: JSONCommand {
     
     override class func canExecuteAPI(_ api: String) -> Bool {
         
-        return MapAPI(rawValue: api) != nil ? true : false
+        return MapAPI(rawValue: api) != nil
     }
     
     override func execute() {
index 71f4b10..2d5e18c 100644 (file)
@@ -39,7 +39,7 @@ final class QuestListCommand: JSONCommand {
         
         // 新しいデータ投入
         let quests = store.sortedQuestByNo()
-        data["api_list"].forEach { (_, quest) in
+        data["api_list"].forEach { _, quest in
             
             guard let no = quest["api_no"].int
                 else { return }
@@ -49,7 +49,7 @@ final class QuestListCommand: JSONCommand {
             guard let new = t ?? store.createQuest()
                 else { return print("Can not create Quest") }
             
-            new.bonus_flag = quest["api_bonus_flag"].int.map { $0 != 0} ?? false
+            new.bonus_flag = quest["api_bonus_flag"].int.map { $0 != 0 } ?? false
             new.category = quest["api_category"].int ?? 0
             new.detail = quest["api_detail"].string ?? ""
 //            new.get_material_0 = questData["api_get_material_0"] as? Int ?? 0