2016-03-01 15:47:10 +00:00
|
|
|
#ifndef P_CONVERSATION_H
|
|
|
|
#define P_CONVERSATION_H 1
|
|
|
|
|
|
|
|
#include <tarray.h>
|
|
|
|
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "textures/textures.h"
|
|
|
|
|
|
|
|
struct FStrifeDialogueReply;
|
|
|
|
class FTexture;
|
|
|
|
struct FBrokenLines;
|
|
|
|
|
|
|
|
struct FStrifeDialogueItemCheck
|
|
|
|
{
|
2017-02-08 17:11:23 +00:00
|
|
|
PClassActor *Item;
|
2016-03-01 15:47:10 +00:00
|
|
|
int Amount;
|
|
|
|
};
|
|
|
|
|
|
|
|
// FStrifeDialogueNode holds text an NPC says to the player
|
|
|
|
struct FStrifeDialogueNode
|
|
|
|
{
|
|
|
|
~FStrifeDialogueNode ();
|
2017-02-21 20:36:20 +00:00
|
|
|
PClassActor *DropType = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
2017-02-21 20:36:20 +00:00
|
|
|
int ThisNodeNum = 0; // location of this node in StrifeDialogues
|
|
|
|
int ItemCheckNode = 0; // index into StrifeDialogues
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-02-21 20:36:20 +00:00
|
|
|
PClassActor *SpeakerType = nullptr;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString SpeakerName;
|
2016-03-01 15:47:10 +00:00
|
|
|
FSoundID SpeakerVoice;
|
2017-02-19 13:21:49 +00:00
|
|
|
FString Backdrop;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString Dialogue;
|
|
|
|
FString Goodbye; // must init to null for binary scripts to work as intended
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2017-02-21 20:36:20 +00:00
|
|
|
FStrifeDialogueReply *Children = nullptr;
|
2018-08-18 23:14:15 +00:00
|
|
|
FName MenuClassName = NAME_None;
|
2017-02-19 13:21:49 +00:00
|
|
|
FString UserData;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// FStrifeDialogueReply holds responses the player can give to the NPC
|
|
|
|
struct FStrifeDialogueReply
|
|
|
|
{
|
2017-02-21 20:36:20 +00:00
|
|
|
FStrifeDialogueReply *Next = nullptr;
|
|
|
|
PClassActor *GiveType = nullptr;
|
|
|
|
int ActionSpecial = 0;
|
|
|
|
int Args[5] = {};
|
|
|
|
int PrintAmount = 0;
|
2016-03-01 15:47:10 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
2016-10-28 11:42:37 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheckRequire;
|
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheckExclude;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString Reply;
|
|
|
|
FString QuickYes;
|
|
|
|
FString QuickNo;
|
|
|
|
FString LogString;
|
2017-02-21 20:36:20 +00:00
|
|
|
int NextNode = 0; // index into StrifeDialogues
|
|
|
|
int LogNumber = 0;
|
|
|
|
bool NeedsGold = false;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct MapData;
|
|
|
|
|
|
|
|
PClassActor *GetStrifeType (int typenum);
|
|
|
|
|
2019-01-09 01:03:26 +00:00
|
|
|
bool LoadScriptFile (FLevelLocals *Level, const char *name, bool include, int type = 0);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2019-01-09 01:03:26 +00:00
|
|
|
void P_LoadStrifeConversations (FLevelLocals *Level, MapData *map, const char *mapname);
|
2016-03-01 15:47:10 +00:00
|
|
|
void P_FreeStrifeConversations ();
|
|
|
|
|
|
|
|
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveangle);
|
|
|
|
void P_ResumeConversation ();
|
|
|
|
|
2017-03-08 14:20:00 +00:00
|
|
|
void P_ConversationCommand (int netcode, int player, uint8_t **stream);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
2018-03-11 17:32:00 +00:00
|
|
|
class FileReader;
|
2019-01-09 01:03:26 +00:00
|
|
|
bool P_ParseUSDF(FLevelLocals *Level, int lumpnum, FileReader &lump, int lumplen);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|