mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Helicopter features (by anv):
- Waldo can now repair the helicopter for money - alternative fuel system - damage to helicopter can damage passengers Appropriate Data in GameDir r1897. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6695 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -70,6 +70,8 @@
|
||||
|
||||
#include "ub_config.h"
|
||||
|
||||
#include "history.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -354,6 +356,8 @@ void InitalizeStaticExternalNPCFaces( void )
|
||||
//}
|
||||
// ... put Skyrider's face at index 0
|
||||
uiExternalStaticNPCFaces.push_back(( UINT32 )InitFace( ( UINT8 )( SKYRIDER ), NOBODY, FACE_FORCE_SMALL ));
|
||||
// anv: and put Waldo too
|
||||
uiExternalStaticNPCFaces.push_back(( UINT32 )InitFace( ( UINT8 )( WALDO ), NOBODY, FACE_FORCE_SMALL ));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2682,6 +2686,21 @@ void HandleDialogueEnd( FACETYPE *pFace )
|
||||
MSYS_RemoveRegion( &gTextBoxMouseRegion );
|
||||
fTextBoxMouseRegionCreated = FALSE;
|
||||
}
|
||||
// anv: show repair prompt afer Waldo offered repairs
|
||||
if ( gbUIHandlerID == DIALOGUE_EXTERNAL_NPC_UI && gTacticalStatus.ubLastQuoteProfileNUm == WALDO &&
|
||||
( gTacticalStatus.ubLastQuoteSaid == WALDO_REPAIR_PROPOSITION || gTacticalStatus.ubLastQuoteSaid == WALDO_SERIOUS_REPAIR_PROPOSITION ) )
|
||||
{
|
||||
CHAR16 sHelicopterRepairPromptText[ 320 ];
|
||||
if( CheckFact(FACT_HELI_DAMAGED_CAN_START_REPAIR, 0) == TRUE )
|
||||
{
|
||||
swprintf( sHelicopterRepairPromptText, pHelicopterRepairRefuelStrings[ STR_HELI_RR_REPAIR_PROMPT ], gMercProfiles[ WALDO ].zNickname, CalculateHelicopterRepairCost( FALSE ), gHelicopterSettings.ubHelicopterBasicRepairTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sHelicopterRepairPromptText, pHelicopterRepairRefuelStrings[ STR_HELI_RR_REPAIR_PROMPT ], gMercProfiles[ WALDO ].zNickname, CalculateHelicopterRepairCost( TRUE ), gHelicopterSettings.ubHelicopterSeriousRepairTime );
|
||||
}
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sHelicopterRepairPromptText, guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, OfferHelicopterRepairBoxCallBack, NULL );
|
||||
}
|
||||
|
||||
// anv: after merc finishes his quote, we want enemy to answer
|
||||
if ( gbUIHandlerID == DIALOGUE_TACTICAL_UI )
|
||||
@@ -2720,6 +2739,12 @@ void HandleDialogueEnd( FACETYPE *pFace )
|
||||
|
||||
case DIALOGUE_NPC_UI:
|
||||
|
||||
// anv: "meet" Waldo when speaking with him first time
|
||||
if ( gTacticalStatus.ubLastQuoteProfileNUm == WALDO && CheckFact( FACT_WALDO_MET, 0 ) == FALSE && gTacticalStatus.ubLastQuoteSaid == 0 )
|
||||
{
|
||||
AddHistoryToPlayersLog( HISTORY_WALDO, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
||||
SetFactTrue( FACT_WALDO_MET );
|
||||
}
|
||||
|
||||
// Remove region
|
||||
if ( gTalkPanel.fTextRegionOn )
|
||||
|
||||
Reference in New Issue
Block a user