mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Added dialogue event for planting bombs/mines (ADE_BOMB_HAS_BEEN_PLANTED)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8793 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -352,7 +352,7 @@ enum AdditionalDialogEvents
|
||||
ADE_WEATHERCHANGE, // the weather has changed, and we can warn the player about that
|
||||
ADE_SKILL_RESULT, // we used a skill, and comment on the result, aData1 is of Skill, aData2 indicates whether it was a success (1) or failure (0)
|
||||
ADE_GRENADEWARNING, // a delayed enemy grenade was dropped nearby
|
||||
ADE_CONSUMEITEM, // we applied an item to us
|
||||
ADE_CONSUMEITEM, // we consumed an item, aData1 is the item index
|
||||
ADE_NPC_DEATH, // someone died
|
||||
ADE_WITNESS_GOOD, // similar to comment upon buddy doing good.
|
||||
ADE_BANDAGE_PERFORM_BEGIN, // we bandage someone, aData1 is the profile of person
|
||||
@@ -363,6 +363,7 @@ enum AdditionalDialogEvents
|
||||
ADE_SEXUALHARASSMENT, // the player wants to take the 'strip' command further than we are comfortable with
|
||||
ADE_LOCKBOMB, // merc uses a shaped charge to blow the locks of a door, aData1 indicates whether it was a success (1) or failure (0)
|
||||
ADE_SNIPERWARNING, // merc warns of sniper presence in this sector
|
||||
ADE_BOMB_HAS_BEEN_PLANTED, // we planted a bomb/mine/etc., aData1 is the item index, aData2 indicates whether it was a success (1) or failure (0)
|
||||
};
|
||||
|
||||
// We call this function from several places. It uses the dialogue functions, but calls a Lua script to know whether something, and what, should be said
|
||||
|
||||
@@ -2098,9 +2098,15 @@ void HandleSoldierDropBomb( SOLDIERTYPE *pSoldier, INT32 sGridNo )
|
||||
if ( gfShiftBombPlant && pSoldier->inv[ pSoldier->ubAttackingHand ].exists() )
|
||||
guiPendingOverrideEvent = M_CHANGE_TO_ACTION;
|
||||
}
|
||||
|
||||
// Flugente: additional dialogue
|
||||
AdditionalTacticalCharacterDialogue_CallsLua( pSoldier, ADE_BOMB_HAS_BEEN_PLANTED, pSoldier->inv[HANDPOS].usItem, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: additional dialogue
|
||||
AdditionalTacticalCharacterDialogue_CallsLua( pSoldier, ADE_BOMB_HAS_BEEN_PLANTED, pSoldier->inv[HANDPOS].usItem, 0 );
|
||||
|
||||
// beartraps don't explode...
|
||||
if ( HasItemFlag( (pSoldier->inv[HANDPOS]).usItem, BEARTRAP ) )
|
||||
return;
|
||||
@@ -5527,9 +5533,15 @@ void BombMessageBoxCallBack( UINT8 ubExitValue )
|
||||
else
|
||||
// EXPLOSIVES GAIN (25): Place a bomb, or buried and armed a mine
|
||||
StatChange( gpTempSoldier, EXPLODEAMT, 25, FALSE );
|
||||
|
||||
// Flugente: additional dialogue
|
||||
AdditionalTacticalCharacterDialogue_CallsLua( gpTempSoldier, ADE_BOMB_HAS_BEEN_PLANTED, gpTempSoldier->inv[HANDPOS].usItem, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: additional dialogue
|
||||
AdditionalTacticalCharacterDialogue_CallsLua( gpTempSoldier, ADE_BOMB_HAS_BEEN_PLANTED, gpTempSoldier->inv[HANDPOS].usItem, 0 );
|
||||
|
||||
// beartraps don't explode...
|
||||
if ( HasItemFlag( (gpTempSoldier->inv[HANDPOS]).usItem, BEARTRAP ) )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user