Merged from revision: 7267

Fixes (by Buggler)
- Allows sector inventory item deletion feature to delete inaccessible and not-in-sector items. Hold 'Delete' hotkey and click the item
- Hot key Ctrl+Tab can now switch to the second page of General tab in EDB for weapons
- Fixed hardcoded mine icons and spawning pool sector in AI Viewer

Editor
- Hotkey for finding previous merc changed to 'Ctrl+Space' to avoid out-of-map boundary display
- Added editor command line options in popup help text

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7268 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-06-05 14:37:32 +00:00
parent ca03cb86c0
commit f5e94e869a
15 changed files with 75 additions and 75 deletions
+5 -2
View File
@@ -648,14 +648,17 @@ void RenderInfoInSector()
{
UINT8 ubSectorX, ubSectorY;
UINT8 ubMercs=0, ubActive=0, ubUnconcious=0, ubCollapsed=0;
INT32 i, yp;
INT32 i, xp, yp;
if( gfViewEnemies && !gbViewLevel )
{
RenderStationaryGroups();
RenderMovingGroupsAndMercs();
SetFontForeground( FONT_LTRED );
mprintf( 78, 358, L"%3d", giReinforcementPool );
xp = VIEWER_LEFT + VIEWER_CELLW * ( gModSettings.ubSAISpawnSectorX - 1 ) + 6;
yp = VIEWER_TOP + VIEWER_CELLH * ( gModSettings.ubSAISpawnSectorY - 1 ) + 13;
//mprintf( 78, 358, L"%3d", giReinforcementPool );
mprintf( xp, yp, L"%3d", giReinforcementPool );
//Render general enemy statistics
ClearViewerRegion( 105, VIEWER_BOTTOM + 10, 265, VIEWER_BOTTOM + 66 );
-32
View File
@@ -331,37 +331,6 @@ void InitKnowFacilitiesFlags( )
}
void InitMiningLocations()
{
SECTORINFO *pSector;
//Set up mining sites
pSector = &SectorInfo[SEC_D4];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 33;
pSector = &SectorInfo[SEC_D13];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 41;
pSector = &SectorInfo[SEC_B2];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 20;
pSector = &SectorInfo[SEC_H8];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 64;
pSector = &SectorInfo[SEC_I14];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 80;
//Grumm
pSector = &SectorInfo[SEC_H3];
pSector->uiFlags |= SF_MINING_SITE;
// pSector->ubIncomeValue = 100;
}
//Mobile groups are handled separately from sectors, because they are on the move.
void GeneratePatrolGroups()
{
@@ -635,7 +604,6 @@ void InitNewCampaign()
RemoveAllGroups();
InitWorld(); // Lesh: generate different world each time using alternative maps
InitMiningLocations();
// HEADROCK HAM 3.5: This is no longer required.
//InitKnowFacilitiesFlags( );
@@ -1388,6 +1388,28 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
// CHRISL: Also return if the item we've clicked on is currently displayed in the item description box
if(InItemDescriptionBox( ) && gpItemDescObject == &pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].object)
return;
// Buggler: sector inventory item deletion before item reachable & in-sector checks to allow deletion of any item
if ( _KeyDown ( DEL ) )
{
if ( _KeyDown ( 89 )) //Lalien: delete all items of this type
{
DeleteItemsOfType( pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].object.usItem );
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, New113Message[MSG113_DELETE_ALL] );
}
else if ( _KeyDown( SHIFT ) ) // delete stack
{
pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].object.ubNumberOfObjects = 0;
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, New113Message[MSG113_DELETED] );
}
else
{
pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].object.ubNumberOfObjects--;
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, New113Message[MSG113_DELETED] );
}
fMapPanelDirty = TRUE;
return;
}
}
@@ -2321,20 +2343,6 @@ void BeginInventoryPoolPtr( OBJECTTYPE *pInventorySlot )
}
}
}
else
{
gpItemPointer = NULL;
fMapInventoryItem = FALSE;
if ( _KeyDown ( 89 )) //Lalien: delete all items of this type on Ctrl+Y
{
DeleteItemsOfType( gItemPointer.usItem );
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, New113Message[MSG113_DELETE_ALL] );
}
else {
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, New113Message[MSG113_DELETED] );
}
}
if ( fShowMapInventoryPool )
HandleButtonStatesWhileMapInventoryActive();
}
+8
View File
@@ -138,8 +138,16 @@ extern UINT8 gubCurrentTalkingID;
void InitializeMines( void )
{
INT32 i;
// Don't execute hardcoded logic. Leave initialization to the Lua script.
g_luaMines.InitializeMines();
// Buggler: set mining site flag for AI Viewer.cpp
for (i=0; i < MAX_NUMBER_OF_MINES; i++)
{
SectorInfo[ SECTOR( gMineStatus[i].sSectorX, gMineStatus[i].sSectorY ) ].uiFlags |= SF_MINING_SITE;
}
#if 0
UINT8 ubMineIndex;
MINE_STATUS_TYPE *pMineStatus;
+7 -1
View File
@@ -7066,8 +7066,14 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
{
if( InItemDescriptionBox( ) && gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] == TRUE )
{
if ( gubDescBoxPage < 2 )
if ( (Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH)
&& gubDescGenPage == 0 && gubDescBoxPage == 1 )
{
gubDescGenPage = 1;
}
else if ( gubDescBoxPage < 2 )
{
gubDescGenPage = 0;
gubDescBoxPage++;
}
else