Added dialogue events for using a lockbomb (ADE_LOCKBOMB) and sniper warning (ADE_SNIPERWARNING)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8711 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-12-01 20:34:46 +00:00
parent 61c6972efa
commit 8ace6a2954
4 changed files with 23 additions and 1 deletions
@@ -59,6 +59,9 @@ namespace AI
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_WATHCHOUTFORSNIPERS] );
sniperwarning = TRUE;
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_AllInCurrentSector( NO_PROFILE, ADE_SNIPERWARNING );
}
if (!biggunwarning && FindRocketLauncherOrCannon(get_npc()) != NO_SLOT )
+7
View File
@@ -1764,6 +1764,13 @@ BOOLEAN AdditionalTacticalCharacterDialogue_CallsLua( SOLDIERTYPE *pSoldier, UIN
}
// call event for all mercs in a sector
void AdditionalTacticalCharacterDialogue_AllInCurrentSector( UINT8 ausIgnoreProfile,
UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3, INT32 aAroundGridno, INT32 aRadius )
{
return AdditionalTacticalCharacterDialogue_AllInSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ, ausIgnoreProfile,
usEventNr, aData1, aData2, aData3, aAroundGridno, aRadius );
}
void AdditionalTacticalCharacterDialogue_AllInSector(INT16 aSectorX, INT16 aSectorY, INT8 aSectorZ, UINT8 ausIgnoreProfile,
UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3, INT32 aAroundGridno, INT32 aRadius )
{
+6 -1
View File
@@ -350,7 +350,7 @@ enum AdditionalDialogEvents
ADE_DIALOGUE_RPC_RECRUIT_SUCCESS, // we've successfully recruited an RPC, and might comment on that
ADE_SEX, // does exactly what you think it does
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
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_NPC_DEATH, // someone died
@@ -361,6 +361,8 @@ enum AdditionalDialogEvents
ADE_BANDAGE_RECEIVE_END, // someone finished bandaging us, aData1 is the profile of person
ADE_ZOMBIESRISE, // a new wave of zombies is spawned from corpses
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
};
// 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
@@ -369,6 +371,9 @@ enum AdditionalDialogEvents
BOOLEAN AdditionalTacticalCharacterDialogue_CallsLua( SOLDIERTYPE *pSoldier, UINT16 usEventNr, UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0 );
// call event for all mercs in a sector
void AdditionalTacticalCharacterDialogue_AllInCurrentSector( UINT8 ausIgnoreProfile,
UINT16 usEventNr, UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0, INT32 aAroundGridno = -1, INT32 aRadius = 0 );
void AdditionalTacticalCharacterDialogue_AllInSector( INT16 aSectorX, INT16 aSectorY, INT8 aSectorZ, UINT8 ausIgnoreProfile,
UINT16 usEventNr, UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0, INT32 aAroundGridno = -1, INT32 aRadius = 0 );
+7
View File
@@ -39,6 +39,7 @@
#include "handle doors.h"
#include "Map Screen Interface.h"
#include "GameSettings.h" // added by SANDRO
#include "Dialogue Control.h" // added by Flugente
#endif
#include "GameVersion.h"
@@ -806,8 +807,14 @@ BOOLEAN AttemptToBlowUpLock( SOLDIERTYPE * pSoldier, DOOR * pDoor )
// also add to records - door successfuly breached
gMercProfiles[ pSoldier->ubProfile ].records.usLocksBreached++;
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_CallsLua( pSoldier, ADE_LOCKBOMB, 1 );
return( TRUE );
}
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_CallsLua( pSoldier, ADE_LOCKBOMB, 0 );
}
else
{