I found something else we need to fix. I'm putting it on my list. The Hostile Takeover quest cannot be completed if it draws a corporation that runs off manufactured resources. I've had it sitting in a game keyed to Ultimate Soldiers. It should not have even triggered in the first place as I have had Steel, Lead, and Vulcanized Rubber before the quest even fired.
The problem is that the code checks for resources on the map when determining which resources the corporation needs. So in the Ultimate Soldiers example, because it didn't see any Steel or Vulcanized Rubber on the map, it thought I needed those resources for the quest. (Adding the resources to the map in WB fulfilled the quest.)
This is the actual code that is used. I speculate that this is done the way it is to account for maps that don't generate a particular resource at all (such as maps with very little water and no seafood bonuses; Sid's Sushi can be built with Rice alone).
I just noticed this, and I want to figure out what we can do about it.
The problem is that the code checks for resources on the map when determining which resources the corporation needs. So in the Ultimate Soldiers example, because it didn't see any Steel or Vulcanized Rubber on the map, it thought I needed those resources for the quest. (Adding the resources to the map in WB fulfilled the quest.)
This is the actual code that is used. I speculate that this is done the way it is to account for maps that don't generate a particular resource at all (such as maps with very little water and no seafood bonuses; Sid's Sushi can be built with Rice alone).
Code:
def getHostileTakeoverListResources(corporation, player):
map = gc.getMap()
listHave = []
for i in range(map.numPlots()):
plot = map.plotByIndex(i)
if plot.getOwner() == player.getID():
iBonus = plot.getBonusType(player.getTeam())
if iBonus != -1:
if not iBonus in listHave:
listHave.append(iBonus)
listNeed = []
for i in range(gc.getNUM_CORPORATION_PREREQ_BONUSES()):
iBonus = corporation.getPrereqBonus(i)
if iBonus != -1:
if not iBonus in listHave:
listNeed.append(iBonus)
return listNeed
I just noticed this, and I want to figure out what we can do about it.