disabled_rules:
- - variable_name
- leading_whitespace
- vertical_whitespace
- cyclomatic_complexity
class AirBase: KCManagedObject {
@NSManaged var rid: Int
@NSManaged var name: String
- @NSManaged var area_id: Int
+ @NSManaged var area_id: Int // swiftlint:disable:this variable_name
@NSManaged var distance: Int
- @NSManaged var action_kind: Int
+ @NSManaged var action_kind: Int // swiftlint:disable:this variable_name
@NSManaged var planeInfo: NSOrderedSet
}
import CoreData
class AirBasePlaneInfo: KCManagedObject {
- @NSManaged var squadron_id: Int
+ @NSManaged var squadron_id: Int // swiftlint:disable:this variable_name
@NSManaged var state: Int
@NSManaged var slotid: Int
@NSManaged var cond: Int
@NSManaged var count: Int
- @NSManaged var max_count: Int
+ @NSManaged var max_count: Int // swiftlint:disable:this variable_name
@NSManaged var airBase: AirBase
}
}
extension Array {
- func appended(_ f: () -> Element) -> Array {
- return self + [f()]
+ func appended(_ elem: () -> Element) -> Array {
+ return self + [elem()]
}
}
import Foundation
class Basic: KCManagedObject {
- @NSManaged var active_flag: NSNumber?
+ @NSManaged var active_flag: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var comment: String?
- @NSManaged var comment_id: NSNumber?
- @NSManaged var count_deck: Int
- @NSManaged var count_kdock: Int
- @NSManaged var count_ndock: Int
+ @NSManaged var comment_id: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var count_deck: Int // swiftlint:disable:this variable_name
+ @NSManaged var count_kdock: Int // swiftlint:disable:this variable_name
+ @NSManaged var count_ndock: Int // swiftlint:disable:this variable_name
@NSManaged var experience: Int
@NSManaged var fcoin: Int
@NSManaged var firstflag: NSNumber?
@NSManaged var fleetname: String?
- @NSManaged var furniture_0: NSNumber?
- @NSManaged var furniture_1: NSNumber?
- @NSManaged var furniture_2: NSNumber?
- @NSManaged var furniture_3: NSNumber?
- @NSManaged var furniture_4: NSNumber?
- @NSManaged var furniture_5: NSNumber?
- @NSManaged var furniture_6: NSNumber?
- @NSManaged var large_Dock: Int
+ @NSManaged var furniture_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_2: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_3: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_4: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_5: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var furniture_6: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var large_Dock: Int // swiftlint:disable:this variable_name
@NSManaged var level: Int
- @NSManaged var max_chara: Int
- @NSManaged var max_kagu: Int
- @NSManaged var max_slotitem: Int
+ @NSManaged var max_chara: Int // swiftlint:disable:this variable_name
+ @NSManaged var max_kagu: Int // swiftlint:disable:this variable_name
+ @NSManaged var max_slotitem: Int // swiftlint:disable:this variable_name
@NSManaged var medals: Int
- @NSManaged var member_id: NSNumber?
- @NSManaged var ms_count: NSNumber?
- @NSManaged var ms_success: NSNumber?
+ @NSManaged var member_id: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var ms_count: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var ms_success: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var nickname: String
- @NSManaged var nickname_id: NSNumber?
+ @NSManaged var nickname_id: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var playtime: Int
- @NSManaged var pt_challenged: NSNumber?
- @NSManaged var pt_challenged_win: NSNumber?
- @NSManaged var pt_lose: NSNumber?
- @NSManaged var pt_win: NSNumber?
- @NSManaged var pvp_0: NSNumber?
- @NSManaged var pvp_1: NSNumber?
+ @NSManaged var pt_challenged: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var pt_challenged_win: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var pt_lose: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var pt_win: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var pvp_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var pvp_1: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var rank: Int
- @NSManaged var st_lose: NSNumber?
- @NSManaged var st_win: NSNumber?
+ @NSManaged var st_lose: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var st_win: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var starttime: Int
@NSManaged var tutorial: NSNumber?
- @NSManaged var tutorial_progress: NSNumber?
+ @NSManaged var tutorial_progress: NSNumber? // swiftlint:disable:this variable_name
}
NotificationCenter.default
.addObserver(forName: .CombinedDidCange, object: nil, queue: nil) { (notification) in
guard UserDefaults.standard.autoCombinedView,
- let type = notification.userInfo?[CombinedType] as? CombineType
+ let type = notification.userInfo?[CombinedCommand.userInfoKey] as? CombineType
else { return }
if !Thread.isMainThread { Thread.sleep(forTimeInterval: 0.1) }
DispatchQueue.main.async {
extension Notification.Name {
static let HenseiDidChange = Notification.Name("com.masakih.KCD.Notification.HenseiDidChange")
}
-let HenseiDidChangeUserInfoKey = "HenseiDidChangeUserInfoKey"
class HenseiDidChangeUserInfo: NSObject {
let type: ChangeHenseiType
}
class ChangeHenseiCommand: JSONCommand {
- static let userInfoKey = HenseiDidChangeUserInfoKey
+ static let userInfoKey = "HenseiDidChangeUserInfoKey"
override class func canExecuteAPI(_ api: String) -> Bool {
if api == "/kcsapi/api_req_hensei/change" { return true }
NotificationCenter.default
.post(name: .HenseiDidChange,
object: self,
- userInfo: [HenseiDidChangeUserInfoKey: userInfo])
+ userInfo: [ChangeHenseiCommand.userInfoKey: userInfo])
}
}
extension Notification.Name {
static let CombinedDidCange = Notification.Name("com.masakih.KCD.Notification.CombinedDidCange")
}
-let CombinedType = "com.masakih.KCD.Notification.CombinedDidCange.CombinedType"
class CombinedCommand: JSONCommand {
+ static let userInfoKey = "com.masakih.KCD.Notification.CombinedDidCange.CombinedType"
override class func canExecuteAPI(_ api: String) -> Bool {
if api == "/kcsapi/api_req_hensei/combined" { return true }
return false
}
private func postNotification(withType type: CombineType) {
- let userInfo = [CombinedType: type]
+ let userInfo = [CombinedCommand.userInfoKey: type]
NotificationCenter
.default
.post(name: .CombinedDidCange, object: self, userInfo: userInfo)
class Deck: KCManagedObject {
@NSManaged var flagship: NSNumber?
@NSManaged var id: Int
- @NSManaged var member_id: NSNumber?
- @NSManaged var mission_0: Int
- @NSManaged var mission_1: Int
- @NSManaged var mission_2: Int
- @NSManaged var mission_3: Int
- @NSManaged var name: String
- @NSManaged var name_id: NSNumber?
- @NSManaged var ship_0: Int
- @NSManaged var ship_1: Int
- @NSManaged var ship_2: Int
- @NSManaged var ship_3: Int
- @NSManaged var ship_4: Int
- @NSManaged var ship_5: Int
+ @NSManaged var member_id: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var mission_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var mission_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var mission_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var mission_3: Int // swiftlint:disable:this variable_name
+ @NSManaged var name: String // swiftlint:disable:this variable_name
+ @NSManaged var name_id: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var ship_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var ship_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var ship_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var ship_3: Int // swiftlint:disable:this variable_name
+ @NSManaged var ship_4: Int // swiftlint:disable:this variable_name
+ @NSManaged var ship_5: Int // swiftlint:disable:this variable_name
}
extension Deck {
import Cocoa
-fileprivate var DeckContext = 0
+fileprivate var pDeckContext = 0
class Fleet: NSObject {
let fleetNumber: Int
return nil
}
deck = deckController.content as? Deck
- deckObserveKeys.forEach { deckController.addObserver(self, forKeyPath: $0, context: &DeckContext) }
+ deckObserveKeys.forEach { deckController.addObserver(self, forKeyPath: $0, context: &pDeckContext) }
}
deinit {
deckObserveKeys.forEach { deckController.removeObserver(self, forKeyPath: $0) }
subscript(_ index: Int) -> Ship? { return deck?[index] }
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
- if context == &DeckContext {
+ if context == &pDeckContext {
ships = (0..<6).flatMap { return self[$0] }
return
}
import Cocoa
-func polygon(_ f: () -> [NSPoint]) -> NSBezierPath? {
- let points = f()
+func polygon(_ point: () -> [NSPoint]) -> NSBezierPath? {
+ let points = point()
let count = points.count
guard count > 2 else { return nil }
let path = NSBezierPath()
return path
}
-func polyline(_ f: () -> [NSPoint]) -> NSBezierPath? {
- let points = f()
+func polyline(_ point: () -> [NSPoint]) -> NSBezierPath? {
+ let points = point()
let count = points.count
guard count > 1 else { return nil }
let path = NSBezierPath()
return path
}
-func multiline(_ f: () -> [(NSPoint, NSPoint)]) -> NSBezierPath? {
+func multiline(_ lines: () -> [(NSPoint, NSPoint)]) -> NSBezierPath? {
let path = NSBezierPath()
- f().forEach {
+ lines().forEach {
path.move(to: $0.0)
path.line(to: $0.1)
}
}
extension JSONMapper {
- private func isEqual(_ a: AnyObject?, _ b: AnyObject?) -> Bool {
- if a == nil, b == nil { return true }
- if let aa = a, let bb = b { return aa.isEqual(bb) }
+ private func isEqual(_ lhs: AnyObject?, _ rhs: AnyObject?) -> Bool {
+ if lhs == nil, rhs == nil { return true }
+ if let lhs = lhs, let rhs = rhs { return lhs.isEqual(rhs) }
return false
}
func setValueIfNeeded(_ value: AnyObject?, to object: ObjectType, forKey key: String) {
import Foundation
class KenzoDock: KCManagedObject {
- @NSManaged var complete_time: Int
- @NSManaged var complete_time_str: String?
- @NSManaged var created_ship_id: Int
+ @NSManaged var complete_time: Int // swiftlint:disable:this variable_name
+ @NSManaged var complete_time_str: String? // swiftlint:disable:this variable_name
+ @NSManaged var created_ship_id: Int // swiftlint:disable:this variable_name
@NSManaged var id: Int
@NSManaged var item1: Int
@NSManaged var item2: Int
@NSManaged var item3: Int
@NSManaged var item4: Int
@NSManaged var item5: Int
- @NSManaged var member_id: NSNumber?
+ @NSManaged var member_id: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var state: Int
}
@NSManaged var bauxite: Int
@NSManaged var bull: Int
@NSManaged var commanderLv: Int
- @NSManaged var created_ship_id: Int
+ @NSManaged var created_ship_id: Int // swiftlint:disable:this variable_name
@NSManaged var date: Date
@NSManaged var flagShipLv: Int
@NSManaged var flagShipName: String
import Cocoa
class MasterFurniture: KCManagedObject {
- @NSManaged var description_: String?
+ @NSManaged var description_: String? // swiftlint:disable:this variable_name
@NSManaged var id: NSNumber?
@NSManaged var no: NSNumber?
@NSManaged var price: NSNumber?
class MasterMapInfo: KCManagedObject {
@NSManaged var id: Int
@NSManaged var infotext: String
- @NSManaged var item_0: NSNumber?
- @NSManaged var item_1: NSNumber?
- @NSManaged var item_2: NSNumber?
- @NSManaged var item_3: NSNumber?
+ @NSManaged var item_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var item_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var item_2: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var item_3: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var level: NSNumber?
- @NSManaged var maparea_id: Int
- @NSManaged var max_maphp: NSNumber?
+ @NSManaged var maparea_id: Int // swiftlint:disable:this variable_name
+ @NSManaged var max_maphp: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var name: String
@NSManaged var no: Int
@NSManaged var opetext: String?
- @NSManaged var required_defeat_count: NSNumber?
- @NSManaged var sally_flag_0: NSNumber?
- @NSManaged var sally_flag_1: NSNumber?
+ @NSManaged var required_defeat_count: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var sally_flag_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var sally_flag_1: NSNumber? // swiftlint:disable:this variable_name
}
@NSManaged var details: String?
@NSManaged var difficulty: NSNumber?
@NSManaged var id: Int
- @NSManaged var maparea_id: Int
+ @NSManaged var maparea_id: Int // swiftlint:disable:this variable_name
@NSManaged var name: String
- @NSManaged var return_flag: NSNumber?
+ @NSManaged var return_flag: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var time: NSNumber?
- @NSManaged var use_bull: NSNumber?
- @NSManaged var use_fuel: NSNumber?
- @NSManaged var win_item1_0: NSNumber?
- @NSManaged var win_item1_1: NSNumber?
- @NSManaged var win_item2_0: NSNumber?
- @NSManaged var win_item2_1: NSNumber?
+ @NSManaged var use_bull: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var use_fuel: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var win_item1_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var win_item1_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var win_item2_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var win_item2_1: NSNumber? // swiftlint:disable:this variable_name
}
@NSManaged var afterlv: Int
@NSManaged var aftershipid: Int
@NSManaged var backs: NSNumber?
- @NSManaged var broken_0: NSNumber?
- @NSManaged var broken_1: NSNumber?
- @NSManaged var broken_2: NSNumber?
- @NSManaged var broken_3: NSNumber?
+ @NSManaged var broken_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_2: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_3: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var buildtime: NSNumber?
- @NSManaged var bull_max: Int
- @NSManaged var fuel_max: Int
+ @NSManaged var bull_max: Int // swiftlint:disable:this variable_name
+ @NSManaged var fuel_max: Int // swiftlint:disable:this variable_name
@NSManaged var getmes: NSNumber?
- @NSManaged var houg_0: Int
- @NSManaged var houg_1: Int
+ @NSManaged var houg_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var houg_1: Int // swiftlint:disable:this variable_name
@NSManaged var id: Int
@NSManaged var leng: Int
- @NSManaged var luck_0: Int
- @NSManaged var luck_1: Int
- @NSManaged var maxeq_0: Int
- @NSManaged var maxeq_1: Int
- @NSManaged var maxeq_2: Int
- @NSManaged var maxeq_3: Int
- @NSManaged var maxeq_4: Int
+ @NSManaged var luck_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var luck_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var maxeq_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var maxeq_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var maxeq_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var maxeq_3: Int // swiftlint:disable:this variable_name
+ @NSManaged var maxeq_4: Int // swiftlint:disable:this variable_name
@NSManaged var name: String
- @NSManaged var powup_0: Int
- @NSManaged var powup_1: Int
- @NSManaged var powup_2: Int
- @NSManaged var powup_3: Int
- @NSManaged var raig_0: Int
- @NSManaged var raig_1: Int
+ @NSManaged var powup_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var powup_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var powup_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var powup_3: Int // swiftlint:disable:this variable_name
+ @NSManaged var raig_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var raig_1: Int // swiftlint:disable:this variable_name
@NSManaged var sinfo: String?
- @NSManaged var slot_num: Int
+ @NSManaged var slot_num: Int // swiftlint:disable:this variable_name
@NSManaged var soku: Int
@NSManaged var sortno: NSNumber?
- @NSManaged var souk_0: Int
- @NSManaged var souk_1: Int
- @NSManaged var taik_0: Int
- @NSManaged var taik_1: Int
- @NSManaged var tais_0: NSNumber?
- @NSManaged var tyku_0: Int
- @NSManaged var tyku_1: Int
+ @NSManaged var souk_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var souk_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var taik_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var taik_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var tais_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var tyku_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var tyku_1: Int // swiftlint:disable:this variable_name
@NSManaged var voicef: NSNumber?
@NSManaged var yomi: String?
@NSManaged var ships: Set<Ship>
@NSManaged var atap: NSNumber?
@NSManaged var bakk: NSNumber?
@NSManaged var baku: NSNumber?
- @NSManaged var broken_0: NSNumber?
- @NSManaged var broken_1: NSNumber?
- @NSManaged var broken_2: NSNumber?
- @NSManaged var broken_3: NSNumber?
+ @NSManaged var broken_0: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_2: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var broken_3: NSNumber? // swiftlint:disable:this variable_name
@NSManaged var houg: NSNumber?
@NSManaged var houk: NSNumber?
@NSManaged var houm: NSNumber?
@NSManaged var taik: NSNumber?
@NSManaged var tais: NSNumber?
@NSManaged var tyku: Int
- @NSManaged var type_0: Int
- @NSManaged var type_1: Int
- @NSManaged var type_2: Int
- @NSManaged var type_3: Int
+ @NSManaged var type_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var type_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var type_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var type_3: Int // swiftlint:disable:this variable_name
@NSManaged var usebull: NSNumber?
@NSManaged var slotItems: Set<SlotItem>
}
class MasterSlotItemEquipType: KCManagedObject {
@NSManaged var id: Int
@NSManaged var name: String
- @NSManaged var show_flg: NSNumber?
+ @NSManaged var show_flg: NSNumber? // swiftlint:disable:this variable_name
}
class MasterUseItem: KCManagedObject {
@NSManaged var category: NSNumber?
- @NSManaged var description_0: String?
- @NSManaged var description_1: String?
+ @NSManaged var description_0: String? // swiftlint:disable:this variable_name
+ @NSManaged var description_1: String?// swiftlint:disable:this variable_name
@NSManaged var id: Int
@NSManaged var name: String
@NSManaged var price: NSNumber?
import Foundation
class NyukyoDock: KCManagedObject {
- @NSManaged var complete_time: Int
- @NSManaged var complete_time_str: String?
+ @NSManaged var complete_time: Int // swiftlint:disable:this variable_name
+ @NSManaged var complete_time_str: String? // swiftlint:disable:this variable_name
@NSManaged var id: Int
@NSManaged var item1: NSNumber?
@NSManaged var item2: NSNumber?
@NSManaged var item3: NSNumber?
@NSManaged var item4: NSNumber?
- @NSManaged var member_id: NSNumber?
- @NSManaged var ship_id: Int
+ @NSManaged var member_id: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged var ship_id: Int // swiftlint:disable:this variable_name
@NSManaged var state: Int
}
import Foundation
class Quest: KCManagedObject {
- @NSManaged var bonus_flag: Bool
+ @NSManaged var bonus_flag: Bool // swiftlint:disable:this variable_name
@NSManaged var category: Int
@NSManaged var detail: String
- @NSManaged var get_material_0: Int
- @NSManaged var get_material_1: Int
- @NSManaged var get_material_2: Int
- @NSManaged var get_material_3: Int
- @NSManaged var invalid_flag: Int
+ @NSManaged var get_material_0: Int // swiftlint:disable:this variable_name
+ @NSManaged var get_material_1: Int // swiftlint:disable:this variable_name
+ @NSManaged var get_material_2: Int // swiftlint:disable:this variable_name
+ @NSManaged var get_material_3: Int // swiftlint:disable:this variable_name
+ @NSManaged var invalid_flag: Int // swiftlint:disable:this variable_name
@NSManaged var no: Int
- @NSManaged var progress_flag: Int
+ @NSManaged var progress_flag: Int // swiftlint:disable:this variable_name
@NSManaged var state: Int
@NSManaged var title: String
@NSManaged var type: Int
@NSManaged dynamic var fleet: NSNumber?
@NSManaged dynamic var fuel: Int
@NSManaged dynamic var id: Int
- @NSManaged dynamic var kaihi_0: Int
- @NSManaged dynamic var kaihi_1: NSNumber?
- @NSManaged dynamic var karyoku_0: Int
- @NSManaged dynamic var karyoku_1: Int
- @NSManaged dynamic var kyouka_0: Int
- @NSManaged dynamic var kyouka_1: Int
- @NSManaged dynamic var kyouka_2: Int
- @NSManaged dynamic var kyouka_3: Int
- @NSManaged dynamic var kyouka_4: Int
+ @NSManaged dynamic var kaihi_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kaihi_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged dynamic var karyoku_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var karyoku_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kyouka_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kyouka_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kyouka_2: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kyouka_3: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var kyouka_4: Int // swiftlint:disable:this variable_name
@NSManaged dynamic var locked: Int
- @NSManaged dynamic var locked_equip: NSNumber?
- @NSManaged dynamic var lucky_0: Int
- @NSManaged dynamic var lucky_1: Int
+ @NSManaged dynamic var locked_equip: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged dynamic var lucky_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var lucky_1: Int // swiftlint:disable:this variable_name
@NSManaged dynamic var lv: Int
@NSManaged dynamic var maxhp: Int
- @NSManaged dynamic var ndock_time: NSNumber?
+ @NSManaged dynamic var ndock_time: NSNumber? // swiftlint:disable:this variable_name
@NSManaged dynamic var nowhp: Int
- @NSManaged dynamic var onslot_0: Int
- @NSManaged dynamic var onslot_1: Int
- @NSManaged dynamic var onslot_2: Int
- @NSManaged dynamic var onslot_3: Int
- @NSManaged dynamic var onslot_4: Int
- @NSManaged dynamic var raisou_0: Int
- @NSManaged dynamic var raisou_1: Int
- @NSManaged dynamic var sakuteki_0: Int
- @NSManaged dynamic var sakuteki_1: NSNumber?
- @NSManaged dynamic var sally_area: NSNumber?
- @NSManaged dynamic var ship_id: Int
- @NSManaged dynamic var slot_0: Int
- @NSManaged dynamic var slot_1: Int
- @NSManaged dynamic var slot_2: Int
- @NSManaged dynamic var slot_3: Int
- @NSManaged dynamic var slot_4: Int
- @NSManaged dynamic var slot_ex: Int
+ @NSManaged dynamic var onslot_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var onslot_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var onslot_2: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var onslot_3: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var onslot_4: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var raisou_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var raisou_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var sakuteki_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var sakuteki_1: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged dynamic var sally_area: NSNumber? // swiftlint:disable:this variable_name
+ @NSManaged dynamic var ship_id: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_2: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_3: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_4: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var slot_ex: Int // swiftlint:disable:this variable_name
@NSManaged dynamic var sortno: NSNumber?
- @NSManaged dynamic var soukou_0: Int
- @NSManaged dynamic var soukou_1: Int
+ @NSManaged dynamic var soukou_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var soukou_1: Int // swiftlint:disable:this variable_name
@NSManaged dynamic var srate: NSNumber?
- @NSManaged dynamic var taiku_0: Int
- @NSManaged dynamic var taiku_1: Int
- @NSManaged dynamic var taisen_0: Int
- @NSManaged dynamic var taisen_1: NSNumber?
+ @NSManaged dynamic var taiku_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var taiku_1: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var taisen_0: Int // swiftlint:disable:this variable_name
+ @NSManaged dynamic var taisen_1: NSNumber? // swiftlint:disable:this variable_name
@NSManaged dynamic var equippedItem: NSOrderedSet
- @NSManaged dynamic var master_ship: MasterShip
+ @NSManaged dynamic var master_ship: MasterShip // swiftlint:disable:this variable_name
@NSManaged dynamic var extraItem: SlotItem?
}
@NSManaged var id: Int
@NSManaged var level: Int
@NSManaged var locked: Bool
- @NSManaged var slotitem_id: Int
+ @NSManaged var slotitem_id: Int // swiftlint:disable:this variable_name
@NSManaged var equippedShip: Ship?
- @NSManaged var master_slotItem: MasterSlotItem
+ @NSManaged var master_slotItem: MasterSlotItem // swiftlint:disable:this variable_name
@NSManaged var extraEquippedShip: Ship?
}
import Cocoa
-fileprivate var ShipStatusContext: Int = 0
+fileprivate var pShipStatusContext: Int = 0
class SuppliesView: NSControl {
private let observeKeys = ["fuel", "maxFuel", "bull", "maxBull"]
}
suppliesCell.shipStatus = newValue
observeKeys.forEach {
- suppliesCell.shipStatus?.addObserver(self, forKeyPath: $0, context: &ShipStatusContext)
+ suppliesCell.shipStatus?.addObserver(self, forKeyPath: $0, context: &pShipStatusContext)
}
needsDisplay = true
}
}
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
- if context == &ShipStatusContext {
+ if context == &pShipStatusContext {
needsDisplay = true
return
}