浏览代码

Prevent RoE elemental dwellings from spawning.

DjWarmonger 11 年之前
父节点
当前提交
d3f97829a1
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      lib/rmg/CRmgTemplateZone.cpp

+ 8 - 1
lib/rmg/CRmgTemplateZone.cpp

@@ -1451,7 +1451,14 @@ void CRmgTemplateZone::addAllPossibleObjects (CMapGenerator* gen)
 
 	//dwellings
 
-	for (auto secondaryID : VLC->objtypeh->knownSubObjects(Obj::CREATURE_GENERATOR1))
+	auto subObjects = VLC->objtypeh->knownSubObjects(Obj::CREATURE_GENERATOR1);
+
+	//don't spawn original "neutral" dwellings that got replaced by Conflux dwellings in AB
+	static int elementalConfluxROE[] = {7, 13, 16, 47};
+	for (int i = 0; i < 4; i++)
+		vstd::erase_if_present(subObjects, elementalConfluxROE[i]);
+
+	for (auto secondaryID : subObjects)
 	{
 		auto dwellingHandler = dynamic_cast<const CDwellingInstanceConstructor*>(VLC->objtypeh->getHandlerFor(Obj::CREATURE_GENERATOR1, secondaryID).get());
 		auto creatures = dwellingHandler->getProducedCreatures();