From 3033594b89f23e65b6152daa6610f991307f2f67 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 10 Feb 2016 08:48:49 -0500 Subject: quests, inventory good --- include/Quest.h | 11 ++++++++--- include/inventory.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/Quest.h b/include/Quest.h index 388b14d..8b1e142 100644 --- a/include/Quest.h +++ b/include/Quest.h @@ -20,11 +20,16 @@ #define DEBUG +struct need_t { + std::string name; + int n; +}; + typedef struct { std::string title; std::string desc; struct item_t reward; - std::vector need; + std::vector need; } Quest; /** @@ -42,13 +47,13 @@ public: * Adds a quest to the current quest vector by its title. */ - int assign(const char *t); + int assign(std::string title,std::string desc,std::string req); /** * Drops a quest through its title. */ - int drop(const char *t); + int drop(std::string title); /** * Finishes a quest through it's title, also giving a pointer to the Entity diff --git a/include/inventory.h b/include/inventory.h index e5209de..af859a5 100644 --- a/include/inventory.h +++ b/include/inventory.h @@ -48,6 +48,7 @@ public: int addItem(std::string name,uint count); int takeItem(std::string name,uint count); + int hasItem(std::string name); int useItem(void); bool detectCollision(vec2,vec2); -- cgit v1.2.3