From bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f Mon Sep 17 00:00:00 2001 From: mgueydan Date: Sun, 8 Sep 2013 00:11:38 +0200 Subject: Adding an Empty shell that would launch mob spawner - not called yet --- source/MobSpawner.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 source/MobSpawner.h (limited to 'source/MobSpawner.h') diff --git a/source/MobSpawner.h b/source/MobSpawner.h new file mode 100644 index 000000000..7498c567d --- /dev/null +++ b/source/MobSpawner.h @@ -0,0 +1,28 @@ + +#pragma once + +#include +#include "BlockID.h" +#include "ChunkDef.h" +#include "FastRandom.h" +#include "Mobs/Monster.h" //this is a side-effect of keeping Mobfamily inside Monster class. I'd prefer to keep both (Mobfamily and Monster) inside a "Monster" namespace MG TODO : do it + +class cChunk; +class cEntity; + + +// This class is used to determine wich monster can be spawned on wich place +// it is essentially static (f.i. Squids spawn in water, Zombie spawn in dark places) +// but it also has dynamic part depending on the world.ini +class cMobSpawner +{ +public : + // constructor + // a_MobFamily is the mega type of mobs that this spawner will spawn + // a_AllowedTypes is the set of types allowed for mobs it will spawn. Empty set + // would result in no spawn at all + // Allowed mobs thah are not of the right Megatype will not be include (no warning) + cMobSpawner(cMonster::eFamily MobFamily, const std::set& a_AllowedTypes); + + +}; -- cgit v1.2.3