From 5db6213f34318031ece7e2a6765f69564b671891 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 8 Oct 2013 19:20:49 +0100 Subject: Initial Metadata Commit [SEE DESC] + Pigs, Minecarts, Sheep, Skeletons, Slimes, Villagers, Wolves, and Horses have metadata + Base code on taming wolves, shearing sheep, and taming horses + Sheep and horses have different colours when spawned --- source/Mobs/Villager.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/Mobs/Villager.h') diff --git a/source/Mobs/Villager.h b/source/Mobs/Villager.h index 92267a979..5fcb519dd 100644 --- a/source/Mobs/Villager.h +++ b/source/Mobs/Villager.h @@ -13,9 +13,17 @@ class cVillager : typedef cPassiveMonster super; public: - cVillager(); + cVillager(int Type); CLASS_PROTODEF(cVillager); + + virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override; + int GetVilType(void) const { return m_Type; } + +private: + + int m_Type; + } ; -- cgit v1.2.3 From e2aaf202abf9d677b84efeb376f55ee976b52b8d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 11 Oct 2013 20:57:22 +0100 Subject: Fifth round of fixes * Enumerated Villager spawning --- source/Mobs/Villager.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/Mobs/Villager.h') diff --git a/source/Mobs/Villager.h b/source/Mobs/Villager.h index 5fcb519dd..86888d9eb 100644 --- a/source/Mobs/Villager.h +++ b/source/Mobs/Villager.h @@ -13,12 +13,23 @@ class cVillager : typedef cPassiveMonster super; public: - cVillager(int Type); + + enum eVillagerType + { + VILLAGER_TYPE_FARMER = 0, + VILLAGER_TYPE_LIBRARIAN = 1, + VILLAGER_TYPE_PRIEST = 2, + VILLAGER_TYPE_BLACKSMITH = 3, + VILLAGER_TYPE_BUTCHER = 4, + VILLAGER_TYPE_GENERIC = 5 + } ; + + cVillager(eVillagerType VillagerType); CLASS_PROTODEF(cVillager); virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override; - int GetVilType(void) const { return m_Type; } + int GetVilType(void) const { return m_Type; } private: -- cgit v1.2.3 From d8d2f35e9dd354fba14f8d6512e818d18d2066c2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 13 Oct 2013 12:47:55 +0100 Subject: Eight round of fixes * Changed IsA() to *long if statement* - Removed deprecated values in Entity.h - to blazes with the plugins! * Renamed villager type enumerations to be LESS SHOUTY and more vt-y + Use vtMax for World.cpp testificate spawning --- source/Mobs/Villager.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/Mobs/Villager.h') diff --git a/source/Mobs/Villager.h b/source/Mobs/Villager.h index 86888d9eb..4cd9aaa8e 100644 --- a/source/Mobs/Villager.h +++ b/source/Mobs/Villager.h @@ -16,12 +16,13 @@ public: enum eVillagerType { - VILLAGER_TYPE_FARMER = 0, - VILLAGER_TYPE_LIBRARIAN = 1, - VILLAGER_TYPE_PRIEST = 2, - VILLAGER_TYPE_BLACKSMITH = 3, - VILLAGER_TYPE_BUTCHER = 4, - VILLAGER_TYPE_GENERIC = 5 + vtFarmer = 0, + vtLibrarian = 1, + vtPriest = 2, + vtBlacksmith = 3, + vtButcher = 4, + vtGeneric = 5, + vtMax } ; cVillager(eVillagerType VillagerType); -- cgit v1.2.3