mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Helpful option: if PRINTOUTTILESET is TRUE (default FALSE), pressing [f] over a structure will also print out what tileset the structure's subtileset belongs too, its name, and the specific tile index. This is rather helpful if you set up fortifiction or interactive action xmls, or if you just want to know a sector's tileset.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8279 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-1
@@ -1724,7 +1724,8 @@ void LoadGameExternalOptions()
|
||||
|
||||
//################# Tactical Fortification Settings ##################
|
||||
gGameExternalOptions.fFortificationAllowInHostileSector = iniReader.ReadBoolean("Tactical Fortification Settings", "FORTIFICATION_ALLOW_IN_HOSTILE_SECTOR", FALSE);
|
||||
gGameExternalOptions.fRoofCollapse = iniReader.ReadBoolean( "Tactical Fortification Settings", "ROOF_COLLAPSE", TRUE );
|
||||
gGameExternalOptions.fRoofCollapse = iniReader.ReadBoolean("Tactical Fortification Settings", "ROOF_COLLAPSE", TRUE );
|
||||
gGameExternalOptions.fPrintStructureTileset = iniReader.ReadBoolean("Tactical Fortification Settings", "PRINTOUTTILESET", FALSE );
|
||||
|
||||
//################# Tactical Food Settings ##################
|
||||
gGameExternalOptions.usFoodDigestionHourlyBaseFood = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_FOOD", 20, 0, 250);
|
||||
|
||||
@@ -431,6 +431,9 @@ typedef struct
|
||||
// Flugente: can roofs collapse?
|
||||
BOOLEAN fRoofCollapse;
|
||||
|
||||
// Flugente: option to print out tilesets of structure if we press 'f'
|
||||
BOOLEAN fPrintStructureTileset;
|
||||
|
||||
// Flugente: food settings
|
||||
UINT16 usFoodDigestionHourlyBaseFood;
|
||||
UINT16 usFoodDigestionHourlyBaseDrink;
|
||||
|
||||
@@ -3369,6 +3369,42 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
CHAR16 zOutputString[512];
|
||||
swprintf( zOutputString, L"%s: %d", pUpdateMapInfoText[19], usGridNo);
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, zOutputString );
|
||||
|
||||
// Flugente: print out structure tileset
|
||||
if ( gGameExternalOptions.fPrintStructureTileset )
|
||||
{
|
||||
STRUCTURE * pStruct = FindStructure( usGridNo, (STRUCTURE_GENERIC) );
|
||||
if ( pStruct )
|
||||
{
|
||||
// if this is a multi-tile structure, be sure to use the base gridno
|
||||
if ( !(pStruct->fFlags & STRUCTURE_BASE_TILE) )
|
||||
{
|
||||
pStruct = FindBaseStructure( pStruct );
|
||||
}
|
||||
|
||||
if ( pStruct )
|
||||
{
|
||||
LEVELNODE* pNode = FindLevelNodeBasedOnStructure( pStruct->sGridNo, pStruct );
|
||||
|
||||
if ( pNode )
|
||||
{
|
||||
UINT32 uiTileType = 0;
|
||||
if ( GetTileType( pNode->usIndex, &uiTileType ) )
|
||||
{
|
||||
std::string tilesestr = GetNameToTileSet( uiTileType );
|
||||
|
||||
CHAR16 whcarthing[100];
|
||||
|
||||
int nChars = MultiByteToWideChar( CP_ACP, 0, tilesestr.c_str(), -1, NULL, 0 );
|
||||
MultiByteToWideChar( CP_UTF8, 0, tilesestr.c_str( ), -1, whcarthing, nChars );
|
||||
|
||||
swprintf( zOutputString, L"Tileset %d: Tilesetname: %s tileindex: %d", giCurrentTilesetID, whcarthing, pStruct->pDBStructureRef->pDBStructure->usStructureNumber );
|
||||
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, zOutputString );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user