艦これの経験値を管理するツール
修订版 | 8e13706711d79cb09d2cceed0f792adfdf2895b5 (tree) |
---|---|
时间 | 2013-11-10 22:26:40 |
作者 | masakih <masakih@user...> |
Commiter | masakih |
艦娘の10000以上のダミーナンバーを表示しないようにした
@@ -43,6 +43,7 @@ | ||
43 | 43 | F4837E18181BEEFA003E879C /* KCFleetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4837E16181BEEFA003E879C /* KCFleetViewController.m */; }; |
44 | 44 | F4837E19181BEEFA003E879C /* KCFleetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4837E17181BEEFA003E879C /* KCFleetViewController.xib */; }; |
45 | 45 | F4837E1B181CF395003E879C /* BattleArea.plist in Resources */ = {isa = PBXBuildFile; fileRef = F4837E1A181CF395003E879C /* BattleArea.plist */; }; |
46 | + F4BA7F18182FB8C500B37348 /* Ship.m in Sources */ = {isa = PBXBuildFile; fileRef = F4BA7F17182FB8C500B37348 /* Ship.m */; }; | |
46 | 47 | /* End PBXBuildFile section */ |
47 | 48 | |
48 | 49 | /* Begin PBXContainerItemProxy section */ |
@@ -110,6 +111,8 @@ | ||
110 | 111 | F4837E16181BEEFA003E879C /* KCFleetViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KCFleetViewController.m; sourceTree = "<group>"; }; |
111 | 112 | F4837E17181BEEFA003E879C /* KCFleetViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KCFleetViewController.xib; sourceTree = "<group>"; }; |
112 | 113 | F4837E1A181CF395003E879C /* BattleArea.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = BattleArea.plist; sourceTree = "<group>"; }; |
114 | + F4BA7F16182FB8C500B37348 /* Ship.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ship.h; sourceTree = "<group>"; }; | |
115 | + F4BA7F17182FB8C500B37348 /* Ship.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Ship.m; sourceTree = "<group>"; }; | |
113 | 116 | /* End PBXFileReference section */ |
114 | 117 | |
115 | 118 | /* Begin PBXFrameworksBuildPhase section */ |
@@ -182,6 +185,8 @@ | ||
182 | 185 | F448271118292C01000F1CC2 /* KCDataImporter.m */, |
183 | 186 | F457DDB7180BB1C500885A7F /* Images.xcassets */, |
184 | 187 | F457DDB4180BB1C500885A7F /* KanColleLevelManager.xcdatamodeld */, |
188 | + F4BA7F16182FB8C500B37348 /* Ship.h */, | |
189 | + F4BA7F17182FB8C500B37348 /* Ship.m */, | |
185 | 190 | F4837DED180C33B6003E879C /* CollectedShip.h */, |
186 | 191 | F4837DEE180C33B6003E879C /* CollectedShip.m */, |
187 | 192 | F4837DFE181362C0003E879C /* KCFleet.h */, |
@@ -366,6 +371,7 @@ | ||
366 | 371 | F4837DF5180D9454003E879C /* KCCollectionWindowController.m in Sources */, |
367 | 372 | F4837E13181BEBBB003E879C /* KCBattleWindowController.m in Sources */, |
368 | 373 | F4837E0918169955003E879C /* KCShipViewController.m in Sources */, |
374 | + F4BA7F18182FB8C500B37348 /* Ship.m in Sources */, | |
369 | 375 | F457DDA9180BB1C500885A7F /* main.m in Sources */, |
370 | 376 | F457DDB0180BB1C500885A7F /* HMAppDelegate.m in Sources */, |
371 | 377 | F457DDB6180BB1C500885A7F /* KanColleLevelManager.xcdatamodeld in Sources */, |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> | |
2 | +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> | |
3 | 3 | <dependencies> |
4 | 4 | <deployment defaultVersion="1070" identifier="macosx"/> |
5 | - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/> | |
5 | + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/> | |
6 | 6 | </dependencies> |
7 | 7 | <objects> |
8 | 8 | <customObject id="-2" userLabel="File's Owner" customClass="KCCollectionWindowController"> |
@@ -60,7 +60,11 @@ | ||
60 | 60 | </textFieldCell> |
61 | 61 | <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> |
62 | 62 | <connections> |
63 | - <binding destination="TYb-36-xds" name="value" keyPath="arrangedObjects.ship.number" id="jDS-N6-J8T"/> | |
63 | + <binding destination="TYb-36-xds" name="value" keyPath="arrangedObjects.ship.tranceformedNumber" id="k1J-v0-1fi"> | |
64 | + <dictionary key="options"> | |
65 | + <bool key="NSConditionallySetsEditable" value="YES"/> | |
66 | + </dictionary> | |
67 | + </binding> | |
64 | 68 | </connections> |
65 | 69 | </tableColumn> |
66 | 70 | <tableColumn width="40" minWidth="40" maxWidth="1000" id="C4m-LV-Pev"> |
@@ -152,11 +156,11 @@ | ||
152 | 156 | </subviews> |
153 | 157 | <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> |
154 | 158 | </clipView> |
155 | - <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="22X-QW-GfI"> | |
159 | + <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="22X-QW-GfI"> | |
156 | 160 | <rect key="frame" x="1" y="458" width="413" height="16"/> |
157 | 161 | <autoresizingMask key="autoresizingMask"/> |
158 | 162 | </scroller> |
159 | - <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="8sN-BA-7hO"> | |
163 | + <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="8sN-BA-7hO"> | |
160 | 164 | <rect key="frame" x="398" y="17" width="16" height="457"/> |
161 | 165 | <autoresizingMask key="autoresizingMask"/> |
162 | 166 | </scroller> |
@@ -192,7 +196,11 @@ | ||
192 | 196 | </textFieldCell> |
193 | 197 | <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> |
194 | 198 | <connections> |
195 | - <binding destination="lhJ-Yl-dOi" name="value" keyPath="arrangedObjects.number" id="lyG-ne-F02"/> | |
199 | + <binding destination="lhJ-Yl-dOi" name="value" keyPath="arrangedObjects.number" id="OjG-PY-3lB"> | |
200 | + <dictionary key="options"> | |
201 | + <bool key="NSConditionallySetsEditable" value="YES"/> | |
202 | + </dictionary> | |
203 | + </binding> | |
196 | 204 | </connections> |
197 | 205 | </tableColumn> |
198 | 206 | <tableColumn editable="NO" width="83.04296875" minWidth="40" maxWidth="1000" id="Wxc-AK-VCT"> |
@@ -232,11 +240,11 @@ | ||
232 | 240 | </subviews> |
233 | 241 | <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> |
234 | 242 | </clipView> |
235 | - <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="kEq-U1-hrW"> | |
243 | + <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="kEq-U1-hrW"> | |
236 | 244 | <rect key="frame" x="1" y="458" width="252" height="16"/> |
237 | 245 | <autoresizingMask key="autoresizingMask"/> |
238 | 246 | </scroller> |
239 | - <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="lUx-nW-wCM"> | |
247 | + <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="lUx-nW-wCM"> | |
240 | 248 | <rect key="frame" x="237" y="17" width="16" height="457"/> |
241 | 249 | <autoresizingMask key="autoresizingMask"/> |
242 | 250 | </scroller> |
@@ -51,7 +51,7 @@ | ||
51 | 51 | </textFieldCell> |
52 | 52 | <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> |
53 | 53 | <connections> |
54 | - <binding destination="XkY-x3-PYP" name="value" keyPath="arrangedObjects.ship.number" id="kV3-aV-Ird"/> | |
54 | + <binding destination="XkY-x3-PYP" name="value" keyPath="arrangedObjects.ship.tranceformedNumber" id="rv8-0r-tzw"/> | |
55 | 55 | </connections> |
56 | 56 | </tableColumn> |
57 | 57 | <tableColumn width="70.22265625" minWidth="40" maxWidth="1000" id="sqg-Ah-fkU"> |
@@ -21,11 +21,12 @@ | ||
21 | 21 | <attribute name="subAreaName" attributeType="String" syncable="YES"/> |
22 | 22 | <relationship name="area" maxCount="1" deletionRule="Nullify" destinationEntity="Area" inverseName="plans" inverseEntity="Area" syncable="YES"/> |
23 | 23 | </entity> |
24 | - <entity name="Ship" syncable="YES"> | |
24 | + <entity name="Ship" representedClassName="Ship" syncable="YES"> | |
25 | 25 | <attribute name="imageURL" optional="YES" attributeType="Transformable" syncable="YES"/> |
26 | 26 | <attribute name="name" attributeType="String" indexed="YES" syncable="YES"/> |
27 | 27 | <attribute name="number" attributeType="Integer 16" syncable="YES"/> |
28 | 28 | <attribute name="smallImageURL" optional="YES" attributeType="Transformable" syncable="YES"/> |
29 | + <attribute name="tranceformedNumber" optional="YES" transient="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> | |
29 | 30 | <attribute name="updateLevel" optional="YES" attributeType="Integer 16" syncable="YES"/> |
30 | 31 | <attribute name="updateNumber" optional="YES" attributeType="Integer 16" syncable="YES"/> |
31 | 32 | <relationship name="collection" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="CollectedShip" inverseName="ship" inverseEntity="CollectedShip" syncable="YES"/> |
@@ -0,0 +1,34 @@ | ||
1 | +// | |
2 | +// Ship.h | |
3 | +// KanColleLevelManager | |
4 | +// | |
5 | +// Created by Hori,Masaki on 2013/11/10. | |
6 | +// Copyright (c) 2013年 Hori,Masaki. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import <Foundation/Foundation.h> | |
10 | +#import <CoreData/CoreData.h> | |
11 | + | |
12 | +@class CollectedShip; | |
13 | + | |
14 | +@interface Ship : NSManagedObject | |
15 | + | |
16 | +@property (nonatomic, retain) id imageURL; | |
17 | +@property (nonatomic, retain) NSString * name; | |
18 | +@property (nonatomic, retain) NSNumber * number; | |
19 | +@property (nonatomic, retain) id smallImageURL; | |
20 | +@property (nonatomic, retain) NSNumber * updateLevel; | |
21 | +@property (nonatomic, retain) NSNumber * updateNumber; | |
22 | +@property (readonly) NSNumber * tranceformedNumber; | |
23 | +@property (nonatomic, retain) NSSet *collection; | |
24 | +@property (nonatomic, retain) NSManagedObject *type; | |
25 | +@end | |
26 | + | |
27 | +@interface Ship (CoreDataGeneratedAccessors) | |
28 | + | |
29 | +- (void)addCollectionObject:(CollectedShip *)value; | |
30 | +- (void)removeCollectionObject:(CollectedShip *)value; | |
31 | +- (void)addCollection:(NSSet *)values; | |
32 | +- (void)removeCollection:(NSSet *)values; | |
33 | + | |
34 | +@end |
@@ -0,0 +1,34 @@ | ||
1 | +// | |
2 | +// Ship.m | |
3 | +// KanColleLevelManager | |
4 | +// | |
5 | +// Created by Hori,Masaki on 2013/11/10. | |
6 | +// Copyright (c) 2013年 Hori,Masaki. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import "Ship.h" | |
10 | +#import "CollectedShip.h" | |
11 | + | |
12 | + | |
13 | +@implementation Ship | |
14 | + | |
15 | +@dynamic imageURL; | |
16 | +@dynamic name; | |
17 | +@dynamic number; | |
18 | +@dynamic smallImageURL; | |
19 | +@dynamic updateLevel; | |
20 | +@dynamic updateNumber; | |
21 | +@dynamic collection; | |
22 | +@dynamic type; | |
23 | + | |
24 | + | |
25 | +- (NSNumber *)tranceformedNumber | |
26 | +{ | |
27 | + NSNumber *number = self.number; | |
28 | + if(NSOrderedDescending == [number compare:@(10000)]) { | |
29 | + return @([number integerValue] - 10000); | |
30 | + } | |
31 | + return number; | |
32 | +} | |
33 | + | |
34 | +@end |