|
|
|
@ -61,6 +61,7 @@ class Object{ |
|
|
|
|
virtual Interaction Interact()=0; |
|
|
|
|
virtual void ChoiceMade(int choice)=0; |
|
|
|
|
virtual void DialogClosed()=0; |
|
|
|
|
virtual void ShoppingCompleted()=0; |
|
|
|
|
void SetScale(vd2d scale) { |
|
|
|
|
this->scale=scale; |
|
|
|
|
if (spr!=nullptr) { |
|
|
|
@ -176,6 +177,7 @@ class Standard_Obj : public Object{ |
|
|
|
|
Interaction Interact()override{return {};} |
|
|
|
|
void DialogClosed()override{}; |
|
|
|
|
void ChoiceMade(int choice)override{}; |
|
|
|
|
void ShoppingCompleted()override{}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class TrashCan_Obj : public Object{ |
|
|
|
@ -185,13 +187,15 @@ class TrashCan_Obj : public Object{ |
|
|
|
|
return {{"You dig around the trash can.","Nope! Just looks like plain ol' trash."}};} |
|
|
|
|
void DialogClosed()override{}; |
|
|
|
|
void ChoiceMade(int choice)override{}; |
|
|
|
|
void ShoppingCompleted()override{}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
extern int MESSAGE_BOX_DIALOG_ANSWER; |
|
|
|
|
extern bool GAME_FLAGS[128]; |
|
|
|
|
extern int GAME_STATE; |
|
|
|
|
extern void SetupShop(std::vector<std::pair<Item*,int>> shopItems); |
|
|
|
|
extern void SetupShop(Object*shopkeeper,std::vector<std::pair<Item*,int>> shopItems); |
|
|
|
|
extern std::map<ItemName,Item*>ITEMLIST; |
|
|
|
|
extern void DisplayMessageBox(std::string targetT); |
|
|
|
|
|
|
|
|
|
class Shopkeeper_Obj : public Object{ |
|
|
|
|
DynamicObject(Shopkeeper_Obj) |
|
|
|
@ -224,6 +228,7 @@ class Shopkeeper_Obj : public Object{ |
|
|
|
|
void DialogClosed()override{ |
|
|
|
|
GAME_STATE = GameState::SHOPKEEPER_MENU; |
|
|
|
|
SetupShop( |
|
|
|
|
this, |
|
|
|
|
{ |
|
|
|
|
{ITEMLIST[ItemName::EGG],8}, |
|
|
|
|
{ITEMLIST[ItemName::COOKIE],4}, |
|
|
|
@ -232,5 +237,8 @@ class Shopkeeper_Obj : public Object{ |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
void ShoppingCompleted()override{ |
|
|
|
|
DisplayMessageBox("Thanks for shopping with us! Have a great day."); |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
#endif |