From 90de5ed4249696b9828f66e5579e0bc10d30a55e Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 28 Feb 2018 20:29:30 +0000 Subject: [PATCH] Additional dialogue can be used for consuming specific items git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8531 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 16 ++++++++-------- Tactical/Dialogue Control.h | 1 + Tactical/Soldier Control.cpp | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 58c273f7..ac02ce21 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -15,9 +15,9 @@ #ifdef JA2EDITOR #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8531 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8531 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8531 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8531 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8531 (Development Build)" }; #endif #elif defined CRIPPLED_VERSION @@ -46,11 +46,11 @@ //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8531 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8531 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8530 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8531 (Development Build)" }; #endif #endif diff --git a/Tactical/Dialogue Control.h b/Tactical/Dialogue Control.h index 392ce451..cee767d5 100644 --- a/Tactical/Dialogue Control.h +++ b/Tactical/Dialogue Control.h @@ -360,6 +360,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 ADE_GRENADEWARNING, // a delayed enemy grenade was dropped nearby + ADE_CONSUMEITEM, // we applied an item to us }; // 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 diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 89eabdf5..4762bc8f 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -24095,6 +24095,9 @@ BOOLEAN ApplyConsumable( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, BOOLEAN fForce if ( fSuccess ) { + // Flugente: additional dialogue + AdditionalTacticalCharacterDialogue_CallsLua( pSoldier, ADE_CONSUMEITEM, pObj->usItem ); + // use up object UseKitPoints( pObj, statusused, pSoldier );