From 6f05f0f2c8a3962fd8ba35fc1384ebf9e17675d7 Mon Sep 17 00:00:00 2001 From: Gent Date: Tue, 22 Sep 2020 23:41:43 -0400 Subject: [PATCH] Add NPCClass enum --- src/Defines.hpp | 8 ++++++++ src/NPC.hpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/Defines.hpp b/src/Defines.hpp index fa8555a..fc782dc 100644 --- a/src/Defines.hpp +++ b/src/Defines.hpp @@ -16,6 +16,14 @@ const float CN_EP_RANK_3 = 0.5f; const float CN_EP_RANK_4 = 0.3f; const float CN_EP_RANK_5 = 0.29f; +// NPC classes +enum NPCClass { + NPC_BASE = 0, + NPC_MOB = 1, + NPC_BUS = 2, + NPC_EGG = 3 +}; + // nano powers enum { EST_NONE = 0, diff --git a/src/NPC.hpp b/src/NPC.hpp index 371d420..c2db348 100644 --- a/src/NPC.hpp +++ b/src/NPC.hpp @@ -5,6 +5,7 @@ class BaseNPC { public: sNPCAppearanceData appearanceData; + NPCClass npcClass; BaseNPC() {}; BaseNPC(int x, int y, int z, int type) { @@ -20,4 +21,7 @@ public: // hopefully no collisions happen :eyes: appearanceData.iNPC_ID = (int32_t)rand(); }; + BaseNPC(int x, int y, int z, int type, NPCClass classType) : BaseNPC(x, y, z, type) { + npcClass = classType; + } };