From 5e2c61ef123809b253666e01221e80767c847a34 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Wed, 25 Jun 2025 22:49:29 +0300 Subject: [PATCH] Externalized UB bloodcat quest sector --- Ja2/ub_config.cpp | 5 +++++ Ja2/ub_config.h | 5 ++++- Strategic/Queen Command.cpp | 2 +- Tactical/Ja25_Tactical.cpp | 10 +++++++++- Tactical/Ja25_Tactical.h | 4 ++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Ja2/ub_config.cpp b/Ja2/ub_config.cpp index 0479cc89a..908f75844 100644 --- a/Ja2/ub_config.cpp +++ b/Ja2/ub_config.cpp @@ -357,6 +357,11 @@ void LoadGameUBOptions() gGameUBOptions.H10SectorPlayerQuoteZ = iniReader.ReadInteger("Unfinished Business Settings","H10_SECTOR_PLAYER_QUOTE_Z", 0); + gGameUBOptions.BettyBloodCatSectorX = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_X", 10 ); + gGameUBOptions.BettyBloodCatSectorY = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Y", 9 ); + gGameUBOptions.BettyBloodCatSectorZ = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Z", 0 ); + + if ( gGameUBOptions.InGameHeli == TRUE ) gGameUBOptions.InGameHeliCrash = FALSE; diff --git a/Ja2/ub_config.h b/Ja2/ub_config.h index c8e2780dd..d5c98aea3 100644 --- a/Ja2/ub_config.h +++ b/Ja2/ub_config.h @@ -220,7 +220,10 @@ typedef struct UINT32 SectorDoorInTunnelGridNo; UINT8 MaxNumberOfMercs; - + + INT16 BettyBloodCatSectorX; + INT16 BettyBloodCatSectorY; + INT8 BettyBloodCatSectorZ; } GAME_UB_OPTIONS; extern GAME_UB_OPTIONS gGameUBOptions; diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index 074ef6c32..b5ff2ce4b 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -3171,7 +3171,7 @@ BOOLEAN CheckPendingNonPlayerTeam( UINT8 usTeam ) void HandleBloodCatDeaths( SECTORINFO *pSector ) { //if the current sector is the first part of the town - if( gWorldSectorX == 10 && gWorldSectorY == 9 && gbWorldSectorZ == 0 ) + if( gWorldSectorX == BETTY_BLOODCAT_SECTOR_X && gWorldSectorY == BETTY_BLOODCAT_SECTOR_Y && gbWorldSectorZ == BETTY_BLOODCAT_SECTOR_Z ) { //if ALL the bloodcats are killed if( pSector->bBloodCats == 0 ) diff --git a/Tactical/Ja25_Tactical.cpp b/Tactical/Ja25_Tactical.cpp index f147dc0db..28ee41e21 100644 --- a/Tactical/Ja25_Tactical.cpp +++ b/Tactical/Ja25_Tactical.cpp @@ -317,6 +317,9 @@ UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14; UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10; UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1; +INT16 BETTY_BLOODCAT_SECTOR_X = 10; +INT16 BETTY_BLOODCAT_SECTOR_Y = 9; +INT8 BETTY_BLOODCAT_SECTOR_Z = 0; void InitGridNoUB() { @@ -352,7 +355,12 @@ void InitGridNoUB() EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = gGameUBOptions.ExitForFanToPowerGenSectorX; //14; EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = gGameUBOptions.ExitForFanToPowerGenSectorY; //10; EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = gGameUBOptions.ExitForFanToPowerGenSectorZ; //1; - + + BETTY_BLOODCAT_SECTOR_X = gGameUBOptions.BettyBloodCatSectorX; + BETTY_BLOODCAT_SECTOR_Y = gGameUBOptions.BettyBloodCatSectorY; + BETTY_BLOODCAT_SECTOR_Z = gGameUBOptions.BettyBloodCatSectorZ; + + MANUEL_UB = gGameUBOptions.ubMANUEL_UB; BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB; JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB; diff --git a/Tactical/Ja25_Tactical.h b/Tactical/Ja25_Tactical.h index 155e6e37e..9e1205f62 100644 --- a/Tactical/Ja25_Tactical.h +++ b/Tactical/Ja25_Tactical.h @@ -143,6 +143,10 @@ extern UINT8 RAUL_UB; extern UINT8 MORRIS_UB; extern UINT8 RUDY_UB; +extern INT16 BETTY_BLOODCAT_SECTOR_X; +extern INT16 BETTY_BLOODCAT_SECTOR_Y; +extern INT8 BETTY_BLOODCAT_SECTOR_Z; + extern void Old_UB_Inventory (); extern void New_UB_Inventory ();