From e3e071a157053b79e7554bb2543c6b538a68c6fc Mon Sep 17 00:00:00 2001 From: preble Date: Sun, 10 Oct 2010 17:15:52 -0400 Subject: [PATCH] Various minor improvements prepping for release. --- Credits.rtf | 10 +- English.lproj/MainMenu.xib | 605 ++++++++++++++++------------------ IJInventoryView.m | 6 + IJInventoryWindowController.h | 1 + IJInventoryWindowController.m | 40 +-- InsideJob-Info.plist | 2 +- 6 files changed, 319 insertions(+), 345 deletions(-) diff --git a/Credits.rtf b/Credits.rtf index a91d921..e1266d4 100644 --- a/Credits.rtf +++ b/Credits.rtf @@ -7,4 +7,12 @@ \f0\fs20 \cf0 A Minecraft Inventory Editor\ \ {\field{\*\fldinst{HYPERLINK "http://adampreble.net"}}{\fldrslt http://adampreble.net}}\ -{\field{\*\fldinst{HYPERLINK "http://github.com/preble/InsideJob"}}{\fldrslt http://github.com/preble/InsideJob}}} \ No newline at end of file +{\field{\*\fldinst{HYPERLINK "http://github.com/preble/InsideJob"}}{\fldrslt http://github.com/preble/InsideJob}}\ +\ +{\field{\*\fldinst{HYPERLINK "http://www.minecraftwiki.net/wiki/File:DataValuesV110.png"}}{\fldrslt Item Images}}\ +Copyright Mojang Specifications\ +Compiled by Trojam\ +and the Minecraft Community\ +\ +Uses MAAttachedWindow\ +by {\field{\*\fldinst{HYPERLINK "http://mattgemmell.com/"}}{\fldrslt Matt Gemmell}}} \ No newline at end of file diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 9e3d567..cdca301 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -13,7 +13,7 @@ YES - + YES @@ -177,7 +177,7 @@ - File + World 1048576 2147483647 @@ -185,9 +185,74 @@ submenuAction: - File + World YES + + + Open + + 2147483647 + + + submenuAction: + + Open + + YES + + + World 1 + 1 + 1048576 + 2147483647 + + + 1 + + + + World 2 + 2 + 1048576 + 2147483647 + + + 2 + + + + World 3 + 3 + 1048576 + 2147483647 + + + 3 + + + + World 4 + 4 + 1048576 + 2147483647 + + + 4 + + + + World 5 + 5 + 1048576 + 2147483647 + + + 5 + + + + Save @@ -205,36 +270,6 @@ - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - @@ -324,7 +359,7 @@ - + YES YES @@ -334,7 +369,7 @@ - + Find Item f @@ -343,51 +378,6 @@ - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - @@ -604,7 +594,7 @@ NaN - + YES YES @@ -614,7 +604,7 @@ - + 0 0 YES @@ -622,7 +612,7 @@ 1 AAAAAAAAAAAAAAAAAAAAAA - + 3 YES @@ -743,39 +733,39 @@ 2 - + 268 {{11, 58}, {360, 120}} IJInventoryView - + 268 {{11, 10}, {360, 40}} IJInventoryView - + 268 {{11, 186}, {40, 160}} IJInventoryView - + 265 {{379, 327}, {195, 22}} YES - + 343014976 268436544 - + YES 1 @@ -784,9 +774,9 @@ 130560 0 search - + _searchFieldSearch: - + 138690815 0 @@ -813,9 +803,9 @@ - + _searchFieldCancel: - + 138690815 0 @@ -826,21 +816,21 @@ CAAAAA - + 4369 YES - - + + 2304 YES - - + + 4352 {193, 307} - + YES @@ -849,7 +839,7 @@ YES - + itemId 40 40 @@ -859,7 +849,7 @@ 2048 - + 3 MC4zMzMzMzI5ODU2AA @@ -870,12 +860,12 @@ - + 337772096 -2080372736 Text Cell - + YES @@ -907,10 +897,10 @@ NaN - + - - + + 3 YES @@ -923,7 +913,7 @@ NO YES - + 6 System @@ -935,9 +925,9 @@ 3 YES YES - + - + image 32 10 @@ -955,7 +945,7 @@ - + 67239424 33554432 @@ -967,9 +957,9 @@ 3 YES YES - + - + name 112 40 @@ -979,22 +969,22 @@ 2048 - + - + 337772096 2048 Text Cell - + 3 YES YES - + 3 @@ -1021,39 +1011,39 @@ {{1, 1}, {193, 307}} - - - + + + 4 - - + + -2147483392 {{191, 17}, {15, 365}} - - + + _doScroller: 0.9974811083123426 - - + + -2147483392 {{1, 382}, {190, 15}} - + 1 - + _doScroller: 0.99514563106796117 {{379, 10}, {195, 309}} - + 562 - - - + + + QSAAAEEgAABBmAAAQZgAAA @@ -1093,22 +1083,6 @@ 39 - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - orderFrontStandardAboutPanel: @@ -1141,14 +1115,6 @@ 226 - - - stopSpeaking: - - - - 227 - cut: @@ -1173,14 +1139,6 @@ 232 - - - startSpeaking: - - - - 233 - delete: @@ -1345,7 +1303,7 @@ inventoryView - + 642 @@ -1353,7 +1311,7 @@ armorView - + 645 @@ -1361,7 +1319,7 @@ quickView - + 646 @@ -1369,7 +1327,7 @@ itemSearchField - + 659 @@ -1377,14 +1335,14 @@ itemTableView - + 660 dataSource - + 661 @@ -1392,7 +1350,7 @@ delegate - + 662 @@ -1401,7 +1359,7 @@ updateItemSearchFilter: - + 663 @@ -1409,7 +1367,7 @@ initialFirstResponder - + 668 @@ -1417,10 +1375,50 @@ makeSearchFieldFirstResponder: - + 670 + + + menuSelectWorld: + + + + 680 + + + + menuSelectWorld: + + + + 681 + + + + menuSelectWorld: + + + + 682 + + + + menuSelectWorld: + + + + 683 + + + + menuSelectWorld: + + + + 684 + @@ -1505,10 +1503,8 @@ YES - - - + @@ -1517,26 +1513,11 @@ - - 78 - - - - - 77 - - - 112 - - 74 - - - 205 @@ -1545,15 +1526,13 @@ - - - - + + @@ -1572,11 +1551,6 @@ - - 214 - - - 199 @@ -1746,35 +1720,6 @@ - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - 371 @@ -1792,11 +1737,11 @@ - - - - - + + + + + @@ -1912,7 +1857,7 @@ 641 - + YES @@ -1920,121 +1865,168 @@ 643 - + 644 - + 647 - + YES - + 648 - - + + 649 - + YES - - - + + + 650 - - + + 651 - - + + 652 - + YES - - - + + + - + 654 - + YES - + - + 655 - + YES - + - + 656 - - + + 657 - + YES - + - + 658 - - + + 665 - + YES - + - + 667 - - + + 669 - + 671 - + + + 672 + + + YES + + + + + + 673 + + + YES + + + + + + + + + + 674 + + + + + 676 + + + + + 677 + + + + + 678 + + + + + 679 + + + @@ -2067,10 +2059,6 @@ 150.ImportedFromIB2 19.IBPluginDependency 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 197.IBPluginDependency 197.ImportedFromIB2 198.IBPluginDependency @@ -2089,14 +2077,6 @@ 206.ImportedFromIB2 207.IBPluginDependency 207.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBEditorWindowLastContentRect - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 214.IBPluginDependency - 214.ImportedFromIB2 215.IBPluginDependency 215.ImportedFromIB2 217.IBPluginDependency @@ -2185,14 +2165,16 @@ 667.IBPluginDependency 669.IBPluginDependency 671.IBPluginDependency - 74.IBPluginDependency - 74.ImportedFromIB2 + 672.IBPluginDependency + 673.IBEditorWindowLastContentRect + 673.IBPluginDependency + 674.IBPluginDependency + 676.IBPluginDependency + 677.IBPluginDependency + 678.IBPluginDependency + 679.IBPluginDependency 75.IBPluginDependency 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 81.IBEditorWindowLastContentRect 81.IBPluginDependency 81.ImportedFromIB2 @@ -2240,11 +2222,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 623}, {160, 213}} + {{525, 653}, {160, 183}} com.apple.InterfaceBuilder.CocoaPlugin {{187, 434}, {243, 243}} @@ -2254,14 +2232,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{685, 603}, {164, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2274,7 +2244,7 @@ com.apple.InterfaceBuilder.CocoaPlugin {{525, 802}, {197, 73}} - {{380, 836}, {371, 20}} + {{380, 836}, {387, 20}} com.apple.InterfaceBuilder.CocoaPlugin {74, 862} @@ -2372,14 +2342,16 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + {{661, 733}, {127, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{483, 743}, {192, 93}} + {{483, 773}, {178, 63}} com.apple.InterfaceBuilder.CocoaPlugin {{145, 474}, {199, 203}} @@ -2405,7 +2377,7 @@ - 671 + 684 @@ -2437,6 +2409,7 @@ YES makeSearchFieldFirstResponder: + menuSelectWorld: updateItemSearchFilter: worldSelectionChanged: @@ -2445,6 +2418,7 @@ id id id + id @@ -2452,6 +2426,7 @@ YES makeSearchFieldFirstResponder: + menuSelectWorld: updateItemSearchFilter: worldSelectionChanged: @@ -2461,6 +2436,10 @@ makeSearchFieldFirstResponder: id + + menuSelectWorld: + id + updateItemSearchFilter: id diff --git a/IJInventoryView.m b/IJInventoryView.m index c714adf..befdb5c 100644 --- a/IJInventoryView.m +++ b/IJInventoryView.m @@ -319,6 +319,12 @@ const static CGFloat cellOffset = 40; NSData *itemData = [[sender draggingPasteboard] dataForType:IJPasteboardTypeInventoryItem]; IJInventoryItem *item = [NSKeyedUnarchiver unarchiveObjectWithData:itemData]; + IJInventoryItem *existingItem = [items objectAtIndex:index]; + + if (existingItem.itemId == item.itemId) + { + item.count = MIN(64, item.count + existingItem.count); + } [delegate inventoryView:self setItem:item atIndex:index]; return YES; } diff --git a/IJInventoryWindowController.h b/IJInventoryWindowController.h index fdc1790..c177020 100644 --- a/IJInventoryWindowController.h +++ b/IJInventoryWindowController.h @@ -55,6 +55,7 @@ @property (nonatomic, retain) NSNumber *worldTime; +- (IBAction)menuSelectWorld:(id)sender; - (IBAction)worldSelectionChanged:(id)sender; - (IBAction)updateItemSearchFilter:(id)sender; - (IBAction)makeSearchFieldFirstResponder:(id)sender; diff --git a/IJInventoryWindowController.m b/IJInventoryWindowController.m index 7d296b8..eb6a05f 100644 --- a/IJInventoryWindowController.m +++ b/IJInventoryWindowController.m @@ -14,7 +14,6 @@ #import "MAAttachedWindow.h" @interface IJInventoryWindowController () -- (void)removePropertiesWindow; @end @implementation IJInventoryWindowController @@ -200,6 +199,13 @@ #pragma mark - #pragma mark Actions +- (IBAction)menuSelectWorld:(id)sender +{ + int worldIndex = [sender tag]; + [self loadWorldAtIndex:worldIndex]; + [worldSelectionControl setSelectedSegment:worldIndex - 1]; +} + - (IBAction)worldSelectionChanged:(id)sender { int worldIndex = [worldSelectionControl selectedSegment] + 1; @@ -301,8 +307,6 @@ // Show the properties window for this item. IJInventoryItem *lastItem = propertiesViewController.item; - //[self removePropertiesWindow]; - NSPoint itemLocationInView = [theInventoryView pointForItemAtIndex:itemIndex]; NSPoint point = [theInventoryView convertPoint:itemLocationInView toView:nil]; point.x += 16 + 8; @@ -435,35 +439,11 @@ #pragma mark - -#pragma mark +#pragma mark NSWindowDelegate -- (void)reloadInventoryViewForItem:(IJInventoryItem *)item +- (void)windowWillClose:(NSNotification *)notification { - if ([normalInventory containsObject:item]) - [inventoryView reloadItemAtIndex:[normalInventory indexOfObject:item]]; - else if ([quickInventory containsObject:item]) - [quickView reloadItemAtIndex:[quickInventory indexOfObject:item]]; - else if ([armorInventory containsObject:item]) - [armorView reloadItemAtIndex:[armorInventory indexOfObject:item]]; + [NSApp terminate:nil]; } -- (void)removePropertiesWindow -{ - if (observerObject) - { - [propertiesViewController commitEditing]; - [[NSNotificationCenter defaultCenter] removeObserver:observerObject]; - observerObject = nil; - - [self reloadInventoryViewForItem:propertiesViewController.item]; - - [self.window removeChildWindow:propertiesWindow]; - [propertiesWindow orderOut:nil]; - //[propertiesWindow release]; - propertiesWindow = nil; - propertiesViewController.item = nil; - } -} - - @end diff --git a/InsideJob-Info.plist b/InsideJob-Info.plist index 20168ce..0e46f8f 100644 --- a/InsideJob-Info.plist +++ b/InsideJob-Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.1 + 1.0 CFBundleSignature ???? CFBundleVersion