浏览代码

Revert "Random selection for resources"

This reverts commit 0e4ff3e2bfcef3de8763764849bd4bd92bca6463.
nordsoft 2 年之前
父节点
当前提交
fe21acb0d0
共有 1 个文件被更改,包括 0 次插入20 次删除
  1. 0 20
      lib/mapObjects/JsonRandom.cpp

+ 0 - 20
lib/mapObjects/JsonRandom.cpp

@@ -90,26 +90,6 @@ namespace JsonRandom
 	{
 		std::string resourceName = loadKey(value, rng, "");
 		si32 resourceAmount = loadValue(value, rng, 0);
-		
-		if(!value["simple"].isNull())
-		{
-			si32 index = *RandomGeneratorUtil::nextItem(std::vector<si32>{Res::WOOD, Res::ORE}, rng);
-			resourceName = GameConstants::RESOURCE_NAMES[index];
-		}
-		if(!value["precious"].isNull())
-		{
-			si32 index = *RandomGeneratorUtil::nextItem(std::vector<si32>{Res::MERCURY, Res::GEMS, Res::SULFUR, Res::CRYSTAL}, rng);
-			resourceName = GameConstants::RESOURCE_NAMES[index];
-		}
-		if(!value["random"].isNull())
-		{
-			//enumeratign resources to exclude mithril
-			si32 index = *RandomGeneratorUtil::nextItem(std::vector<si32>{Res::WOOD, Res::ORE, Res::MERCURY, Res::GEMS, Res::SULFUR, Res::CRYSTAL, Res::GOLD}, rng);
-			if(index == Res::GOLD)
-				resourceAmount *= 100;
-			resourceName = GameConstants::RESOURCE_NAMES[index];
-		}
-		
 		si32 resourceID(VLC->modh->identifiers.getIdentifier(value.meta, "resource", resourceName).get());
 
 		TResources ret;