Some more thoughts:
The option is pretty much the opposite of GAMEOPTION_ANIMALS_STAY_OUT.
One of them has to disable the other if both are used in a game. This should be explained in the tooltip for the one that disables the other; or for both.
Some animals should still be able to spawn within cities with GAMEOPTION_DANGEROUS_WILDLIFE active.
The option is pretty much the opposite of GAMEOPTION_ANIMALS_STAY_OUT.
One of them has to disable the other if both are used in a game. This should be explained in the tooltip for the one that disables the other; or for both.
Some animals should still be able to spawn within cities with GAMEOPTION_DANGEROUS_WILDLIFE active.
Spoiler Possible part of dll implementation :
Code:
bool CvUnit::canAnimalIgnoresBorders() const
{
if GC.getGameINLINE().isOption(GAMEOPTION_DANGEROUS_WILDLIFE)
{
return true;
}
if (!GC.getGameINLINE().isOption(GAMEOPTION_ANIMALS_STAY_OUT) && mayAnimalIgnoresBorders())
{
return true;
}
return false;
}
bool CvUnit::canAnimalIgnoresImprovements() const
{
if GC.getGameINLINE().isOption(GAMEOPTION_DANGEROUS_WILDLIFE)
{
return true;
}
if !GC.getGameINLINE().isOption(GAMEOPTION_ANIMALS_STAY_OUT)
{
int iAnswer = m_pUnitInfo->canAnimalIgnoresBorders();
iAnswer += getAnimalIgnoresBordersCount();
return (iAnswer > 1);
}
return false;
}
bool CvUnit::canAnimalIgnoresCities() const
{
if (!GC.getGameINLINE().isOption(GAMEOPTION_ANIMALS_STAY_OUT))
{
int iAnswer = m_pUnitInfo->canAnimalIgnoresBorders();
iAnswer += getAnimalIgnoresBordersCount();
return (iAnswer > 2);
}
return false;
bool CvSpawnInfo::getNeutralOnly()
{
if (GC.getUnitInfo(getUnitType()).isWildAnimal() && GC.getGameINLINE().isOption(GAMEOPTION_DANGEROUS_WILDLIFE))
{
return false;
}
return m_bNeutralOnly;
}
}
Last edited: