Browse Source

We can now select player from SMP world. "Default player" is currently a placeholder, and player file are not filtered.

Manoel Trapier 13 years ago
parent
commit
46ade83b03

+ 3 - 2
Classes/IJInventoryWindowController.h

@@ -47,6 +47,7 @@
 	NSString *loadedWorldFolder;
 	NSString *attemptedLoadWorldFolder;
    NSString *loadedPlayer;
+   NSPopUpButton *playerSelectionControl;
 }
 
 @property (nonatomic, assign) IBOutlet NSPopUpButton *worldSelectionControl;
@@ -56,9 +57,8 @@
 @property (nonatomic, assign) IBOutlet IJInventoryView *armorView;
 @property (nonatomic, assign) IBOutlet NSSearchField *itemSearchField;
 @property (nonatomic, assign) IBOutlet NSTableView *itemTableView;
-
 @property (nonatomic, retain) NSNumber *worldTime;
-@property (nonatomic, retain) NSString *playerName;
+@property (nonatomic, assign) IBOutlet NSPopUpButton *playerSelectionControl;
 
 - (IBAction)menuSelectWorldFromPath:(id)sender;
 - (IBAction)menuSelectWorld:(id)sender;
@@ -75,5 +75,6 @@
 - (IBAction)emptyInventory:(id)sender;
 - (IBAction)saveInventoryItems:(id)sender;
 - (IBAction)loadInventoryItems:(id)sender;
+- (IBAction)playerSelectionChanged:(id)sender;
 
 @end

+ 198 - 51
Classes/IJInventoryWindowController.m

@@ -20,9 +20,11 @@
 - (BOOL)isDocumentEdited;
 - (void)loadWorldAtFolder:(NSString *)worldFolder;
 - (void)loadWorldSelectionControl;
+- (void)loadPlayerSelectionControl;
 @end
 
 @implementation IJInventoryWindowController
+@synthesize playerSelectionControl;
 
 @synthesize worldSelectionControl;
 @synthesize statusTextField;
@@ -98,6 +100,78 @@
     * Players/PlayerName.dat file 
     */
    
+   [armorInventory removeAllObjects];
+	[quickInventory removeAllObjects];
+	[normalInventory removeAllObjects];
+	
+	[inventoryView setItems:normalInventory];
+	[quickView setItems:quickInventory];
+	[armorView setItems:armorInventory];
+   
+   [player release];
+   player = nil;
+	[inventory release];
+	inventory = nil;
+   
+   loadedPlayer = nil;
+   
+   NSLog(@"Player name: %@",PlayerName);
+   
+   NSString *playerPath = [IJMinecraftLevel pathForPlayer:PlayerName withWorld: loadedWorldFolder];
+   
+   NSLog(@"Path: %@", playerPath);
+   
+   NSData *playerFileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:playerPath]];
+	if (!playerFileData)
+	{
+		// Error loading 
+		NSBeginCriticalAlertSheet(@"Error loading player.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"InsideJob was unable to load the level at %@.", playerPath);
+		return;
+	}
+   
+   player = [[IJMinecraftLevel nbtContainerWithData:playerFileData] retain];
+	inventory = [[player inventory] retain];
+	
+	// Add placeholder inventory items:
+	
+	for (int i = 0; i < IJInventorySlotQuickLast + 1 - IJInventorySlotQuickFirst; i++)
+		[quickInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotQuickFirst + i]];
+	
+	for (int i = 0; i < IJInventorySlotNormalLast + 1 - IJInventorySlotNormalFirst; i++)
+		[normalInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotNormalFirst + i]];
+	
+	for (int i = 0; i < IJInventorySlotArmorLast + 1 - IJInventorySlotArmorFirst; i++)
+		[armorInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotArmorFirst + i]];
+	
+	
+	// Overwrite the placeholders with actual inventory:
+	
+	for (IJInventoryItem *item in inventory)
+	{
+		if (IJInventorySlotQuickFirst <= item.slot && item.slot <= IJInventorySlotQuickLast)
+		{
+			[quickInventory replaceObjectAtIndex:item.slot - IJInventorySlotQuickFirst withObject:item];
+		}
+		else if (IJInventorySlotNormalFirst <= item.slot && item.slot <= IJInventorySlotNormalLast)
+		{
+			[normalInventory replaceObjectAtIndex:item.slot - IJInventorySlotNormalFirst withObject:item];
+		}
+		else if (IJInventorySlotArmorFirst <= item.slot && item.slot <= IJInventorySlotArmorLast)
+		{
+			[armorInventory replaceObjectAtIndex:item.slot - IJInventorySlotArmorFirst withObject:item];
+		}
+	}
+	
+   //	NSLog(@"normal: %@", normalInventory);
+   //	NSLog(@"quick: %@", quickInventory);
+	
+	[inventoryView setItems:normalInventory];
+	[quickView setItems:quickInventory];
+	[armorView setItems:armorInventory];
+	
+	[self setDocumentEdited:NO];
+	statusTextField.stringValue = @"Player loaded!";
+	loadedPlayer = [PlayerName retain];
 }
 
 - (void)loadWorldAtFolder:(NSString *)worldPath
@@ -109,6 +183,11 @@
 		return;
 	}
 	
+   NSFileManager *filemgr;
+   NSArray *filelist;
+   NSError *fileError;
+   int count, i;
+   
 	[armorInventory removeAllObjects];
 	[quickInventory removeAllObjects];
 	[normalInventory removeAllObjects];
@@ -156,13 +235,31 @@
 	
 	[self willChangeValueForKey:@"worldTime"];
 	
+   [playerSelectionControl setHidden: YES];
    /* Now search for first player .dat file (but by default try to load from level.dat */
-#if 1
+   /* Verify that a "Player" folder exist. If not do nt show the player list */
+   filemgr = [NSFileManager defaultManager];
+   
+   filelist = [filemgr contentsOfDirectoryAtPath:worldPath error:&fileError];
+   
+   count = [filelist count];
+   
+   for (i = 0; i < count; i++)
+   {
+      NSLog (@"File in world/ %@", [filelist objectAtIndex: i]);
+      if ([[filelist objectAtIndex: i] isEqualTo: @"players"])
+      {
+         [playerSelectionControl setHidden: NO];
+         [self loadPlayerSelectionControl];
+         break;
+      }
+   }
+   
    loadedPlayer = nil;
    NSString *playerPath = [IJMinecraftLevel pathForPlayer:loadedPlayer withWorld:worldPath];
-#else
-   NSString *playerPath = [worldPath stringByAppendingString:@"/players/Godzil.dat"];
-#endif
+
+   /* Now load level.dat as if i is not a SMP. */
+   
    NSData *playerFileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:playerPath]];
 	if (!playerFileData)
 	{
@@ -215,11 +312,11 @@
 	[armorView setItems:armorInventory];
 	
 	[self setDocumentEdited:NO];
-	statusTextField.stringValue = @"";
+	statusTextField.stringValue = @"World loaded!";
 	loadedWorldFolder = [worldPath retain];
-    
-    NSLog(@"%@",loadedWorldFolder);
-    NSLog(@"%@",worldPath);
+
+   NSLog(@"%@",loadedWorldFolder);
+   NSLog(@"%@",worldPath);
     
 }
 
@@ -278,17 +375,6 @@
 			return;
 		}
 	}
-   // Remove a previously-created .insidejobbackup, if it exists:
-	if ([[NSFileManager defaultManager] fileExistsAtPath:backupLevelPath])
-	{
-		success = [[NSFileManager defaultManager] removeItemAtPath:backupPlayerPath error:&error];
-		if (!success)
-		{
-			NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
-			NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to remove the prior backup of this level file:\n%@", [error localizedDescription]);
-			return;
-		}
-	}
 	
 	// Create the backup:
 	success = [[NSFileManager defaultManager] copyItemAtPath:levelPath toPath:backupLevelPath error:&error];
@@ -299,15 +385,7 @@
 		return;
 	}
 
-   success = [[NSFileManager defaultManager] copyItemAtPath:playerPath toPath:backupPlayerPath error:&error];
-	if (!success)
-	{
-		NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
-		NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to create a backup of the existing level file:\n%@", [error localizedDescription]);
-		return;
-	}
-
-	// Write the new level.dat out:
+   // Write the new level.dat out:
 	success = [[player writeData] writeToURL:[NSURL fileURLWithPath:levelPath] options:0 error:&error];
    
 	if (!success)
@@ -321,20 +399,58 @@
 			NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [restoreError localizedDescription]);
 			NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup could not be restored.\n%@\n%@", [error localizedDescription], [restoreError localizedDescription]);
 		}
-		
-      success = [[NSFileManager defaultManager] copyItemAtPath:backupPlayerPath toPath:playerPath error:&restoreError];
-		if (!success)
-		{
-			NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [restoreError localizedDescription]);
-			NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup could not be restored.\n%@\n%@", [error localizedDescription], [restoreError localizedDescription]);
-		}
 		else
-		{
-			NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup was successfully restored.\n%@", [error localizedDescription]);
-		}
+      {
+         NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup was successfully restored.\n%@", [error localizedDescription]);
+      }
 		return;
 	}
-	
+
+   if (playerPath != levelPath)
+   {
+      
+      // Remove a previously-created .insidejobbackup, if it exists:
+      if ([[NSFileManager defaultManager] fileExistsAtPath:backupPlayerPath])
+      {
+         success = [[NSFileManager defaultManager] removeItemAtPath:backupPlayerPath error:&error];
+         if (!success)
+         {
+            NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
+            NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to remove   the prior backup of this player file:\n%@", [error localizedDescription]);
+            return;
+         }
+      }
+      
+      success = [[NSFileManager defaultManager] copyItemAtPath:playerPath toPath:backupPlayerPath error:&error];
+      if (!success)
+      {
+         NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
+         NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to create a backup of the existing player file:\n%@", [error localizedDescription]);
+         return;
+      }
+
+      // Write the new player.dat out:
+      success = [[player writeData] writeToURL:[NSURL fileURLWithPath:playerPath] options:0 error:&error];
+   
+      if (!success)
+      {
+         NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
+		
+         NSError *restoreError = nil;
+		
+         success = [[NSFileManager defaultManager] copyItemAtPath:backupPlayerPath toPath:playerPath error:&restoreError];
+         if (!success)
+         {
+            NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [restoreError localizedDescription]);
+            NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing player file, and the backup could not be restored.\n%@\n%@", [error localizedDescription], [restoreError localizedDescription]);
+         }
+         else
+         {
+            NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing player file, and the backup was successfully restored.\n%@", [error localizedDescription]);
+         }
+         return;
+      }
+   }
 	[self setDocumentEdited:NO];
 	statusTextField.stringValue = @"Saved.";
 }
@@ -399,14 +515,14 @@
 	path = [path stringByAppendingPathComponent:@"saves"];
     
     
-    NSString* worldName = [worldSelectionControl titleOfSelectedItem];
+   NSString* worldName = [worldSelectionControl titleOfSelectedItem];
 	NSString* worldPath = [path stringByAppendingPathComponent:worldName];
     
-    NSLog(@"loadedWorldFolder: %@",loadedWorldFolder);
-    NSLog(@"worldName: %@",worldName);
-    NSLog(@"worldPath: %@",worldPath);
+   NSLog(@"loadedWorldFolder: %@",loadedWorldFolder);
+   NSLog(@"worldName: %@",worldName);
+   NSLog(@"worldPath: %@",worldPath);
 
-    [self loadWorldAtFolder:worldPath];
+   [self loadWorldAtFolder:worldPath];
 }
 
 - (void)loadWorldSelectionControl
@@ -442,6 +558,37 @@
     
 }
 
+- (void)loadPlayerSelectionControl
+{
+	NSString *playerPath = loadedWorldFolder; 
+   playerPath = [playerPath stringByAppendingPathComponent:@"players"];
+   
+   NSFileManager *filemgr;
+   NSArray *filelist;
+   NSError *fileError;
+   int count;
+   int i;
+   
+   filemgr = [NSFileManager defaultManager];
+   
+   filelist = [filemgr contentsOfDirectoryAtPath:playerPath error:&fileError];
+   
+   count = [filelist count];
+      
+   [playerSelectionControl removeAllItems];
+   
+   [playerSelectionControl addItemWithTitle:@"World default"];
+   
+   for (i = 0; i < count; i++)
+   {
+      NSLog (@"%@", [filelist objectAtIndex: i]);
+      [playerSelectionControl addItemWithTitle:[[filelist objectAtIndex: i] stringByDeletingPathExtension]];
+   }
+   
+   [filemgr release];
+   
+}
+
 - (void)saveDocument:(id)sender
 {
 	[self saveWorld];
@@ -484,13 +631,6 @@
 	[self setDocumentEdited:YES];
 }
 
-- (NSString *)playerName
-{
-	return @"Godzil";
-}
-- (void)setPlayerName:(NSString *)playerName
-{
-}
 
 - (void)calcTimePoints:(int)number
 {
@@ -622,6 +762,13 @@
 	[self loadInventory];
 }
 
+- (IBAction)playerSelectionChanged:(id)sender
+{
+   [self loadWorldPlayerInventory: [playerSelectionControl titleOfSelectedItem]];
+      
+   //   [self loadWorldAtFolder:worldPath];
+}
+
 
 #pragma mark -
 #pragma mark IJInventoryViewDelegate

+ 1 - 1
Classes/IJMinecraftLevel.m

@@ -143,7 +143,7 @@
    if (loadedPlayer == nil)
       return [self pathForLevelDatAtFolder:worldPath];
    
-   return [[[worldPath stringByAppendingPathComponent:@"players"] stringByAppendingPathComponent:loadedPlayer] stringByAppendingPathExtension:@".dat"];
+   return [[[worldPath stringByAppendingPathComponent:@"players"] stringByAppendingPathComponent:loadedPlayer] stringByAppendingPathExtension:@"dat"];
 }
 
 + (BOOL)worldExistsAtFolder:(NSString *)worldPath

+ 151 - 5
English.lproj/MainMenu.xib

@@ -560,7 +560,7 @@
 						<object class="NSTextField" id="574149520">
 							<reference key="NSNextResponder" ref="439893737"/>
 							<int key="NSvFlags">266</int>
-							<string key="NSFrame">{{211, 369}, {366, 14}}</string>
+							<string key="NSFrame">{{308, 369}, {269, 14}}</string>
 							<reference key="NSSuperview" ref="439893737"/>
 							<reference key="NSWindow"/>
 							<reference key="NSNextKeyView" ref="263108995"/>
@@ -1068,10 +1068,10 @@
 						<object class="NSPopUpButton" id="957906746">
 							<reference key="NSNextResponder" ref="439893737"/>
 							<int key="NSvFlags">268</int>
-							<string key="NSFrame">{{11, 363}, {172, 25}}</string>
+							<string key="NSFrame">{{11, 363}, {175, 25}}</string>
 							<reference key="NSSuperview" ref="439893737"/>
 							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="574149520"/>
+							<reference key="NSNextKeyView"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSPopUpButtonCell" key="NSCell" id="263349888">
 								<int key="NSCellFlags">-2080244160</int>
@@ -1086,7 +1086,7 @@
 								<int key="NSPeriodicInterval">75</int>
 								<object class="NSMenuItem" key="NSMenuItem" id="299440734">
 									<reference key="NSMenu" ref="1027841374"/>
-									<string key="NSTitle">Item 1</string>
+									<string key="NSTitle">World</string>
 									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
@@ -1133,6 +1133,73 @@
 								<int key="NSArrowPosition">2</int>
 							</object>
 						</object>
+						<object class="NSPopUpButton" id="234722780">
+							<reference key="NSNextResponder" ref="439893737"/>
+							<int key="NSvFlags">268</int>
+							<string key="NSFrame">{{194, 363}, {109, 25}}</string>
+							<reference key="NSSuperview" ref="439893737"/>
+							<reference key="NSWindow"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSPopUpButtonCell" key="NSCell" id="667904434">
+								<int key="NSCellFlags">-2080244160</int>
+								<int key="NSCellFlags2">2048</int>
+								<reference key="NSSupport" ref="731765667"/>
+								<reference key="NSControlView" ref="234722780"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">163</int>
+								<string key="NSAlternateContents"/>
+								<string key="NSKeyEquivalent"/>
+								<int key="NSPeriodicDelay">400</int>
+								<int key="NSPeriodicInterval">75</int>
+								<object class="NSMenuItem" key="NSMenuItem" id="715927827">
+									<reference key="NSMenu" ref="470546996"/>
+									<string key="NSTitle">Player</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<int key="NSState">1</int>
+									<reference key="NSOnImage" ref="35465992"/>
+									<reference key="NSMixedImage" ref="502551668"/>
+									<string key="NSAction">_popUpItemAction:</string>
+									<reference key="NSTarget" ref="667904434"/>
+								</object>
+								<bool key="NSMenuItemRespectAlignment">YES</bool>
+								<object class="NSMenu" key="NSMenu" id="470546996">
+									<string key="NSTitle">OtherViews</string>
+									<object class="NSMutableArray" key="NSMenuItems">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<reference ref="715927827"/>
+										<object class="NSMenuItem" id="580551946">
+											<reference key="NSMenu" ref="470546996"/>
+											<string key="NSTitle">Item 2</string>
+											<string key="NSKeyEquiv"/>
+											<int key="NSKeyEquivModMask">1048576</int>
+											<int key="NSMnemonicLoc">2147483647</int>
+											<reference key="NSOnImage" ref="35465992"/>
+											<reference key="NSMixedImage" ref="502551668"/>
+											<string key="NSAction">_popUpItemAction:</string>
+											<reference key="NSTarget" ref="667904434"/>
+										</object>
+										<object class="NSMenuItem" id="804814443">
+											<reference key="NSMenu" ref="470546996"/>
+											<string key="NSTitle">Item 3</string>
+											<string key="NSKeyEquiv"/>
+											<int key="NSKeyEquivModMask">1048576</int>
+											<int key="NSMnemonicLoc">2147483647</int>
+											<reference key="NSOnImage" ref="35465992"/>
+											<reference key="NSMixedImage" ref="502551668"/>
+											<string key="NSAction">_popUpItemAction:</string>
+											<reference key="NSTarget" ref="667904434"/>
+										</object>
+									</object>
+									<reference key="NSMenuFont" ref="731765667"/>
+								</object>
+								<int key="NSPreferredEdge">2</int>
+								<bool key="NSUsesItemFromMenu">YES</bool>
+								<bool key="NSAltersState">YES</bool>
+								<int key="NSArrowPosition">2</int>
+							</object>
+						</object>
 					</object>
 					<string key="NSFrame">{{7, 11}, {585, 396}}</string>
 					<reference key="NSSuperview"/>
@@ -1516,6 +1583,22 @@
 					</object>
 					<int key="connectionID">741</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">playerSelectionControl</string>
+						<reference key="source" ref="760161335"/>
+						<reference key="destination" ref="234722780"/>
+					</object>
+					<int key="connectionID">755</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">playerSelectionChanged:</string>
+						<reference key="source" ref="760161335"/>
+						<reference key="destination" ref="234722780"/>
+					</object>
+					<int key="connectionID">756</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -1791,6 +1874,7 @@
 							<reference ref="924742053"/>
 							<reference ref="574149520"/>
 							<reference ref="957906746"/>
+							<reference ref="234722780"/>
 						</object>
 						<reference key="parent" ref="972006081"/>
 					</object>
@@ -2185,6 +2269,50 @@
 						<reference key="object" ref="230766171"/>
 						<reference key="parent" ref="720053764"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">749</int>
+						<reference key="object" ref="234722780"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="667904434"/>
+						</object>
+						<reference key="parent" ref="439893737"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">750</int>
+						<reference key="object" ref="667904434"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="470546996"/>
+						</object>
+						<reference key="parent" ref="234722780"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">751</int>
+						<reference key="object" ref="470546996"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="715927827"/>
+							<reference ref="580551946"/>
+							<reference ref="804814443"/>
+						</object>
+						<reference key="parent" ref="667904434"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">752</int>
+						<reference key="object" ref="715927827"/>
+						<reference key="parent" ref="470546996"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">753</int>
+						<reference key="object" ref="580551946"/>
+						<reference key="parent" ref="470546996"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">754</int>
+						<reference key="object" ref="804814443"/>
+						<reference key="parent" ref="470546996"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2333,8 +2461,10 @@
 					<string>730.IBPluginDependency</string>
 					<string>732.IBPluginDependency</string>
 					<string>733.IBPluginDependency</string>
+					<string>749.IBPluginDependency</string>
 					<string>75.IBPluginDependency</string>
 					<string>75.ImportedFromIB2</string>
+					<string>750.IBPluginDependency</string>
 					<string>81.IBEditorWindowLastContentRect</string>
 					<string>81.IBPluginDependency</string>
 					<string>81.ImportedFromIB2</string>
@@ -2510,7 +2640,9 @@
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<integer value="1"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>{{483, 773}, {178, 63}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<integer value="1"/>
@@ -2533,7 +2665,7 @@
 				<reference key="dict.values" ref="0"/>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">741</int>
+			<int key="maxID">756</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2559,6 +2691,7 @@
 							<string>makeSearchFieldFirstResponder:</string>
 							<string>menuSelectWorld:</string>
 							<string>menuSelectWorldFromPath:</string>
+							<string>playerSelectionChanged:</string>
 							<string>saveInventoryItems:</string>
 							<string>setNextDay:</string>
 							<string>setNextMidnight:</string>
@@ -2582,6 +2715,7 @@
 							<string>id</string>
 							<string>id</string>
 							<string>id</string>
+							<string>id</string>
 						</object>
 					</object>
 					<object class="NSMutableDictionary" key="actionInfosByName">
@@ -2594,6 +2728,7 @@
 							<string>makeSearchFieldFirstResponder:</string>
 							<string>menuSelectWorld:</string>
 							<string>menuSelectWorldFromPath:</string>
+							<string>playerSelectionChanged:</string>
 							<string>saveInventoryItems:</string>
 							<string>setNextDay:</string>
 							<string>setNextMidnight:</string>
@@ -2628,6 +2763,10 @@
 								<string key="name">menuSelectWorldFromPath:</string>
 								<string key="candidateClassName">id</string>
 							</object>
+							<object class="IBActionInfo">
+								<string key="name">playerSelectionChanged:</string>
+								<string key="candidateClassName">id</string>
+							</object>
 							<object class="IBActionInfo">
 								<string key="name">saveInventoryItems:</string>
 								<string key="candidateClassName">id</string>
@@ -2666,6 +2805,7 @@
 							<string>inventoryView</string>
 							<string>itemSearchField</string>
 							<string>itemTableView</string>
+							<string>playerSelectionControl</string>
 							<string>quickView</string>
 							<string>statusTextField</string>
 							<string>worldSelectionControl</string>
@@ -2676,6 +2816,7 @@
 							<string>IJInventoryView</string>
 							<string>NSSearchField</string>
 							<string>NSTableView</string>
+							<string>NSPopUpButton</string>
 							<string>IJInventoryView</string>
 							<string>NSTextField</string>
 							<string>NSPopUpButton</string>
@@ -2689,6 +2830,7 @@
 							<string>inventoryView</string>
 							<string>itemSearchField</string>
 							<string>itemTableView</string>
+							<string>playerSelectionControl</string>
 							<string>quickView</string>
 							<string>statusTextField</string>
 							<string>worldSelectionControl</string>
@@ -2711,6 +2853,10 @@
 								<string key="name">itemTableView</string>
 								<string key="candidateClassName">NSTableView</string>
 							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">playerSelectionControl</string>
+								<string key="candidateClassName">NSPopUpButton</string>
+							</object>
 							<object class="IBToOneOutletInfo">
 								<string key="name">quickView</string>
 								<string key="candidateClassName">IJInventoryView</string>