diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 9cda1c1..c75a219 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/flags.h b/flags.h index 36e43d8..94a4c91 100644 --- a/flags.h +++ b/flags.h @@ -14,6 +14,8 @@ enum class Flag:int{ HAS_ANNA, HAS_KING, HAS_POO, + SHOPKEER_BRANCH1, + SHOPKEER_BRANCH2, }; diff --git a/main.cpp b/main.cpp index cd97819..9ebcd08 100644 --- a/main.cpp +++ b/main.cpp @@ -1275,6 +1275,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), } else { DisplayMessageBox("No problem here."); } + GAME_FLAGS[(int)interaction.flag]=true; CLOSE_OVERWORLD_WINDOW=true; } }break; diff --git a/object.h b/object.h index 21a4845..22be1c7 100644 --- a/object.h +++ b/object.h @@ -181,6 +181,7 @@ class TrashCan_Obj : public Object{ }; extern int MESSAGE_BOX_DIALOG_ANSWER; +extern bool GAME_FLAGS[128]; class Shopkeeper_Obj : public Object{ DynamicObject(Shopkeeper_Obj) @@ -190,11 +191,14 @@ class Shopkeeper_Obj : public Object{ >1:What would you like to sell?\ >2:Are you okay?<"; Interaction Interact()override{ - if (MESSAGE_BOX_DIALOG_ANSWER==2) { + if (GAME_FLAGS[(int)Flag::SHOPKEER_BRANCH1]&&MESSAGE_BOX_DIALOG_ANSWER==2) { MESSAGE_BOX_DIALOG_ANSWER=0; - return {{"No! Stay away!"}}; + GAME_FLAGS[(int)Flag::SHOPKEER_BRANCH1]=false; + return {{"No! Stay away! [Okay,Ignore]\ + >0:Yeah I thought so.\ + >1:...<"}}; } else { - return {{welcomeMessage}}; + return {{welcomeMessage},flag:Flag::SHOPKEER_BRANCH1}; } } };